|
|
|
@ -158,7 +158,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//调用 creatSheet() 方法并传递要创建的工作表的名称
|
|
|
|
|
HSSFSheet sheet = workbook.createSheet("榜单信息");
|
|
|
|
|
HSSFSheet sheet = workbook.createSheet("磅单信息");
|
|
|
|
|
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
|
|
|
|
HSSFCellStyle headLineStyle = workbook.createCellStyle();
|
|
|
|
|
HSSFCellStyle headStyle = workbook.createCellStyle();
|
|
|
|
@ -535,7 +535,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
HashMap<String, Object> map = list.get(i);
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
Paragraph title = section.addParagraph();
|
|
|
|
|
title.appendText(map.get("supplierName") + "榜单图片");
|
|
|
|
|
title.appendText(map.get("supplierName") + "磅单图片");
|
|
|
|
|
titleStr = String.valueOf(map.get("supplierName"));
|
|
|
|
|
title.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
|
|
|
|
|
title.applyStyle("titleStyle");
|
|
|
|
@ -581,7 +581,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//生成word文档
|
|
|
|
|
document.saveToFile(templateFilePath + "废钢收货榜单照片(" + titleStr +settlements+"吨).docx", FileFormat.Docx_2013);
|
|
|
|
|
document.saveToFile(templateFilePath + "废钢收货磅单照片(" + titleStr +settlements+"吨).docx", FileFormat.Docx_2013);
|
|
|
|
|
document.close();
|
|
|
|
|
log.warn("word文档生成成功!");
|
|
|
|
|
}
|
|
|
|
@ -624,8 +624,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
// List<PurchaseOrderVO> pMap = this.getPMap(pagination);
|
|
|
|
|
// if (pMap != null && pMap.size() > 0) {
|
|
|
|
|
// PurchaseOrderVO pVO = pMap.get(0);
|
|
|
|
|
//// 榜单图片地址
|
|
|
|
|
//// 榜单图片传输到指定文件夹
|
|
|
|
|
//// 磅单图片地址
|
|
|
|
|
//// 磅单图片传输到指定文件夹
|
|
|
|
|
//
|
|
|
|
|
// byte[] bytes = null;
|
|
|
|
|
// HttpHeaders headers = null;
|
|
|
|
@ -635,7 +635,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
// //渲染模板参数
|
|
|
|
|
//// pdf模板
|
|
|
|
|
// Map map = new HashMap();
|
|
|
|
|
//// 多个榜单的图片信息
|
|
|
|
|
//// 多个磅单的图片信息
|
|
|
|
|
// ArrayList<HashMap<String, Object>> imgList = new ArrayList<>();
|
|
|
|
|
//// word模板
|
|
|
|
|
// HashMap wordHashMap = new HashMap();
|
|
|
|
@ -667,7 +667,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
// imgMap.put("supplierNm", supplierNm);
|
|
|
|
|
//// 车辆图片地址
|
|
|
|
|
// String vehiclePictures = model.getVehiclePictures();
|
|
|
|
|
//// 榜单图片地址
|
|
|
|
|
//// 磅单图片地址
|
|
|
|
|
// String pictures = model.getPoundPictures();
|
|
|
|
|
// imgMap.put("pictures", FileCopy.getImageInfo(pictures));
|
|
|
|
|
// imgList.add(imgMap);
|
|
|
|
@ -681,7 +681,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
// Section section = document.addSection();
|
|
|
|
|
//
|
|
|
|
|
// Paragraph title = section.addParagraph();
|
|
|
|
|
// title.appendText(map.get("supplierName") + "榜单图片");
|
|
|
|
|
// title.appendText(map.get("supplierName") + "磅单图片");
|
|
|
|
|
// ParagraphStyle style = new ParagraphStyle(document);
|
|
|
|
|
// style.setName("titleStyle");
|
|
|
|
|
// style.getCharacterFormat().setBold(true);
|
|
|
|
@ -1601,11 +1601,11 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 榜单照片
|
|
|
|
|
// 磅单照片
|
|
|
|
|
if (model.getPoundPictures()!=null&&!model.getPoundPictures().isEmpty()){
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
model.setCauseError("榜单照片导入失败!请重新导入!");
|
|
|
|
|
model.setCauseError("磅单照片导入失败!请重新导入!");
|
|
|
|
|
errList.add(model);
|
|
|
|
|
ints.add(i);
|
|
|
|
|
continue;
|
|
|
|
@ -1714,7 +1714,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
PurchaseorderDTO model = dataList.get(i);
|
|
|
|
|
Purchaseorder_item0Entity item0 = new Purchaseorder_item0Entity();
|
|
|
|
|
Long aLong2 = new DefaultIdentifierGenerator().nextId(Purchaseorder_item0Entity.class);
|
|
|
|
|
// 雪花算法获取榜单id
|
|
|
|
|
// 雪花算法获取磅单id
|
|
|
|
|
Long aLong1 = new DefaultIdentifierGenerator().nextId(PoundlistEntity.class);
|
|
|
|
|
model.setId(aLong1.toString());
|
|
|
|
|
// 设置id
|
|
|
|
@ -1822,7 +1822,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
int i5 = 0;
|
|
|
|
|
for (PoundlistEntity model : entitys) {
|
|
|
|
|
PurchaseorderDTO purchaseorderDTO = dataList.get(i5);
|
|
|
|
|
// 生成的榜单编码
|
|
|
|
|
// 生成的磅单编码
|
|
|
|
|
ActionResult pdBillNumber = bean.getBillNumber(str1);
|
|
|
|
|
model.setPoundlistNo(String.valueOf(pdBillNumber.getData()));
|
|
|
|
|
model.setSupplierName(contractMEntities.get(0).getName());
|
|
|
|
@ -1837,7 +1837,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
model.setSalesPrice(salesPrice.divide(settlement, 6,RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
|
|
|
|
|
// 是否审核
|
|
|
|
|
model.setIsExamine("1");
|
|
|
|
|
// 榜单类型
|
|
|
|
|
// 磅单类型
|
|
|
|
|
model.setPoundType("0");
|
|
|
|
|
model.setPurchaseStatus("0");
|
|
|
|
|
// 业务员默认当前操作人
|
|
|
|
@ -1846,7 +1846,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
sum += poundlistMapper.insert(model);
|
|
|
|
|
i5++;
|
|
|
|
|
}
|
|
|
|
|
// 榜单逻辑
|
|
|
|
|
// 磅单逻辑
|
|
|
|
|
|
|
|
|
|
//进行数据添加
|
|
|
|
|
|
|
|
|
@ -1894,7 +1894,7 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
|
|
|
|
|
map.put(17, "备注");
|
|
|
|
|
map.put(18, "错误原因");
|
|
|
|
|
map.put(19, "车辆图片地址");
|
|
|
|
|
map.put(20, "榜单图片地址");
|
|
|
|
|
map.put(20, "磅单图片地址");
|
|
|
|
|
map.put(21, "销售合同编码");
|
|
|
|
|
map.put(22, "采购合同编码");
|
|
|
|
|
map.put(23, "客户");
|
|
|
|
|