采购订单发票所需文件的生成

product
chuang 2 years ago
parent d7346d4840
commit 17d805ef72

@ -11,7 +11,6 @@ import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
/**
*
@ -191,6 +190,7 @@ public class DownUtil {
}
//强制将缓存区的数据进行输出
outputStream.flush();
}catch (Exception e){
e.getMessage();
}

@ -18,7 +18,34 @@
<djl.version>0.17.0</djl.version>
</properties>
<dependencies>
<!--spire.doc 操作word文档-->
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.doc.free</artifactId>
<version>5.2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<!--freemarker-->
<dependency>
<groupId>org.freemarker</groupId>

@ -4,14 +4,15 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult;
import jnpf.contractfile.model.contractfile.ContractFileListQueryModel;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService;
import jnpf.util.JsonUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@ -25,43 +26,18 @@ public class MobilePortController {
@Resource
private PurchaseorderitemService purchaseorderitemService;
/**
*
* @param response
* @param documentNo
* @throws Exception
*/
@GetMapping(value = "/exportPdf", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
public ResponseEntity<byte[]> exportBillInfo() {
// byte[] bytes = null;
// HttpHeaders headers = null;
// ByteArrayOutputStream out=null;
// try {
// ExportPdf exportPdf = new ExportPdf();
// //渲染模板参数
// Map map=new HashMap();
// map.put("title","标题");
// map.put("name", "老王");
// //repotData自己加测试数据
// map.put("repotData", new ArrayList<>());
//
// out= exportPdf.createPdf(map, "test.ftl", "/templates/export");
// bytes = out.toByteArray();
// String fileName="测试.pdf";
// fileName = URLEncoder.encode(fileName, "utf-8");
// headers = new HttpHeaders();
// headers.add("Content-Disposition",
// "attachment; filename=" + fileName);
// //"attachment; filename=" + new String(fileName.getBytes("gbk"), StandardCharsets.ISO_8859_1));
// } catch (Exception e) {
// log.error("导出pdf失败:{}", e);
//// throw new SubBusinessException(ErrorCode.FILE_DOWNLOAD_ERROR, "导出pdf失败!");
//
// }finally {
// if (null!=out){
// try {
// out.close();
// } catch (IOException e) {
// log.error("out close error:{}", e);
// }
// }
// }
// return new ResponseEntity<>(bytes, headers, HttpStatus.OK);
return purchaseorderitemService.getPdfInfo();
public void exportBillInfo(HttpServletResponse response,String documentNo) throws Exception {
// public void exportBillInfo(HttpServletResponse response) throws Exception {
PurchaseorderitemEntity purchaseorderitemEntity = new PurchaseorderitemEntity();
purchaseorderitemEntity.setContractNo(documentNo);
purchaseorderitemService.getPdfInfo(purchaseorderitemEntity,response);
}

@ -1,7 +1,6 @@
package jnpf.mobilePort.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import jnpf.purchaseorder.model.purchaseorder.*;
import lombok.Data;
import java.util.List;
@ -86,8 +85,9 @@ public class PurchaseOrderVO {
@JsonProperty("status")
private String status;
/** 子表数据 **/
@JsonProperty("purchaseorder_item0List")
private List<Purchaseorder_item0Model> purchaseorder_item0List;
@JsonProperty("purchaseorderItemModelVO")
private List<PurchaseorderItemModelVO> purchaseorder_item0List;
}

@ -0,0 +1,96 @@
package jnpf.mobilePort.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* @Author: WangChuang
* @Date: 22/2/2023 1:53
* @Description //注释:
* @Version 1.0
*/
@Data
public class PurchaseorderItemModelVO {
/** 车牌号 **/
@JsonProperty("licenseNum")
private String licenseNum;
/** 物料名称 **/
@JsonProperty("materialName")
private String materialName;
/** 类型 **/
@JsonProperty("pountType")
private String pountType;
/** 净重 **/
@JsonProperty("netWeight")
private String netWeight;
/** 单位 **/
@JsonProperty("unit")
private String unit;
/** 是否垫资 **/
@JsonProperty("advance")
private String advance;
/** 单价 **/
@JsonProperty("price")
private String price;
/** 结算重量 **/
@JsonProperty("settlement")
private String settlement;
/** 税率 **/
@JsonProperty("rate")
private String rate;
/** 金额 **/
@JsonProperty("amount")
private String amount;
/** 不含税金额 **/
@JsonProperty("notAmount")
private String notAmount;
/** 备注 **/
@JsonProperty("remark")
private String remark;
/** 磅单图片 **/
@JsonProperty("poundPictures")
private String poundPictures;
/** 车辆图片 **/
@JsonProperty("vehiclePictures")
private String vehiclePictures;
/** 客户名称 **/
@JsonProperty("supplierNm")
private String supplierNm;
/** 收货日期 **/
@JsonProperty("poundDate")
private String poundDate;
/** 送货车号 **/
@JsonProperty("ticketNo")
private String ticketNo;
/** 毛重 **/
@JsonProperty("grossWeight")
private String grossWeight;
/** 皮重 **/
@JsonProperty("tareWeight")
private String tareWeight;
/** 扣重 **/
@JsonProperty("buckleWeight")
private String buckleWeight;
}

@ -3,9 +3,11 @@ package jnpf.mobilePort.utils;
import com.lowagie.text.pdf.BaseFont;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import org.xhtmlrenderer.pdf.ITextRenderer;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.util.Locale;
@ -20,6 +22,43 @@ import java.util.Map;
*/
public class ExportPdf {
public String createWord(Map data, String templateFileName) throws IOException, TemplateException {
// 模板的位置
String path = "/templates/export/";
// 创建一个FreeMarker实例, 负责管理FreeMarker模板的Configuration实例
Configuration cfg = new Configuration();
cfg.setDefaultEncoding("UTF-8");
// 指定FreeMarker模板文件的位置
cfg.setClassForTemplateLoading(this.getClass(), path);
// 设置 css中 的字体样式(暂时仅支持宋体和黑体) 必须,不然中文不显示
//String path = ExportPdf.class.getResource("").getPath();
//String path = ExportPdf.class.getResource("/").getPath() + "templates/export/";
// 设置模板的编码格式
cfg.setEncoding(Locale.getDefault(), "UTF-8");
// 获取模板文件
Template template = cfg.getTemplate(templateFileName, "UTF-8");
StringWriter writer = new StringWriter();
// 将数据输出到html中
template.process(data, writer);
writer.flush();
String word = writer.toString();
// 把html代码传入渲染器中
// 设置模板中的图片路径 这里的images在resources目录下 模板中img标签src路径需要相对路径加图片名 如<img src="images/xh.jpg"/>
// String url = ImportExcelUtil.class.getClassLoader().getResource("images").toURI().toString();
// renderer.getSharedContext().setBaseURL(url);
writer.close();
return word;
}
/**
* pdf
*
@ -29,7 +68,8 @@ public class ExportPdf {
*/
public ByteArrayOutputStream createPdf(Map data, String templateFileName, String basePackagePath) throws Exception {
OutputStream out = new ByteArrayOutputStream();
StringWriter writer = new StringWriter();
try{
// 创建一个FreeMarker实例, 负责管理FreeMarker模板的Configuration实例
Configuration cfg = new Configuration();
cfg.setDefaultEncoding("UTF-8");
@ -45,7 +85,7 @@ public class ExportPdf {
cfg.setEncoding(Locale.CHINA, "UTF-8");
// 获取模板文件
Template template = cfg.getTemplate(templateFileName, "UTF-8");
StringWriter writer = new StringWriter();
// 将数据输出到html中
template.process(data, writer);
writer.flush();
@ -60,9 +100,11 @@ public class ExportPdf {
renderer.layout();
renderer.createPDF(out, false);
renderer.finishPDF();
out.flush();
writer.close();
renderer.finishPDF();}
finally {
out.flush();
writer.close();
}
return (ByteArrayOutputStream) out;
}

@ -0,0 +1,227 @@
package jnpf.mobilePort.utils;
import jnpf.util.FilePathUtil;
import jnpf.util.JsonUtil;
import sun.misc.BASE64Encoder;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author: WangChuang
* @Date: 22/2/2023 11:00
* @Description // TODO实现文件或文件夹的复制到指定目录
* @Version 1.0
*/
public class FileCopy {
public static void createFile(String path){
File file = new File(path);
if (!file.exists()){
file.mkdirs();
}
}
/**
* @TODO
* @param path
* @return
*/
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;
}
if (!file.isDirectory()) {
return flag;
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
} else {
temp = new File(path + File.separator + tempList[i]);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
// delFolder(path + "/" + tempList[i]);//再删除空文件夹
flag = true;
}
}
return flag;
}
/**
* base64
* @param picturesInfo
* @return
* @throws Exception
*/
public static List<Map<String,Object>> getImageInfo(String picturesInfo) throws Exception {
List<Map<String,Object>> imageBaseList = new ArrayList<>();
if (!picturesInfo.equals("null")){
for (Object o : JsonUtil.getJsonToJsonArray(picturesInfo)) {
Map<String,String> map =(Map<String,String>)o;
String url = map.get("url");
System.out.println(url);
int i = url.indexOf("/", 16);
String type = url.substring(16, i);
// System.out.println("type"+type);
// System.out.println("type.toLowerCase()"+type.toLowerCase());
String fileId = map.get("fileId");
// 本地文件路径
String filePath = FilePathUtil.getFilePath(type.toLowerCase())+fileId;
// 获得图片的base64码
String imageBase = FileCopy.getImageBase(filePath);
int[] imgWidthHeight = FileCopy.getImgWidthHeight(filePath);
HashMap<String, Object> map1 = new HashMap<>();
map1.put("imgBase",imageBase);
map1.put("name",fileId);
map1.put("filePath",filePath);
if (imgWidthHeight!=null){
map1.put("width",String.valueOf(imgWidthHeight[0]));
map1.put("height",String.valueOf(imgWidthHeight[1]));
}
imageBaseList.add(map1);
// System.out.println(filePath);
// System.out.println(imageBase);
}
}
return imageBaseList;
}
/**
*
* @param
* @return
*/
public static int[] getImgWidthHeight(String srcc) {
if (srcc == null || srcc == "") {
return null;
}
File file = new File(srcc);
if (!file.exists()) {
return null;
}
InputStream is = null;
BufferedImage src = null;
int result[] = { 0, 0 };
try {
// 获得文件输入流
is = new FileInputStream(file);
// 从流里将图片写入缓冲图片区
src = ImageIO.read(is);
result[0] =src.getWidth(null); // 得到源图片宽
result[1] =src.getHeight(null);// 得到源图片高
is.close(); //关闭输入流
src = null;
} catch (Exception ef) {
ef.printStackTrace();
}
System.gc();
return result;
}
//获得图片的base64码
public static String getImageBase(String src) throws Exception {
if (src == null || src == "") {
return "";
}
File file = new File(src);
if (!file.exists()) {
return "";
}
InputStream in = null;
byte[] data = null;
try {
in = new FileInputStream(file);
data = new byte[in.available()];
in.read(data);
in.close();
} catch (IOException e) {
e.printStackTrace();
}
BASE64Encoder encoder = new BASE64Encoder();
return encoder.encode(data);
}
public static void copySCMFile(File source, String dest )throws IOException{
File parentFile = source.getParentFile();
if (!parentFile.exists()){
parentFile.mkdirs();
copyFile(source, dest);
}else{
copyFile(source, dest);
}
}
public static void copyFile(File source, String dest )throws IOException {
if (source.exists()){
//创建目的地文件夹
File destfile = new File(dest);
if(!destfile.exists()){
destfile.mkdir();
}
//如果source是文件夹则在目的地址中创建新的文件夹
if(source.isDirectory()){
File file = new File(dest+"\\"+source.getName());//用目的地址加上source的文件夹名称创建新的文件夹
file.mkdir();
//得到source文件夹的所有文件及目录
File[] files = source.listFiles();
if(files.length==0){
return;
}else{
for(int i = 0 ;i<files.length;i++){
copyFile(files[i],file.getPath());
}
}
}
//source是文件则用字节输入输出流复制文件
else if(source.isFile()){
FileInputStream fis = new FileInputStream(source);
//创建新的文件,保存复制内容,文件名称与源文件名称一致
File dfile = new File(dest+"\\"+source.getName());
if(!dfile.exists()){
dfile.createNewFile();
}
FileOutputStream fos = new FileOutputStream(dfile);
// 读写数据
// 定义数组
byte[] b = new byte[1024];
// 定义长度
int len;
// 循环读取
while ((len = fis.read(b))!=-1) {
// 写出数据
fos.write(b, 0 , len);
}
//关闭资源
fos.close();
fis.close();
}
}
}
}

@ -7,6 +7,7 @@ import jnpf.mobilePort.entity.PurchaseOrderVO;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
/**
@ -19,4 +20,7 @@ import java.util.List;
*/
public interface PurchaseorderitemMapper extends BaseMapper<PurchaseorderitemEntity> {
List<PurchaseOrderVO> getPurchorderItemMap(@Param("ew")Wrapper<PurchaseorderitemEntity> queryWrapper);
List<HashMap<String,Object>> getPdfInfo(@Param("ew")Wrapper<PurchaseorderitemEntity> queryWrapper);
List<HashMap<String,Object>> getWordExcelInfo(@Param("ew")Wrapper<PurchaseorderitemEntity> queryWrapper);
List<HashMap<String,Object>> getVehicleInfo(@Param("ew")Wrapper<PurchaseorderitemEntity> queryWrapper);
}

@ -1,17 +1,13 @@
package jnpf.purchaseorder.service;
import jnpf.mobilePort.entity.PurchaseOrderVO;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.Invoices_item0itemEntity;
import jnpf.purchaseorder.entity.PaymentitemEntity;
import jnpf.purchaseorder.entity.PurchasebackitemEntity;
import jnpf.purchaseorder.entity.CollectionpoEntity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.mobilePort.entity.PurchaseOrderVO;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderPagination;
import org.springframework.http.ResponseEntity;
import java.util.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
/**
*
* purchaseorder
@ -21,7 +17,7 @@ import java.util.*;
* 2023-02-01
*/
public interface PurchaseorderitemService extends IService<PurchaseorderitemEntity> {
public ResponseEntity<byte[]> getPdfInfo();
public void getPdfInfo(PurchaseorderitemEntity purchaseorderitemEntity,HttpServletResponse response ) throws Exception;
List<PurchaseOrderVO> getPMap(PurchaseorderPagination purchaseorderPagination);
@ -46,5 +42,9 @@ public interface PurchaseorderitemService extends IService<PurchaseorderitemEnti
List<PurchasebackitemEntity> GetPurchasebackitemList(String id);
List<CollectionpoEntity> GetCollectionitemList(String id);
void getVehicle(List<HashMap<String, Object>> vehicleInfo, String templateFilePath) throws Exception;
void getZIP(String templateFilePath, HttpServletResponse response) throws Exception;
//列表子表数据方法
}

@ -1,27 +1,42 @@
package jnpf.purchaseorder.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spire.doc.Document;
import com.spire.doc.FileFormat;
import com.spire.doc.Section;
import com.spire.doc.documents.HorizontalAlignment;
import com.spire.doc.documents.Paragraph;
import com.spire.doc.documents.ParagraphStyle;
import com.spire.doc.fields.DocPicture;
import jnpf.config.ConfigValueUtil;
import jnpf.mobilePort.entity.PurchaseOrderVO;
import jnpf.mobilePort.entity.PurchaseorderItemModelVO;
import jnpf.mobilePort.utils.ExportPdf;
import jnpf.mobilePort.utils.FileCopy;
import jnpf.mobilePort.utils.MultipartFileDto;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.permission.service.AuthorizeService;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.mapper.PurchaseorderitemMapper;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderPagination;
import jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model;
import jnpf.purchaseorder.service.*;
import jnpf.util.FileUtil;
import jnpf.util.ServletUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import org.apache.http.entity.ContentType;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
@ -30,14 +45,14 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.*;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
@ -78,20 +93,430 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
@Resource
private ConfigValueUtil configValueUtil;
public void getExcel(List<HashMap<String,Object>> list ,String templateFilePath) throws Exception{
//声明要创建的文件名
String filename = templateFilePath+"\\废钢收货明细表.xls" ;
//创建 HSSFWorkbook 类的实例
HSSFWorkbook workbook = new HSSFWorkbook();
FileOutputStream fileOut = new FileOutputStream(filename);
try{
//调用 creatSheet() 方法并传递要创建的工作表的名称
HSSFSheet sheet = workbook.createSheet( "榜单信息" );
HSSFCellStyle cellStyle = workbook.createCellStyle();
HSSFCellStyle headLineStyle = workbook.createCellStyle();
HSSFCellStyle headStyle = workbook.createCellStyle();
HSSFCellStyle lineStyle = workbook.createCellStyle();
// 水平居中
cellStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
// 垂直居中
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
cellStyle.setHidden(true);
// 水平居中
headStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
// 垂直居中
headStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headStyle.setHidden(true);
// 水平居中
headLineStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
// 垂直居中
headLineStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// 边框
headLineStyle.setBorderBottom(BorderStyle.THIN);
headLineStyle.setBorderLeft(BorderStyle.THIN);
headLineStyle.setBorderTop(BorderStyle.THIN);
headLineStyle.setBorderRight(BorderStyle.THIN);
// 自动换行
// headLineStyle.setWrapText(true);
headLineStyle.setHidden(true);
// 水平居中
lineStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
// 垂直居中
lineStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// 边框
lineStyle.setBorderBottom(BorderStyle.THIN);
lineStyle.setBorderLeft(BorderStyle.THIN);
lineStyle.setBorderTop(BorderStyle.THIN);
lineStyle.setBorderRight(BorderStyle.THIN);
// 自动换行
// lineStyle.setWrapText(true);
lineStyle.setHidden(true);
HSSFFont font = workbook.createFont();
HSSFFont headFont = workbook.createFont();
HSSFFont tieleFont = workbook.createFont();
HSSFFont lineFont = workbook.createFont();
font.setFontName("宋体");
font.setFontHeightInPoints((short) 18);
font.setBold(true);
cellStyle.setFont(font);
headFont.setFontName("宋体");
headFont.setFontHeightInPoints((short) 11);
headFont.setBold(true);
headLineStyle.setFont(headFont);
tieleFont.setFontName("宋体");
tieleFont.setFontHeightInPoints((short) 11);
tieleFont.setBold(true);
headStyle.setFont(tieleFont);
lineFont.setFontName("宋体");
lineFont.setFontHeightInPoints((short) 12);
lineStyle.setFont(lineFont);
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 8));
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 8));
BigDecimal sum = BigDecimal.ZERO;
if (list!=null&&list.size()>0){
for (int i = 0; i < list.size(); i++) {
HashMap<String, Object> map = list.get(i);
//创建第二行
HSSFRow row2 = sheet.createRow((short) i+3 );
//在第二行插入数据
HSSFCell lineCell1 = row2.createCell(0);
HSSFCell lineCell2 = row2.createCell(1);
HSSFCell lineCell3 = row2.createCell(2);
HSSFCell lineCell4 = row2.createCell(3);
HSSFCell lineCell5 = row2.createCell(4);
HSSFCell lineCell6 = row2.createCell(5);
HSSFCell lineCell7 = row2.createCell(6);
HSSFCell lineCell8 = row2.createCell(7);
HSSFCell lineCell9 = row2.createCell(8);
lineCell1.setCellValue( i+1 );
lineCell1.setCellStyle(lineStyle);
lineCell2.setCellValue(String.valueOf(map.get("poundDate")).equals("null")?"":String.valueOf(map.get("poundDate")) );
lineCell2.setCellStyle(lineStyle);
lineCell3.setCellValue( String.valueOf(map.get("ticketNo")).equals("null")?"":String.valueOf(map.get("ticketNo")));
lineCell3.setCellStyle(lineStyle);
lineCell4.setCellValue(String.valueOf(map.get("materialName")).equals("null")?"":String.valueOf(map.get("materialName")) );
lineCell4.setCellStyle(lineStyle);
lineCell5.setCellValue(String.valueOf(map.get("unit")).equals("null")?"":String.valueOf(map.get("unit")) );
lineCell5.setCellStyle(lineStyle);
lineCell6.setCellValue( String.valueOf(map.get("grossWeight")).equals("null")?"":String.valueOf(map.get("grossWeight")) );
lineCell6.setCellStyle(lineStyle);
lineCell7.setCellValue( String.valueOf(map.get("tareWeight")).equals("null")?"":String.valueOf(map.get("tareWeight")));
lineCell7.setCellStyle(lineStyle);
lineCell8.setCellValue( String.valueOf(map.get("buckleWeight")).equals("null")?"":String.valueOf(map.get("buckleWeight")) );
lineCell8.setCellStyle(lineStyle);
lineCell9.setCellValue( String.valueOf(map.get("settlement")).equals("null")?"":String.valueOf(map.get("settlement")));
lineCell9.setCellStyle(lineStyle);
String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement"));
sum=sum.add(new BigDecimal(s));
// log.warn(sum.toPlainString());
// log.warn(s);
// log.warn(sum.toString());
if (i==list.size()-1){
//使用 createRow() 方法创建第 0 行
HSSFRow rowhead = sheet.createRow(( short ) 0 );
// 使用 createCell() 方法创建单元格,并使用 setCellValue() 方法为单元格设置值
HSSFCell cell = rowhead.createCell(0);
log.warn(map.toString());
String s1 = String.valueOf(map.get("supplierNm")).equals("null") ? "" : String.valueOf(map.get("supplierNm"));
if (s1.equals("")){
for (int i1 = 0; i1 < list.size(); i1++) {
HashMap<String, Object> map1 = list.get(i1);
if (!String.valueOf(map1.get("supplierNm")).equals("null")){
s1 =String.valueOf(map1.get("supplierNm"));
}
}
}
String s2 = String.valueOf(map.get("supplierName")).equals("null") ? "" : String.valueOf(map.get("supplierName"));
if(s2.equals("")){
for (int i1 = 0; i1 < list.size(); i1++) {
HashMap<String, Object> map1 = list.get(i1);
if (!String.valueOf(map1.get("supplierName")).equals("null")){
s2 =String.valueOf(map1.get("supplierName"));
}
}
}
cell.setCellValue(s1+"收货明细表");
cell.setCellStyle(cellStyle);
//创建第一行
HSSFRow row = sheet.createRow((short) 1 );
//在第一行插入数据
HSSFCell cell1 = row.createCell(0);
cell1.setCellValue( "供货单位:"+s2+" 收货单位:" );
cell1.setCellStyle(headStyle);
//创建第二行
HSSFRow row1 = sheet.createRow((short) 2 );
//在第二行插入数据
HSSFCell cell2 = row1.createCell(0);
HSSFCell cell3 = row1.createCell(1);
HSSFCell cell4 = row1.createCell(2);
HSSFCell cell5 = row1.createCell(3);
HSSFCell cell6 = row1.createCell(4);
HSSFCell cell7 = row1.createCell(5);
HSSFCell cell8 = row1.createCell(6);
HSSFCell cell9 = row1.createCell(7);
HSSFCell cell10 = row1.createCell(8);
cell2.setCellValue( "序号" );
cell2.setCellStyle(headLineStyle);
cell3.setCellValue( "收货日期" );
cell3.setCellStyle(headLineStyle);
cell4.setCellValue( "送货车号" );
cell4.setCellStyle(headLineStyle);
cell5.setCellValue( "货物" );
cell5.setCellStyle(headLineStyle);
cell6.setCellValue( "单位" );
cell6.setCellStyle(headLineStyle);
cell7.setCellValue( "毛重" );
cell7.setCellStyle(headLineStyle);
cell8.setCellValue( "皮重" );
cell8.setCellStyle(headLineStyle);
cell9.setCellValue( "扣重" );
cell9.setCellStyle(headLineStyle);
cell10.setCellValue( "结算重量" );
cell10.setCellStyle(headLineStyle);
HSSFRow lowRow = sheet.createRow((short) i+4 );
HSSFCell lowCell1 = lowRow.createCell(0);
HSSFCell lowCell2 = lowRow.createCell(8);
lowCell1.setCellValue("合计");
lowCell1.setCellStyle(lineStyle);
sum.setScale(2,BigDecimal.ROUND_DOWN);
lowCell2.setCellValue(sum.toString());
lowCell2.setCellStyle(lineStyle);
lowRow.createCell(1).setCellStyle(lineStyle);
lowRow.createCell(2).setCellStyle(lineStyle);
lowRow.createCell(3).setCellStyle(lineStyle);
lowRow.createCell(4).setCellStyle(lineStyle);
lowRow.createCell(5).setCellStyle(lineStyle);
lowRow.createCell(6).setCellStyle(lineStyle);
lowRow.createCell(7).setCellStyle(lineStyle);
}
}
}
sheet.autoSizeColumn(0);
sheet.autoSizeColumn(1);
sheet.autoSizeColumn(2);
sheet.autoSizeColumn(3);
sheet.autoSizeColumn(4);
sheet.autoSizeColumn(5);
sheet.autoSizeColumn(6);
sheet.autoSizeColumn(7);
sheet.autoSizeColumn(8);
sheet.setAutobreaks(true);//这个是sheet缩放设置默认打印一页要true
sheet.setMargin(Sheet.BottomMargin,( double ) 0.5 );// 页边距(下)
sheet.setMargin(Sheet.LeftMargin,( double ) 0.1 );// 页边距(左)
sheet.setMargin(Sheet.RightMargin,( double ) 0.1 );// 页边距(右)
sheet.setMargin(Sheet.TopMargin,( double ) 0.5 );// 页边距(上)
sheet.setHorizontallyCenter(true);//设置打印页面为水平居中
sheet.setVerticallyCenter(true);//设置打印页面为垂直居中
//使用POI输出Excel时打印页面
//启用“适合页面”打印选项的标志。(默认选择的是“将工作表调整为一页”)
sheet.setFitToPage(true);
HSSFPrintSetup printSetup = sheet.getPrintSetup();
printSetup.setLandscape(false); // 打印方向true横向false纵向
printSetup.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE); //纸张大小自选A4 作者:大萌音音 https://www.bilibili.com/read/cv15053559 出处bilibili
workbook.write(fileOut);
}finally {
//关闭流
fileOut.close();
//关闭工作簿
workbook.close();
}
//在控制台打印消息
log.warn( "Excel文件生成成功。" );
}
/**
*
* @param wrapper
* @param templateFilePath
* @throws Exception
*/
public void getPdf(LambdaQueryWrapper<PurchaseorderitemEntity> wrapper,String templateFilePath) throws Exception{
for (HashMap<String, Object> orderMap : purchaseorderitemMapper.getPdfInfo(wrapper)) {
byte[] bytes = null;
HttpHeaders headers = null;
ByteArrayOutputStream out=null;
ExportPdf exportPdf = new ExportPdf();
//渲染模板参数
// pdf模板
Map map=orderMap;
//
map.put("title","济钢城市矿产科技有限公司");
map.put("name", "城市矿产再生资源事业部");
List<HashMap<String,Object>> reportList = (List<HashMap<String,Object>>) map.get("reportList");
if (reportList!=null){
Integer settlement=0;
BigDecimal settlementSum = new BigDecimal(settlement);
Integer amount=0;
BigDecimal amountSum = new BigDecimal(amount);
BigDecimal decimal = new BigDecimal("0.00");
for (int i = 0; i < reportList.size(); i++) {
HashMap<String, Object> map1 = reportList.get(i);
settlementSum=settlementSum.add( map1.get("settlement")!=null?(BigDecimal)map1.get("settlement"):decimal) ;
amountSum=amountSum.add( map1.get("amount")!=null?(BigDecimal)map1.get("amount"):decimal) ;
}
map.put("settlementSum",settlementSum);
map.put("amountSum",amountSum);
}
// word模板
out = exportPdf.createPdf(map, "test.ftl", "/templates/export");
bytes = out.toByteArray();
String fileName="废钢采购订单("+map.get("supplierName")+").pdf";
// fileName = URLEncoder.encode(fileName, "utf-8");
// 存在本地文件中
InputStream inputStream = new ByteArrayInputStream(bytes);
MultipartFile file = new MultipartFileDto(ContentType.APPLICATION_OCTET_STREAM.toString(), inputStream);
// FileUtil.upFile(file, templateFilePath+"/wc/", fileName);
File f = new File(templateFilePath, fileName);
//将上传的文件存储到指定位置
file.transferTo(f);
inputStream.close();
}
}
/**
*@TODO word
* @param list word
* @param templateFilePath
* @throws Exception
*/
public void getWord(List<HashMap<String,Object>> list ,String templateFilePath) throws Exception{
// 创建一个新的word文件
Document document = new Document();
Section section = document.addSection();
String titleStr="";
// ExcelExportUtil;
// WordUtil.getWriter().
ParagraphStyle style = new ParagraphStyle(document);
style.setName("titleStyle");
style.getCharacterFormat().setBold(true);
style.getCharacterFormat().setTextColor(Color.BLUE);
style.getCharacterFormat().setFontName("Arial");
style.getCharacterFormat().setFontSize(22f);
document.getStyles().add(style);
ParagraphStyle style2 = new ParagraphStyle(document);
style2.setName("paraStyle");
style2.getCharacterFormat().setFontName("Arial");
style2.getCharacterFormat().setFontSize(18f);
document.getStyles().add(style2);
if (list!=null&&list.size()>0){
for (int i = 0; i < list.size(); i++) {
HashMap<String, Object> map = list.get(i);
if (i==0){
Paragraph title = section.addParagraph();
title.appendText(String.valueOf(map.get("supplierName")+"榜单图片"));
titleStr=String.valueOf(map.get("supplierName"));
title.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
title.applyStyle("titleStyle");
continue;
}
List<Map<String, Object>> imgList = FileCopy.getImageInfo(String.valueOf(map.get("poundPictures")));
if (imgList!=null&&imgList.size()>0){
for (int i1 = 0; i1 < imgList.size(); i1++) {
Map<String, Object> map1 = imgList.get(i1);
log.warn("路径"+(String)map1.get("filePath"));
// 添加一个段落
Paragraph paragraph1 = section.addParagraph();
paragraph1.appendText(String.valueOf(map.get("supplierNm")));
paragraph1.applyStyle("paraStyle");
Paragraph paragraph = section.addParagraph();
DocPicture pic = paragraph.appendPicture((String) map1.get("filePath"));
int picHeight = 300;
int picWidth=250;
Integer width = null;
Integer height = null;
if (map1.get("width")!=null){
width= Integer.valueOf(String.valueOf(map1.get("width")));
}
if (map1.get("height")!=null){
height= Integer.valueOf(String.valueOf(map1.get("height")));
}
if (width!=null&&height!=null){
picWidth= picHeight * width/height;
}
pic.setWidth(picWidth);
pic.setHeight(picHeight);
}
}
}
//生成word文档
document.saveToFile(templateFilePath+"废钢收获榜单照片("+titleStr+")).docx", FileFormat.Docx_2013);
document.close();
}
}
@Override
public ResponseEntity<byte[]> getPdfInfo(){
public void getPdfInfo(PurchaseorderitemEntity purchaseorderitemEntity,HttpServletResponse response) throws Exception {
// 临时文件夹地址
String templateFilePath = configValueUtil.getTemplateFilePath()+"info\\";
FileCopy.createFile(templateFilePath);
LambdaQueryWrapper<PurchaseorderitemEntity> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(PurchaseorderitemEntity::getDocumentNo,"cgdj2023020300000001");
wrapper.eq(PurchaseorderitemEntity::getDocumentNo,purchaseorderitemEntity.getDocumentNo());
this.getPdf(wrapper,templateFilePath);
List<HashMap<String, Object>> info = purchaseorderitemMapper.getWordExcelInfo(wrapper);
List<HashMap<String, Object>> vehicleInfo = purchaseorderitemMapper.getVehicleInfo(wrapper);
this.getWord(info,templateFilePath);
this.getExcel(info,templateFilePath);
this.getVehicle(vehicleInfo,templateFilePath);
this.getZIP(templateFilePath,response);
}
public ResponseEntity<byte[]> getPdfInfoo() throws Exception {
// 临时文件夹地址
String templateFilePath = configValueUtil.getTemplateFilePath()+"/wc/";
PurchaseorderPagination pagination = new PurchaseorderPagination();
pagination.setDocumentNo("cgdj2023020300000001");
List<PurchaseOrderVO> pMap = this.getPMap(pagination);
if (pMap!=null&&pMap.size()>0){
PurchaseOrderVO pVO = pMap.get(0);
// 榜单图片地址
// 榜单图片传输到指定文件夹
byte[] bytes = null;
HttpHeaders headers = null;
ByteArrayOutputStream out=null;
try {
ExportPdf exportPdf = new ExportPdf();
//渲染模板参数
// pdf模板
Map map=new HashMap();
// 多个榜单的图片信息
ArrayList<HashMap<String,Object>> imgList = new ArrayList<>();
// word模板
HashMap wordHashMap = new HashMap();
map.put("title","济钢城市矿产科技有限公司");
map.put("name", "城市矿产再生资源事业部");
map.put("creatorTime", pVO.getCreatorTime());
@ -99,26 +524,91 @@ if (pMap!=null&&pMap.size()>0){
map.put("contractCode",pVO.getContractCode());
map.put("supplierName", pVO.getSupplierName());
map.put("documentNo",pVO.getDocumentNo());
List<Purchaseorder_item0Model> list = pVO.getPurchaseorder_item0List();
List<PurchaseorderItemModelVO> list = pVO.getPurchaseorder_item0List();
Integer settlement=0;
BigDecimal settlementSum = new BigDecimal(settlement);
Integer amount=0;
BigDecimal amountSum = new BigDecimal(amount);
for (int i = 0; i < list.size(); i++) {
Purchaseorder_item0Model model = list.get(i);
settlementSum=settlementSum.add(new BigDecimal(model.getSettlement())) ;
amountSum=amountSum.add(new BigDecimal(model.getAmount()));
HashMap<String, Object> imgMap = new HashMap<>();
PurchaseorderItemModelVO model = list.get(i);
// log.warn("报错点"+model.getAmount());
// log.warn("报错点"+model.getAmount().isEmpty());
// log.warn("报错点"+model.getAmount().equals("null"));
settlementSum=settlementSum.add(new BigDecimal(model.getSettlement()==null?"0.00000000":model.getSettlement())) ;
amountSum=amountSum.add(new BigDecimal(model.getAmount()==null?"0.00000000":model.getAmount()));
model.setSettlement(new BigDecimal(model.getSettlement()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString());
model.setPrice(new BigDecimal(model.getPrice()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString());
model.setAmount(new BigDecimal(model.getAmount()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString());
model.setAmount(new BigDecimal(model.getAmount()==null?"0.00000000":model.getAmount()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString());
// 客户名称
String supplierNm = model.getSupplierNm();
imgMap.put("supplierNm",supplierNm);
// 车辆图片地址
String vehiclePictures = model.getVehiclePictures();
// 榜单图片地址
String pictures = model.getPoundPictures();
imgMap.put("pictures",FileCopy.getImageInfo(pictures));
imgList.add(imgMap);
}
wordHashMap.put("imgList",imgList);
// log.warn(wordHashMap.toString());
// String word = new ExportPdf().createWord(wordHashMap, "doc.ftl");
// FileUtils.write(new File(templateFilePath+"file.doc"), word.toString(),"UTF-8");
// 创建一个新的word文件
Document document = new Document();
Section section = document.addSection();
Paragraph title = section.addParagraph();
title.appendText(String.valueOf(map.get("supplierName")+"榜单图片"));
ParagraphStyle style = new ParagraphStyle(document);
style.setName("titleStyle");
style.getCharacterFormat().setBold(true);
style.getCharacterFormat().setTextColor(Color.BLUE);
style.getCharacterFormat().setFontName("Arial");
style.getCharacterFormat().setFontSize(22f);
title.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
document.getStyles().add(style);
title.applyStyle("titleStyle");
ParagraphStyle style2 = new ParagraphStyle(document);
style2.setName("paraStyle");
style2.getCharacterFormat().setFontName("Arial");
style2.getCharacterFormat().setFontSize(18f);
document.getStyles().add(style2);
List<Map<String,Object>> pictures =( List<Map<String,Object>>) wordHashMap.get("imgList");
for (int i = 0; i < pictures.size(); i++) {
Map<String, Object> map1 = pictures.get(i);
if (map1.get("pictures")!=null){
List<Map<String,Object>> pictures1 = ( List<Map<String,Object>>) map1.get("pictures");
for (int i1 = 0; i1 < pictures1.size(); i1++) {
Map<String, Object> map2 = pictures1.get(i1);
if(map2.get("filePath")!=null&&!String.valueOf(map2.get("filePath")).equals("null")){
log.warn("路径"+(String)map2.get("filePath"));
// 添加一个段落
Paragraph paragraph1 = section.addParagraph();
paragraph1.appendText(String.valueOf(map1.get("supplierNm")));
paragraph1.applyStyle("paraStyle");
Paragraph paragraph = section.addParagraph();
DocPicture pic = paragraph.appendPicture((String) map2.get("filePath"));
if (map2.get("width")!=null){
pic.setWidth(Float.valueOf(String.valueOf(map2.get("width")+"f")));
}
if (map2.get("height")!=null){
pic.setHeight(Float.valueOf(String.valueOf(map2.get("height")+"f")));
}
}
}
}
}
//生成word文档
document.saveToFile(templateFilePath+"doc.docx", FileFormat.Docx_2013);
map.put("settlementSum",settlementSum.setScale(2,BigDecimal.ROUND_HALF_DOWN).toString());
map.put("amountSum",amountSum.setScale(2,BigDecimal.ROUND_HALF_DOWN).toString() );
map.put("reportList", list);
System.out.println(map.toString());
System.out.println("AAAAAAAAAAAAAAAAAAAAAA ");
// System.out.println(map.toString());
// System.out.println("AAAAAAAAAAAAAAAAAAAAAA ");
//repotData自己加测试数据
out = exportPdf.createPdf(map, "test.ftl", "/templates/export");
@ -132,10 +622,10 @@ if (pMap!=null&&pMap.size()>0){
InputStream inputStream = new ByteArrayInputStream(bytes);
MultipartFile file = new MultipartFileDto(ContentType.APPLICATION_OCTET_STREAM.toString(), inputStream);
String templateFilePath = configValueUtil.getTemplateFilePath();
// FileUtil.upFile(file, templateFilePath+"/wc/", fileName);
try {
File f = new File(templateFilePath+"/wc/", fileName);
File f = new File(templateFilePath, fileName);
//将上传的文件存储到指定位置
file.transferTo(f);
}catch (Exception e){
@ -548,6 +1038,108 @@ if (pMap!=null&&pMap.size()>0){
return collectionpoService.list(queryWrapper);
}
@Override
public void getVehicle(List<HashMap<String, Object>> vehicleInfo, String templateFilePath) throws Exception {
BufferedInputStream input = null;
BufferedOutputStream out = null;
try{
if (vehicleInfo!=null&&vehicleInfo.size()>0){
for (int i = 0; i < vehicleInfo.size(); i++) {
HashMap<String, Object> map = vehicleInfo.get(i);
List<Map<String, Object>> list = FileCopy.getImageInfo(String.valueOf(map.get("vehiclePictures")).equals("null") ? "null" : String.valueOf(map.get("vehiclePictures")));
if (list!=null&&list.size()>0){
for (int i1 = 0; i1 < list.size(); i1++) {
Map<String, Object> stringObjectMap = list.get(i1);
if (!String.valueOf(stringObjectMap.get("filePath")).equals("null")){
String s = String.valueOf(stringObjectMap.get("filePath"));
File vehicleImg = new File(s);
String s2 = String.valueOf(map.get("ticketNo")).equals("null")?"":String.valueOf(map.get("ticketNo"));
String s3 = String.valueOf(map.get("drivername")).equals("null")?"":String.valueOf(map.get("drivername"));
String s4 = String.valueOf(map.get("contact")).equals("null")?"":String.valueOf(map.get("contact"));
String s1 = String.valueOf( i+"-"+s2+s3 + s4);
File outImg = new File(templateFilePath+"vehicle\\"+s1+"\\"+ UUID.randomUUID().toString().replaceAll("-", "")+".png");
File parentFile = outImg.getParentFile();
if (!parentFile.exists()){
parentFile.mkdirs();
}
log.warn(templateFilePath+s1+"\\"+"vehicle\\"+ UUID.randomUUID().toString().replaceAll("-", "")+".png");
if (vehicleImg.exists()){
input = new BufferedInputStream(new FileInputStream(vehicleImg));
out = new BufferedOutputStream(new FileOutputStream(outImg));
byte[] bys = new byte[1024];
int len = 0;
while ((len = input.read(bys)) != -1)
{
out.write(bys, 0, len);
}
}
}
}
}
}
}
}finally {
input.close();
out.close();
}
}
@Override
public void getZIP(String templateFilePath, HttpServletResponse response) throws Exception {
OutputStream toClient = null;
String s=null;
File file1=null;
try {
file1 = new File(templateFilePath );
if (!file1.exists()){
file1.mkdirs();
}
//生成zip文件
ZipUtil.zip(templateFilePath);
// ZipUtil.zip(templateFilePath);
//TODO 将压缩包流返回
s = templateFilePath.substring(0,templateFilePath.lastIndexOf("\\"))+".zip";
String url = s;
log.warn(url);
File file = new File(url);
InputStream fis = new BufferedInputStream(new FileInputStream(file));
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
fis.close();
response.reset();
String excelTitle = "历史数据";
String fileName = URLEncoder.encode(excelTitle, "UTF-8").replaceAll("\\+", "%20");
// 设置response的Header
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".zip");
response.setContentType("application/x-download;charset=utf-8");
toClient = new BufferedOutputStream(response.getOutputStream());
toClient.write(buffer);
toClient.flush();
//删除文件夹下文件
// FileUtil.deleteFile(templateFilePath);
}finally {
if (toClient!=null){
toClient.close();
}
if (s!=null){
FileUtil.deleteFileAll(file1);
FileUtil.deleteFile(s);
}
}
}
//列表子表数据方法

@ -15,7 +15,8 @@
<result property="supplierName" column="supplierName"/>
<!-- 订单号 -->
<result property="documentNo" column="documentNo"/>
<collection property="purchaseorder_item0List" javaType="List" ofType="jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model">
<collection property="purchaseorder_item0List" javaType="List" ofType="jnpf.mobilePort.entity.PurchaseorderItemModelVO">
<!-- `物料名称、规格型号`-->
<result property="materialName" column="materialName"/>
<!-- 税率-->
@ -28,9 +29,46 @@
<result property="unit" column="unit1"/>
<!-- 金额-->
<result property="amount" column="amount1"/>
<!-- 榜单图片地址 -->
<result property="poundPictures" column="poundPictures"/>
<!-- 车辆图片地址-->
<result property="vehiclePictures" column="vehiclePictures"/>
<!-- 客户名称-->
<result property="supplierNm" column="supplier_nm"/>
</collection>
</resultMap>
<resultMap id="resultPdfInfoMap" type="java.util.HashMap" >
<!-- 制单人 -->
<result property="creatorUserName" column="creatorUserName"/>
<!-- 订单日期 -->
<result property="creatorTime" column="creatorTime"/>
<!-- 对方合同号-->
<result property="contractNo" column="contractNo"/>
<!-- 合同编码-->
<result property="contractCode" column="contractCode"/>
<!-- 供货 单位-->
<result property="supplierName" column="supplierName"/>
<!-- 订单号 -->
<result property="documentNo" column="documentNo"/>
<collection property="reportList" javaType="List" ofType="java.util.HashMap">
<!-- `物料名称、规格型号`-->
<result property="itemName" column="itemName"/>
<!-- 税率-->
<result property="rate" column="rate"/>
<!-- 单价-->
<result property="price" column="price"/>
<!-- 数量-->
<result property="settlement" column="settlement"/>
<!-- 单位-->
<result property="unit" column="unit"/>
<!-- 金额-->
<result property="amount" column="amount"/>
</collection>
</resultMap>
<select id="getPurchorderItemMap" resultMap="purchorderItemMap">
SELECT
*
@ -63,15 +101,169 @@
AVG( b.price ) AS `price1`,
SUM( b.settlement ) AS `settlement1`,
( CASE b.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit1`,
SUM( b.amount ) `amount1`
SUM( b.amount ) `amount1`,
b.pound_pictures poundPictures,
c.vehicle_pictures vehiclePictures,
d.supplier_nm,
c.pound_date 收货日期,
e.ticketno 送货车号,
c.gross_weight 毛重,
c.tare_weight 皮重,
c.buckle_weight 扣重,
c.settlement 结算重量
FROM
jg_purchaseorder AS a
LEFT JOIN jg_purchaseorder_item0 AS b ON a.id = b.purchaseorder_id
AND (
b.delete_mark != '1'
OR ISNULL( b.delete_mark ))
LEFT JOIN jg_poundlist AS c ON b.poundlist_id = c.id
AND (
c.delete_mark != '1'
OR ISNULL( c.delete_mark ))
AND (
( c.pound_status != '1' AND c.pound_status != '2' )
OR ISNULL( c.pound_status ))
LEFT JOIN jg_customer AS d ON c.customer_id = d.id
AND (
d.delete_mark != '1'
OR ISNULL( d.delete_mark ))
LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id
GROUP BY
b.material_name,
b.rate,
b.unit,
a.id
) aaa ${ew.customSqlSegment}
</select>
<select id="getPdfInfo" resultMap="resultPdfInfoMap">
SELECT
*
FROM
(
SELECT
a.DOCUMENT_NO,
a.creator_user_name AS `creatorUserName`,
DATE_FORMAT(a.creator_time,'%Y-%m-%d') AS `creatorTime`,
a.contract_no AS `contractNo`,
a.contract_code AS `contractCode`,
a.supplier_name AS `supplierName`,
a.document_no AS `documentNo`,
c.item_name AS `itemName`,
(
CASE
b.rate
WHEN '0' THEN
13
WHEN '1' THEN
9
WHEN '2' THEN
6
WHEN '3' THEN
5
WHEN '4' THEN
3 ELSE b.unit
END
) AS `rate`,
ROUND( AVG( b.price ), 2 ) AS `price`,
ROUND( SUM( b.settlement ), 2 ) AS `settlement`,
( CASE b.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit`,
ROUND( SUM( b.amount ), 2 ) `amount`
FROM
jg_purchaseorder AS a
LEFT JOIN jg_purchaseorder_item0 AS b ON a.id = b.purchaseorder_id
AND (
b.delete_mark != '1'
OR ISNULL( b.delete_mark ))
LEFT JOIN jg_material c ON b.material_id = c.id
GROUP BY
b.material_id,
b.rate,
b.unit
) aaa ${ew.customSqlSegment}
</select>
<resultMap id="resultWordExcelMap" type="java.util.HashMap">
<!-- 供货商 -->
<result property="supplierName" column="supplierName"/>
<!-- 物料名称 -->
<result property="materialName" column="materialName"/>
<!-- 车辆图片-->
<result property="vehiclePictures" column="vehiclePictures"/>
<!-- 榜单图片-->
<result property="poundPictures" column="poundPictures"/>
<!-- 客户-->
<result property="supplierNm" column="supplier_nm"/>
<!-- 收货日期-->
<result property="poundDate" column="pound_date"/>
<!-- 送货车号 -->
<result property="ticketNo" column="ticketNo"/>
<!-- 毛重 -->
<result property="grossWeight" column="grossWeight"/>
<!-- 皮重 -->
<result property="tareWeight" column="tareWeight"/>
<!-- 扣重 -->
<result property="buckleWeight" column="buckleWeight"/>
<!-- 结算重量 -->
<result property="settlement" column="settlement"/>
<!-- 单位-->
<result property="unit" column="unit"/>
</resultMap>
<select id="getWordExcelInfo" resultMap="resultWordExcelMap">
SELECT
*
FROM
(
SELECT
a.document_no,
a.supplier_name AS `supplierName`,
f.item_name AS `materialName`,
c.vehicle_pictures vehiclePictures,
c.pound_pictures poundPictures,
d.supplier_nm supplier_nm,
c.pound_date pound_date,
e.ticketno ticketNo,
ROUND(c.gross_weight,2) grossWeight,
ROUND(c.tare_weight,2) tareWeight,
ROUND(c.buckle_weight,2) buckleWeight,
ROUND(c.settlement,2) settlement,
( CASE b.unit WHEN 0 THEN '吨' ELSE '千克' END ) AS `unit`
FROM
jg_purchaseorder AS a
LEFT JOIN jg_purchaseorder_item0 AS b ON a.id = b.purchaseorder_id
AND (
b.delete_mark != '1'
OR ISNULL( b.delete_mark ))
LEFT JOIN jg_material f ON b.material_id = f.id
LEFT JOIN jg_poundlist AS c ON b.poundlist_id = c.id
LEFT JOIN jg_customer AS d ON c.customer_id = d.id
LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id
) aaa ${ew.customSqlSegment}
</select>
<select id="getVehicleInfo" resultType="hashMap">
SELECT
*
FROM
(
SELECT
a.document_no,
c.vehicle_pictures vehiclePictures,
c.pound_date pound_date,
e.ticketno ticketNo ,
e.contact,
e.drivername
FROM
jg_purchaseorder AS a
LEFT JOIN jg_purchaseorder_item0 AS b ON a.id = b.purchaseorder_id
AND (
b.delete_mark != '1'
OR ISNULL( b.delete_mark ))
LEFT JOIN jg_material f ON b.material_id = f.id
LEFT JOIN jg_poundlist AS c ON b.poundlist_id = c.id
LEFT JOIN jg_vehicle e ON c.vehicle_id = e.id
) aaa ${ew.customSqlSegment}
</select>
</mapper>

@ -0,0 +1,647 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:cr="http://schemas.microsoft.com/office/comments/2020/reactions"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:oel="http://schemas.microsoft.com/office/2019/extlst"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xml:space="preserve">
<w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/>
<o:DocumentProperties>
<o:LastAuthor>王闯</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>0</o:TotalTime>
<o:Created>2023-02-23T08:45:00Z</o:Created>
<o:LastSaved>2023-02-23T08:45:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>9</o:Words>
<o:Characters>57</o:Characters>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>65</o:CharactersWithSpaces>
<o:Version>16</o:Version>
</o:DocumentProperties>
<w:fonts>
<w:defaultFonts w:ascii="Times New Roman" w:fareast="等线" w:h-ansi="Times New Roman" w:cs="Times New Roman"/>
<w:font w:name="Times New Roman">
<w:panose-1 w:val="02020603050405020304"/>
<w:charset w:val="00"/>
<w:family w:val="Roman"/>
<w:pitch w:val="variable"/>
<w:sig w:usb-0="E0002EFF" w:usb-1="C000785B" w:usb-2="00000009" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/>
</w:font>
<w:font w:name="Cambria Math">
<w:panose-1 w:val="02040503050406030204"/>
<w:charset w:val="00"/>
<w:family w:val="Roman"/>
<w:pitch w:val="variable"/>
<w:sig w:usb-0="00000003" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000001" w:csb-1="00000000"/>
</w:font>
<w:font w:name="等线">
<w:altName w:val="DengXian"/>
<w:panose-1 w:val="02010600030101010101"/>
<w:charset w:val="86"/>
<w:family w:val="auto"/>
<w:pitch w:val="variable"/>
<w:sig w:usb-0="A00002BF" w:usb-1="38CF7CFA" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004000F" w:csb-1="00000000"/>
</w:font>
<w:font w:name="@等线">
<w:panose-1 w:val="02010600030101010101"/>
<w:charset w:val="86"/>
<w:family w:val="auto"/>
<w:pitch w:val="variable"/>
<w:sig w:usb-0="A00002BF" w:usb-1="38CF7CFA" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="0004000F" w:csb-1="00000000"/>
</w:font>
</w:fonts>
<w:styles>
<w:versionOfBuiltInStylenames w:val="7"/>
<w:latentStyles w:defLockedState="off" w:latentStyleCount="376">
<w:lsdException w:name="Normal"/>
<w:lsdException w:name="heading 1"/>
<w:lsdException w:name="heading 2"/>
<w:lsdException w:name="heading 3"/>
<w:lsdException w:name="heading 4"/>
<w:lsdException w:name="heading 5"/>
<w:lsdException w:name="heading 6"/>
<w:lsdException w:name="heading 7"/>
<w:lsdException w:name="heading 8"/>
<w:lsdException w:name="heading 9"/>
<w:lsdException w:name="index 1"/>
<w:lsdException w:name="index 2"/>
<w:lsdException w:name="index 3"/>
<w:lsdException w:name="index 4"/>
<w:lsdException w:name="index 5"/>
<w:lsdException w:name="index 6"/>
<w:lsdException w:name="index 7"/>
<w:lsdException w:name="index 8"/>
<w:lsdException w:name="index 9"/>
<w:lsdException w:name="toc 1"/>
<w:lsdException w:name="toc 2"/>
<w:lsdException w:name="toc 3"/>
<w:lsdException w:name="toc 4"/>
<w:lsdException w:name="toc 5"/>
<w:lsdException w:name="toc 6"/>
<w:lsdException w:name="toc 7"/>
<w:lsdException w:name="toc 8"/>
<w:lsdException w:name="toc 9"/>
<w:lsdException w:name="Normal Indent"/>
<w:lsdException w:name="footnote text"/>
<w:lsdException w:name="annotation text"/>
<w:lsdException w:name="header"/>
<w:lsdException w:name="footer"/>
<w:lsdException w:name="index heading"/>
<w:lsdException w:name="caption"/>
<w:lsdException w:name="table of figures"/>
<w:lsdException w:name="envelope address"/>
<w:lsdException w:name="envelope return"/>
<w:lsdException w:name="footnote reference"/>
<w:lsdException w:name="annotation reference"/>
<w:lsdException w:name="line number"/>
<w:lsdException w:name="page number"/>
<w:lsdException w:name="endnote reference"/>
<w:lsdException w:name="endnote text"/>
<w:lsdException w:name="table of authorities"/>
<w:lsdException w:name="macro"/>
<w:lsdException w:name="toa heading"/>
<w:lsdException w:name="List"/>
<w:lsdException w:name="List Bullet"/>
<w:lsdException w:name="List Number"/>
<w:lsdException w:name="List 2"/>
<w:lsdException w:name="List 3"/>
<w:lsdException w:name="List 4"/>
<w:lsdException w:name="List 5"/>
<w:lsdException w:name="List Bullet 2"/>
<w:lsdException w:name="List Bullet 3"/>
<w:lsdException w:name="List Bullet 4"/>
<w:lsdException w:name="List Bullet 5"/>
<w:lsdException w:name="List Number 2"/>
<w:lsdException w:name="List Number 3"/>
<w:lsdException w:name="List Number 4"/>
<w:lsdException w:name="List Number 5"/>
<w:lsdException w:name="Title"/>
<w:lsdException w:name="Closing"/>
<w:lsdException w:name="Signature"/>
<w:lsdException w:name="Default Paragraph Font"/>
<w:lsdException w:name="Body Text"/>
<w:lsdException w:name="Body Text Indent"/>
<w:lsdException w:name="List Continue"/>
<w:lsdException w:name="List Continue 2"/>
<w:lsdException w:name="List Continue 3"/>
<w:lsdException w:name="List Continue 4"/>
<w:lsdException w:name="List Continue 5"/>
<w:lsdException w:name="Message Header"/>
<w:lsdException w:name="Subtitle"/>
<w:lsdException w:name="Salutation"/>
<w:lsdException w:name="Date"/>
<w:lsdException w:name="Body Text First Indent"/>
<w:lsdException w:name="Body Text First Indent 2"/>
<w:lsdException w:name="Note Heading"/>
<w:lsdException w:name="Body Text 2"/>
<w:lsdException w:name="Body Text 3"/>
<w:lsdException w:name="Body Text Indent 2"/>
<w:lsdException w:name="Body Text Indent 3"/>
<w:lsdException w:name="Block Text"/>
<w:lsdException w:name="Hyperlink"/>
<w:lsdException w:name="FollowedHyperlink"/>
<w:lsdException w:name="Strong"/>
<w:lsdException w:name="Emphasis"/>
<w:lsdException w:name="Document Map"/>
<w:lsdException w:name="Plain Text"/>
<w:lsdException w:name="E-mail Signature"/>
<w:lsdException w:name="HTML Top of Form"/>
<w:lsdException w:name="HTML Bottom of Form"/>
<w:lsdException w:name="Normal (Web)"/>
<w:lsdException w:name="HTML Acronym"/>
<w:lsdException w:name="HTML Address"/>
<w:lsdException w:name="HTML Cite"/>
<w:lsdException w:name="HTML Code"/>
<w:lsdException w:name="HTML Definition"/>
<w:lsdException w:name="HTML Keyboard"/>
<w:lsdException w:name="HTML Preformatted"/>
<w:lsdException w:name="HTML Sample"/>
<w:lsdException w:name="HTML Typewriter"/>
<w:lsdException w:name="HTML Variable"/>
<w:lsdException w:name="Normal Table"/>
<w:lsdException w:name="annotation subject"/>
<w:lsdException w:name="No List"/>
<w:lsdException w:name="Outline List 1"/>
<w:lsdException w:name="Outline List 2"/>
<w:lsdException w:name="Outline List 3"/>
<w:lsdException w:name="Table Simple 1"/>
<w:lsdException w:name="Table Simple 2"/>
<w:lsdException w:name="Table Simple 3"/>
<w:lsdException w:name="Table Classic 1"/>
<w:lsdException w:name="Table Classic 2"/>
<w:lsdException w:name="Table Classic 3"/>
<w:lsdException w:name="Table Classic 4"/>
<w:lsdException w:name="Table Colorful 1"/>
<w:lsdException w:name="Table Colorful 2"/>
<w:lsdException w:name="Table Colorful 3"/>
<w:lsdException w:name="Table Columns 1"/>
<w:lsdException w:name="Table Columns 2"/>
<w:lsdException w:name="Table Columns 3"/>
<w:lsdException w:name="Table Columns 4"/>
<w:lsdException w:name="Table Columns 5"/>
<w:lsdException w:name="Table Grid 1"/>
<w:lsdException w:name="Table Grid 2"/>
<w:lsdException w:name="Table Grid 3"/>
<w:lsdException w:name="Table Grid 4"/>
<w:lsdException w:name="Table Grid 5"/>
<w:lsdException w:name="Table Grid 6"/>
<w:lsdException w:name="Table Grid 7"/>
<w:lsdException w:name="Table Grid 8"/>
<w:lsdException w:name="Table List 1"/>
<w:lsdException w:name="Table List 2"/>
<w:lsdException w:name="Table List 3"/>
<w:lsdException w:name="Table List 4"/>
<w:lsdException w:name="Table List 5"/>
<w:lsdException w:name="Table List 6"/>
<w:lsdException w:name="Table List 7"/>
<w:lsdException w:name="Table List 8"/>
<w:lsdException w:name="Table 3D effects 1"/>
<w:lsdException w:name="Table 3D effects 2"/>
<w:lsdException w:name="Table 3D effects 3"/>
<w:lsdException w:name="Table Contemporary"/>
<w:lsdException w:name="Table Elegant"/>
<w:lsdException w:name="Table Professional"/>
<w:lsdException w:name="Table Subtle 1"/>
<w:lsdException w:name="Table Subtle 2"/>
<w:lsdException w:name="Table Web 1"/>
<w:lsdException w:name="Table Web 2"/>
<w:lsdException w:name="Table Web 3"/>
<w:lsdException w:name="Balloon Text"/>
<w:lsdException w:name="Table Grid"/>
<w:lsdException w:name="Table Theme"/>
<w:lsdException w:name="Placeholder Text"/>
<w:lsdException w:name="No Spacing"/>
<w:lsdException w:name="Light Shading"/>
<w:lsdException w:name="Light List"/>
<w:lsdException w:name="Light Grid"/>
<w:lsdException w:name="Medium Shading 1"/>
<w:lsdException w:name="Medium Shading 2"/>
<w:lsdException w:name="Medium List 1"/>
<w:lsdException w:name="Medium List 2"/>
<w:lsdException w:name="Medium Grid 1"/>
<w:lsdException w:name="Medium Grid 2"/>
<w:lsdException w:name="Medium Grid 3"/>
<w:lsdException w:name="Dark List"/>
<w:lsdException w:name="Colorful Shading"/>
<w:lsdException w:name="Colorful List"/>
<w:lsdException w:name="Colorful Grid"/>
<w:lsdException w:name="Light Shading Accent 1"/>
<w:lsdException w:name="Light List Accent 1"/>
<w:lsdException w:name="Light Grid Accent 1"/>
<w:lsdException w:name="Medium Shading 1 Accent 1"/>
<w:lsdException w:name="Medium Shading 2 Accent 1"/>
<w:lsdException w:name="Medium List 1 Accent 1"/>
<w:lsdException w:name="Revision"/>
<w:lsdException w:name="List Paragraph"/>
<w:lsdException w:name="Quote"/>
<w:lsdException w:name="Intense Quote"/>
<w:lsdException w:name="Medium List 2 Accent 1"/>
<w:lsdException w:name="Medium Grid 1 Accent 1"/>
<w:lsdException w:name="Medium Grid 2 Accent 1"/>
<w:lsdException w:name="Medium Grid 3 Accent 1"/>
<w:lsdException w:name="Dark List Accent 1"/>
<w:lsdException w:name="Colorful Shading Accent 1"/>
<w:lsdException w:name="Colorful List Accent 1"/>
<w:lsdException w:name="Colorful Grid Accent 1"/>
<w:lsdException w:name="Light Shading Accent 2"/>
<w:lsdException w:name="Light List Accent 2"/>
<w:lsdException w:name="Light Grid Accent 2"/>
<w:lsdException w:name="Medium Shading 1 Accent 2"/>
<w:lsdException w:name="Medium Shading 2 Accent 2"/>
<w:lsdException w:name="Medium List 1 Accent 2"/>
<w:lsdException w:name="Medium List 2 Accent 2"/>
<w:lsdException w:name="Medium Grid 1 Accent 2"/>
<w:lsdException w:name="Medium Grid 2 Accent 2"/>
<w:lsdException w:name="Medium Grid 3 Accent 2"/>
<w:lsdException w:name="Dark List Accent 2"/>
<w:lsdException w:name="Colorful Shading Accent 2"/>
<w:lsdException w:name="Colorful List Accent 2"/>
<w:lsdException w:name="Colorful Grid Accent 2"/>
<w:lsdException w:name="Light Shading Accent 3"/>
<w:lsdException w:name="Light List Accent 3"/>
<w:lsdException w:name="Light Grid Accent 3"/>
<w:lsdException w:name="Medium Shading 1 Accent 3"/>
<w:lsdException w:name="Medium Shading 2 Accent 3"/>
<w:lsdException w:name="Medium List 1 Accent 3"/>
<w:lsdException w:name="Medium List 2 Accent 3"/>
<w:lsdException w:name="Medium Grid 1 Accent 3"/>
<w:lsdException w:name="Medium Grid 2 Accent 3"/>
<w:lsdException w:name="Medium Grid 3 Accent 3"/>
<w:lsdException w:name="Dark List Accent 3"/>
<w:lsdException w:name="Colorful Shading Accent 3"/>
<w:lsdException w:name="Colorful List Accent 3"/>
<w:lsdException w:name="Colorful Grid Accent 3"/>
<w:lsdException w:name="Light Shading Accent 4"/>
<w:lsdException w:name="Light List Accent 4"/>
<w:lsdException w:name="Light Grid Accent 4"/>
<w:lsdException w:name="Medium Shading 1 Accent 4"/>
<w:lsdException w:name="Medium Shading 2 Accent 4"/>
<w:lsdException w:name="Medium List 1 Accent 4"/>
<w:lsdException w:name="Medium List 2 Accent 4"/>
<w:lsdException w:name="Medium Grid 1 Accent 4"/>
<w:lsdException w:name="Medium Grid 2 Accent 4"/>
<w:lsdException w:name="Medium Grid 3 Accent 4"/>
<w:lsdException w:name="Dark List Accent 4"/>
<w:lsdException w:name="Colorful Shading Accent 4"/>
<w:lsdException w:name="Colorful List Accent 4"/>
<w:lsdException w:name="Colorful Grid Accent 4"/>
<w:lsdException w:name="Light Shading Accent 5"/>
<w:lsdException w:name="Light List Accent 5"/>
<w:lsdException w:name="Light Grid Accent 5"/>
<w:lsdException w:name="Medium Shading 1 Accent 5"/>
<w:lsdException w:name="Medium Shading 2 Accent 5"/>
<w:lsdException w:name="Medium List 1 Accent 5"/>
<w:lsdException w:name="Medium List 2 Accent 5"/>
<w:lsdException w:name="Medium Grid 1 Accent 5"/>
<w:lsdException w:name="Medium Grid 2 Accent 5"/>
<w:lsdException w:name="Medium Grid 3 Accent 5"/>
<w:lsdException w:name="Dark List Accent 5"/>
<w:lsdException w:name="Colorful Shading Accent 5"/>
<w:lsdException w:name="Colorful List Accent 5"/>
<w:lsdException w:name="Colorful Grid Accent 5"/>
<w:lsdException w:name="Light Shading Accent 6"/>
<w:lsdException w:name="Light List Accent 6"/>
<w:lsdException w:name="Light Grid Accent 6"/>
<w:lsdException w:name="Medium Shading 1 Accent 6"/>
<w:lsdException w:name="Medium Shading 2 Accent 6"/>
<w:lsdException w:name="Medium List 1 Accent 6"/>
<w:lsdException w:name="Medium List 2 Accent 6"/>
<w:lsdException w:name="Medium Grid 1 Accent 6"/>
<w:lsdException w:name="Medium Grid 2 Accent 6"/>
<w:lsdException w:name="Medium Grid 3 Accent 6"/>
<w:lsdException w:name="Dark List Accent 6"/>
<w:lsdException w:name="Colorful Shading Accent 6"/>
<w:lsdException w:name="Colorful List Accent 6"/>
<w:lsdException w:name="Colorful Grid Accent 6"/>
<w:lsdException w:name="Subtle Emphasis"/>
<w:lsdException w:name="Intense Emphasis"/>
<w:lsdException w:name="Subtle Reference"/>
<w:lsdException w:name="Intense Reference"/>
<w:lsdException w:name="Book Title"/>
<w:lsdException w:name="Bibliography"/>
<w:lsdException w:name="TOC Heading"/>
<w:lsdException w:name="Plain Table 1"/>
<w:lsdException w:name="Plain Table 2"/>
<w:lsdException w:name="Plain Table 3"/>
<w:lsdException w:name="Plain Table 4"/>
<w:lsdException w:name="Plain Table 5"/>
<w:lsdException w:name="Grid Table Light"/>
<w:lsdException w:name="Grid Table 1 Light"/>
<w:lsdException w:name="Grid Table 2"/>
<w:lsdException w:name="Grid Table 3"/>
<w:lsdException w:name="Grid Table 4"/>
<w:lsdException w:name="Grid Table 5 Dark"/>
<w:lsdException w:name="Grid Table 6 Colorful"/>
<w:lsdException w:name="Grid Table 7 Colorful"/>
<w:lsdException w:name="Grid Table 1 Light Accent 1"/>
<w:lsdException w:name="Grid Table 2 Accent 1"/>
<w:lsdException w:name="Grid Table 3 Accent 1"/>
<w:lsdException w:name="Grid Table 4 Accent 1"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 1"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 1"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 1"/>
<w:lsdException w:name="Grid Table 1 Light Accent 2"/>
<w:lsdException w:name="Grid Table 2 Accent 2"/>
<w:lsdException w:name="Grid Table 3 Accent 2"/>
<w:lsdException w:name="Grid Table 4 Accent 2"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 2"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 2"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 2"/>
<w:lsdException w:name="Grid Table 1 Light Accent 3"/>
<w:lsdException w:name="Grid Table 2 Accent 3"/>
<w:lsdException w:name="Grid Table 3 Accent 3"/>
<w:lsdException w:name="Grid Table 4 Accent 3"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 3"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 3"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 3"/>
<w:lsdException w:name="Grid Table 1 Light Accent 4"/>
<w:lsdException w:name="Grid Table 2 Accent 4"/>
<w:lsdException w:name="Grid Table 3 Accent 4"/>
<w:lsdException w:name="Grid Table 4 Accent 4"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 4"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 4"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 4"/>
<w:lsdException w:name="Grid Table 1 Light Accent 5"/>
<w:lsdException w:name="Grid Table 2 Accent 5"/>
<w:lsdException w:name="Grid Table 3 Accent 5"/>
<w:lsdException w:name="Grid Table 4 Accent 5"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 5"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 5"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 5"/>
<w:lsdException w:name="Grid Table 1 Light Accent 6"/>
<w:lsdException w:name="Grid Table 2 Accent 6"/>
<w:lsdException w:name="Grid Table 3 Accent 6"/>
<w:lsdException w:name="Grid Table 4 Accent 6"/>
<w:lsdException w:name="Grid Table 5 Dark Accent 6"/>
<w:lsdException w:name="Grid Table 6 Colorful Accent 6"/>
<w:lsdException w:name="Grid Table 7 Colorful Accent 6"/>
<w:lsdException w:name="List Table 1 Light"/>
<w:lsdException w:name="List Table 2"/>
<w:lsdException w:name="List Table 3"/>
<w:lsdException w:name="List Table 4"/>
<w:lsdException w:name="List Table 5 Dark"/>
<w:lsdException w:name="List Table 6 Colorful"/>
<w:lsdException w:name="List Table 7 Colorful"/>
<w:lsdException w:name="List Table 1 Light Accent 1"/>
<w:lsdException w:name="List Table 2 Accent 1"/>
<w:lsdException w:name="List Table 3 Accent 1"/>
<w:lsdException w:name="List Table 4 Accent 1"/>
<w:lsdException w:name="List Table 5 Dark Accent 1"/>
<w:lsdException w:name="List Table 6 Colorful Accent 1"/>
<w:lsdException w:name="List Table 7 Colorful Accent 1"/>
<w:lsdException w:name="List Table 1 Light Accent 2"/>
<w:lsdException w:name="List Table 2 Accent 2"/>
<w:lsdException w:name="List Table 3 Accent 2"/>
<w:lsdException w:name="List Table 4 Accent 2"/>
<w:lsdException w:name="List Table 5 Dark Accent 2"/>
<w:lsdException w:name="List Table 6 Colorful Accent 2"/>
<w:lsdException w:name="List Table 7 Colorful Accent 2"/>
<w:lsdException w:name="List Table 1 Light Accent 3"/>
<w:lsdException w:name="List Table 2 Accent 3"/>
<w:lsdException w:name="List Table 3 Accent 3"/>
<w:lsdException w:name="List Table 4 Accent 3"/>
<w:lsdException w:name="List Table 5 Dark Accent 3"/>
<w:lsdException w:name="List Table 6 Colorful Accent 3"/>
<w:lsdException w:name="List Table 7 Colorful Accent 3"/>
<w:lsdException w:name="List Table 1 Light Accent 4"/>
<w:lsdException w:name="List Table 2 Accent 4"/>
<w:lsdException w:name="List Table 3 Accent 4"/>
<w:lsdException w:name="List Table 4 Accent 4"/>
<w:lsdException w:name="List Table 5 Dark Accent 4"/>
<w:lsdException w:name="List Table 6 Colorful Accent 4"/>
<w:lsdException w:name="List Table 7 Colorful Accent 4"/>
<w:lsdException w:name="List Table 1 Light Accent 5"/>
<w:lsdException w:name="List Table 2 Accent 5"/>
<w:lsdException w:name="List Table 3 Accent 5"/>
<w:lsdException w:name="List Table 4 Accent 5"/>
<w:lsdException w:name="List Table 5 Dark Accent 5"/>
<w:lsdException w:name="List Table 6 Colorful Accent 5"/>
<w:lsdException w:name="List Table 7 Colorful Accent 5"/>
<w:lsdException w:name="List Table 1 Light Accent 6"/>
<w:lsdException w:name="List Table 2 Accent 6"/>
<w:lsdException w:name="List Table 3 Accent 6"/>
<w:lsdException w:name="List Table 4 Accent 6"/>
<w:lsdException w:name="List Table 5 Dark Accent 6"/>
<w:lsdException w:name="List Table 6 Colorful Accent 6"/>
<w:lsdException w:name="List Table 7 Colorful Accent 6"/>
<w:lsdException w:name="Mention"/>
<w:lsdException w:name="Smart Hyperlink"/>
<w:lsdException w:name="Hashtag"/>
<w:lsdException w:name="Unresolved Mention"/>
<w:lsdException w:name="Smart Link"/>
</w:latentStyles>
<w:style w:type="paragraph" w:default="on" w:styleId="a">
<w:name w:val="Normal"/>
<wx:uiName wx:val="正文"/>
<w:pPr>
<w:widowControl w:val="off"/>
<w:jc w:val="both"/>
</w:pPr>
<w:rPr>
<wx:font wx:val="Times New Roman"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
</w:style>
<w:style w:type="character" w:default="on" w:styleId="a0">
<w:name w:val="Default Paragraph Font"/>
<wx:uiName wx:val="默认段落字体"/>
</w:style>
<w:style w:type="table" w:default="on" w:styleId="a1">
<w:name w:val="Normal Table"/>
<wx:uiName wx:val="普通表格"/>
<w:rPr>
<wx:font wx:val="Times New Roman"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:tblPr>
<w:tblInd w:w="0" w:type="dxa"/>
<w:tblCellMar>
<w:top w:w="0" w:type="dxa"/>
<w:left w:w="108" w:type="dxa"/>
<w:bottom w:w="0" w:type="dxa"/>
<w:right w:w="108" w:type="dxa"/>
</w:tblCellMar>
</w:tblPr>
</w:style>
<w:style w:type="list" w:default="on" w:styleId="a2">
<w:name w:val="No List"/>
<wx:uiName wx:val="无列表"/>
</w:style>
</w:styles>
<w:shapeDefaults>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout>
</w:shapeDefaults>
<w:docPr>
<w:view w:val="web"/>
<w:zoom w:percent="100"/>
<w:bordersDontSurroundHeader/>
<w:bordersDontSurroundFooter/>
<w:defaultTabStop w:val="420"/>
<w:characterSpacingControl w:val="DontCompress"/>
<w:validateAgainstSchema/>
<w:saveInvalidXML w:val="off"/>
<w:ignoreMixedContent w:val="off"/>
<w:alwaysShowPlaceholderText w:val="off"/>
<w:compat>
<w:breakWrappedTables/>
<w:useFELayout/>
</w:compat>
<wsp:rsids>
<wsp:rsidRoot wsp:val="0072445D"/>
<wsp:rsid wsp:val="0072445D"/>
<wsp:rsid wsp:val="00D66952"/>
</wsp:rsids>
</w:docPr>
<w:body>
<wx:sect>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="00000000">
<w:r>
<w:rPr>
<wx:font wx:val="等线"/>
</w:rPr>
<w:t>济钢集团重工机械有限公司</w:t>
</w:r>
</w:p>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="00E67D45">
<w:r>
<w:pict>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype>
<w:binData w:name="wordml://03000001.png" xml:space="preserve">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
TkSuQmCC
</w:binData>
<v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:199.5pt;height:59.5pt">
<v:imagedata src="wordml://03000001.png" o:title=""/>
</v:shape>
</w:pict>
</w:r>
</w:p>
<#list imgList as pict><#list pict.pictures as img>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="00000000">
<w:r>
<w:rPr>
<wx:font wx:val="宋体"/>
</w:rPr>
<w:t>${pict.supplierNm!""}</w:t>
</w:r>
</w:p>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="00BD1B33">
<w:r>
<w:pict>
<w:binData w:name="wordml://${pict_index+img_index+img.name}" xml:space="preserve">
${img.imgBase!""}
</w:binData>
<v:shape style="width:${img.width!""}pt;height:${img.height!""}pt">
<v:imagedata src="wordml://${pict_index+img_index+img.name}" o:title=""/>
</v:shape>
</w:pict>
</w:r>
</w:p>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="0072445D"/>
<w:p wsp:rsidR="0072445D" wsp:rsidRDefault="00E67D45">
<w:r>
<w:pict>
<v:shape style="width:1223pt;height:639pt;mso-left-percent:-10001;mso-top-percent:-10001;mso-position-horizontal:absolute;mso-position-horizontal-relative:char;mso-position-vertical:absolute;mso-position-vertical-relative:line;mso-left-percent:-10001;mso-top-percent:-10001" coordsize="" o:spt="100" adj="0,,0" path="" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas/>
<v:path o:connecttype="segments"/>
</v:shape>
</w:pict>
</w:r>
</w:p>
</#list>
</#list>
</wx:sect>
</w:body>
</w:wordDocument>

@ -66,11 +66,11 @@
<#if reportList?? && (reportList?size>0)>
<#list reportList as reportData>
<#if reportData??>
<#if reportData_index == 0>
<tr bgcolor="#6495ed" style="line-height: 22px">
<td colspan="3">${documentNo!""}</td>
<td colspan="1" style="text-align: center">${reportData_index+1!""}</td>
<td colspan="5">${reportData.materialName!""}</td>
<td colspan="5">${reportData.itemName!""}</td>
<td colspan="2" style="text-align: center">${reportData.settlement!""}</td>
<td colspan="2" style="text-align: center">${reportData.unit!""}</td>
<td colspan="3" style="text-align: center">${reportData.price!""}</td>
@ -80,7 +80,7 @@
<tr>
</tr>
</#if>
</#if>

Loading…
Cancel
Save