|
|
|
@ -219,8 +219,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
lineFont.setFontHeightInPoints((short) 12);
|
|
|
|
|
lineStyle.setFont(lineFont);
|
|
|
|
|
|
|
|
|
|
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 8));
|
|
|
|
|
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 8));
|
|
|
|
|
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 9));
|
|
|
|
|
sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 9));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal sum = BigDecimal.ZERO;
|
|
|
|
@ -240,6 +240,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
HSSFCell lineCell7 = row2.createCell(6);
|
|
|
|
|
HSSFCell lineCell8 = row2.createCell(7);
|
|
|
|
|
HSSFCell lineCell9 = row2.createCell(8);
|
|
|
|
|
HSSFCell lineCell10 = row2.createCell(9);
|
|
|
|
|
lineCell1.setCellValue(i + 1);
|
|
|
|
|
lineCell1.setCellStyle(lineStyle);
|
|
|
|
|
lineCell2.setCellValue(String.valueOf(map.get("poundDate")).equals("null") ? "" : String.valueOf(map.get("poundDate")));
|
|
|
|
@ -262,6 +263,9 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
|
|
|
|
|
lineCell9.setCellValue(String.valueOf(map.get("settlement")).equals("null") ? "" : String.valueOf(map.get("settlement")));
|
|
|
|
|
lineCell9.setCellStyle(lineStyle);
|
|
|
|
|
|
|
|
|
|
lineCell10.setCellValue(String.valueOf(map.get("purchasePrice")).equals("null") ? "" : String.valueOf(map.get("purchasePrice")));
|
|
|
|
|
lineCell10.setCellStyle(lineStyle);
|
|
|
|
|
String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement"));
|
|
|
|
|
sum = sum.add(new BigDecimal(s));
|
|
|
|
|
|
|
|
|
@ -310,6 +314,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
HSSFCell cell8 = row1.createCell(6);
|
|
|
|
|
HSSFCell cell9 = row1.createCell(7);
|
|
|
|
|
HSSFCell cell10 = row1.createCell(8);
|
|
|
|
|
HSSFCell cell11 = row1.createCell(9);
|
|
|
|
|
cell2.setCellValue("序号");
|
|
|
|
|
cell2.setCellStyle(headLineStyle);
|
|
|
|
|
cell3.setCellValue("收货日期");
|
|
|
|
@ -328,6 +333,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
cell9.setCellStyle(headLineStyle);
|
|
|
|
|
cell10.setCellValue("结算重量");
|
|
|
|
|
cell10.setCellStyle(headLineStyle);
|
|
|
|
|
cell11.setCellValue("采购价");
|
|
|
|
|
cell11.setCellStyle(headLineStyle);
|
|
|
|
|
HSSFRow lowRow = sheet.createRow((short) i + 4);
|
|
|
|
|
HSSFCell lowCell1 = lowRow.createCell(0);
|
|
|
|
|
HSSFCell lowCell2 = lowRow.createCell(8);
|
|
|
|
@ -343,6 +350,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
lowRow.createCell(5).setCellStyle(lineStyle);
|
|
|
|
|
lowRow.createCell(6).setCellStyle(lineStyle);
|
|
|
|
|
lowRow.createCell(7).setCellStyle(lineStyle);
|
|
|
|
|
lowRow.createCell(9).setCellStyle(lineStyle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -356,6 +364,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
sheet.autoSizeColumn(6);
|
|
|
|
|
sheet.autoSizeColumn(7);
|
|
|
|
|
sheet.autoSizeColumn(8);
|
|
|
|
|
sheet.autoSizeColumn(9);
|
|
|
|
|
sheet.setAutobreaks(true);//这个是sheet缩放设置,默认打印一页要true
|
|
|
|
|
|
|
|
|
|
sheet.setMargin(Sheet.BottomMargin, 0.5);// 页边距(下)
|
|
|
|
@ -483,7 +492,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
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) {
|
|
|
|
@ -1193,7 +1202,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
String s4 = String.valueOf(map.get("contact")).equals("null") ? "" : String.valueOf(map.get("contact"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String s1 = i + "-" + s2 + s3 + s4;
|
|
|
|
|
String s1 = (i+1) + "-" + s2 + s3 + s4;
|
|
|
|
|
File outImg = new File(templateFilePath + "vehicle\\" + s1 + "\\" + UUID.randomUUID().toString().replaceAll("-", "") + ".png");
|
|
|
|
|
File parentFile = outImg.getParentFile();
|
|
|
|
|
if (!parentFile.exists()) {
|
|
|
|
@ -1468,6 +1477,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
|
|
|
|
|
if (contractMEntities != null && contractMEntities.size() > 0) {
|
|
|
|
|
model.setSalesId(contractMEntities.get(0).getId());
|
|
|
|
|
model.setSupplierId(contractMEntities.get(0).getCode());
|
|
|
|
|
} else {
|
|
|
|
|
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
|
|
|
|
|
errList.add(model);
|
|
|
|
@ -1632,7 +1642,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
// 对方合同号
|
|
|
|
|
entity.setContractNo(contractMEntities.get(0).getContractNo());
|
|
|
|
|
// 供应商、客户ID
|
|
|
|
|
entity.setSupplierId(contractMEntities.get(0).getCode());
|
|
|
|
|
// entity.setSupplierId(contractMEntities.get(0).getCode());
|
|
|
|
|
// 供应商名称
|
|
|
|
|
entity.setSupplierName(contractMEntities.get(0).getName());
|
|
|
|
|
// 重量
|
|
|
|
|