|
@@ -77,6 +77,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
@Autowired
|
|
@Autowired
|
|
private ITranProcessInfoService tranProcessInfoService;
|
|
private ITranProcessInfoService tranProcessInfoService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private ITranSettlementReportService tranSettlementReportService;
|
|
|
|
+ @Autowired
|
|
private INewWorkflowService workflowService;
|
|
private INewWorkflowService workflowService;
|
|
@Autowired
|
|
@Autowired
|
|
private INoticeService noticeService;
|
|
private INoticeService noticeService;
|
|
@@ -1856,6 +1858,24 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
// 下styleDetailTitle
|
|
// 下styleDetailTitle
|
|
contextstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
contextstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
|
|
|
|
|
+ HSSFCellStyle contextstyles = wb.createCellStyle();
|
|
|
|
+ // 指定单元格居中对齐
|
|
|
|
+ contextstyles.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
|
|
+ // 指定单元格垂直居中对齐
|
|
|
|
+ contextstyles.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
|
|
|
+ // 指定单元格自动换行
|
|
|
|
+ contextstyles.setWrapText(true);
|
|
|
|
+ // 设置单元格字体
|
|
|
|
+ contextstyles.setFont(fontDetail);
|
|
|
|
+ // 右边框
|
|
|
|
+ contextstyles.setBorderRight(HSSFCellStyle.BORDER_THIN);
|
|
|
|
+ // 左边框
|
|
|
|
+ contextstyles.setBorderLeft(HSSFCellStyle.BORDER_THIN);
|
|
|
|
+ // 上边框
|
|
|
|
+ contextstyles.setBorderTop(HSSFCellStyle.BORDER_THIN);
|
|
|
|
+ // 下styleDetailTitle
|
|
|
|
+ contextstyles.setBorderBottom(HSSFCellStyle.BORDER_THIN);
|
|
|
|
+
|
|
HSSFCellStyle styleDetailYellow = wb.createCellStyle();
|
|
HSSFCellStyle styleDetailYellow = wb.createCellStyle();
|
|
// 指定单元格居中对齐
|
|
// 指定单元格居中对齐
|
|
styleDetailYellow.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
styleDetailYellow.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
|
@@ -1912,7 +1932,9 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
sheet.setColumnWidth(12, 12 * 256 + 184);
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
sheet.setColumnWidth(13, 12 * 256 + 184);
|
|
sheet.setColumnWidth(14, 12 * 256 + 184);
|
|
sheet.setColumnWidth(14, 12 * 256 + 184);
|
|
- sheet.setColumnWidth(15, 1 * 256 + 184);
|
|
|
|
|
|
+ sheet.setColumnWidth(15, 12 * 256 + 184);
|
|
|
|
+ sheet.setColumnWidth(16, 12 * 256 + 184);
|
|
|
|
+ sheet.setColumnWidth(17, 1 * 256 + 184);
|
|
|
|
|
|
// 创建单元格对象
|
|
// 创建单元格对象
|
|
HSSFCell cell = null;
|
|
HSSFCell cell = null;
|
|
@@ -1962,6 +1984,11 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
cell.setCellStyle(styleTitle);
|
|
cell.setCellStyle(styleTitle);
|
|
cell = row0.createCell(14);
|
|
cell = row0.createCell(14);
|
|
cell.setCellStyle(styleTitle);
|
|
cell.setCellStyle(styleTitle);
|
|
|
|
+ cell = row0.createCell(15);
|
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
|
+ cell = row0.createCell(16);
|
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
|
+
|
|
rownum++;
|
|
rownum++;
|
|
|
|
|
|
HSSFRow row1 = sheet.createRow((int) rownum);
|
|
HSSFRow row1 = sheet.createRow((int) rownum);
|
|
@@ -2008,6 +2035,12 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
cell = row1.createCell(14);
|
|
cell = row1.createCell(14);
|
|
cell.setCellValue("已开发票金额(元)");
|
|
cell.setCellValue("已开发票金额(元)");
|
|
cell.setCellStyle(styleDetail);
|
|
cell.setCellStyle(styleDetail);
|
|
|
|
+ cell = row1.createCell(15);
|
|
|
|
+ cell.setCellValue("未完成吨数");
|
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
|
+ cell = row1.createCell(16);
|
|
|
|
+ cell.setCellValue("运费(元)");
|
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
|
|
|
rownum++;
|
|
rownum++;
|
|
|
|
|
|
@@ -2017,6 +2050,19 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfos.get(i);
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfos.get(i);
|
|
ContractProcessInfo contractProcessInfo = contractProcessInfoService.selectOne(new EntityWrapper<ContractProcessInfo>()
|
|
ContractProcessInfo contractProcessInfo = contractProcessInfoService.selectOne(new EntityWrapper<ContractProcessInfo>()
|
|
.eq("contract_id",contractManagementInfo.getId()));
|
|
.eq("contract_id",contractManagementInfo.getId()));
|
|
|
|
+// if("1".equals(contractManagementInfo.getDeliverType())){
|
|
|
|
+// //汽运结算报表
|
|
|
|
+// List<TranSettlementReport> tranSettlementReportList = tranSettlementReportService.selectList(new EntityWrapper<TranSettlementReport>()
|
|
|
|
+// .eq("contract_no",contractManagementInfo.getContractNo())
|
|
|
|
+// .eq("comp_id",contractManagementInfo.getCompId())
|
|
|
|
+// .eq("delete_flag","0"));
|
|
|
|
+// if(CollectionUtils.isNotEmpty(tranSettlementReportList)){
|
|
|
|
+// for(TranSettlementReport tranSettlementReport : tranSettlementReportList){
|
|
|
|
+// freight = freight + tranSettlementReport.getAmountIngPayable();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
HSSFRow rowx = sheet.createRow((int) rownum);
|
|
HSSFRow rowx = sheet.createRow((int) rownum);
|
|
rowx.setHeightInPoints(20);
|
|
rowx.setHeightInPoints(20);
|
|
cell = rowx.createCell(1);
|
|
cell = rowx.createCell(1);
|
|
@@ -2047,7 +2093,6 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
cell.setCellValue(editString(contractManagementInfo.getSeller()));
|
|
cell.setCellValue(editString(contractManagementInfo.getSeller()));
|
|
cell.setCellStyle(styleDetail);
|
|
cell.setCellStyle(styleDetail);
|
|
HSSFDataFormat format = wb.createDataFormat(); // 此处设置数据格式
|
|
HSSFDataFormat format = wb.createDataFormat(); // 此处设置数据格式
|
|
-// contextstyle.setDataFormat(df.getBuiltinFormat("#,###0.000"));//保留两位小数点
|
|
|
|
contextstyle.setDataFormat(format.getFormat("0.000"));
|
|
contextstyle.setDataFormat(format.getFormat("0.000"));
|
|
cell = rowx.createCell(10);
|
|
cell = rowx.createCell(10);
|
|
cell.setCellValue(editDouble(contractManagementInfo.getCompletedQuantity()));
|
|
cell.setCellValue(editDouble(contractManagementInfo.getCompletedQuantity()));
|
|
@@ -2060,10 +2105,35 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
cell.setCellStyle(styleDetail);
|
|
cell.setCellStyle(styleDetail);
|
|
cell = rowx.createCell(13);
|
|
cell = rowx.createCell(13);
|
|
cell.setCellValue(editFloat(contractManagementInfo.getMildewGrain()));
|
|
cell.setCellValue(editFloat(contractManagementInfo.getMildewGrain()));
|
|
- cell.setCellStyle(styleDetail);
|
|
|
|
|
|
+ cell.setCellStyle(contextstyles);
|
|
cell = rowx.createCell(14);
|
|
cell = rowx.createCell(14);
|
|
cell.setCellValue(editFloat(Float.valueOf(String.valueOf(contractProcessInfo.getGoodsName()!=null?contractProcessInfo.getGoodsName():"0"))));
|
|
cell.setCellValue(editFloat(Float.valueOf(String.valueOf(contractProcessInfo.getGoodsName()!=null?contractProcessInfo.getGoodsName():"0"))));
|
|
- cell.setCellStyle(styleDetail);
|
|
|
|
|
|
+ cell.setCellStyle(contextstyles);
|
|
|
|
+ cell = rowx.createCell(15);
|
|
|
|
+ cell.setCellValue(editDouble(Double.valueOf(contractManagementInfo.getWeight()) - contractManagementInfo.getCompletedQuantity()));
|
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
|
+ HSSFDataFormat format1 = wb.createDataFormat(); // 此处设置数据格式
|
|
|
|
+ contextstyles.setDataFormat(format1.getFormat("0.00"));
|
|
|
|
+ cell = rowx.createCell(16);
|
|
|
|
+ if("1".equals(contractManagementInfo.getDeliverType())){
|
|
|
|
+ //汽运结算报表
|
|
|
|
+ List<TranSettlementReport> tranSettlementReportList = tranSettlementReportService.selectList(new EntityWrapper<TranSettlementReport>()
|
|
|
|
+ .eq("contract_no",contractManagementInfo.getContractNo())
|
|
|
|
+ .eq("comp_id",contractManagementInfo.getCompId())
|
|
|
|
+ .eq("delete_flag","0"));
|
|
|
|
+ //运费
|
|
|
|
+ Double freight = 0d;
|
|
|
|
+ if(CollectionUtils.isNotEmpty(tranSettlementReportList)){
|
|
|
|
+ for(TranSettlementReport tranSettlementReport : tranSettlementReportList){
|
|
|
|
+ freight = freight + tranSettlementReport.getAmountIngPayable();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ cell.setCellValue(editDouble(freight));
|
|
|
|
+ cell.setCellStyle(contextstyles);
|
|
|
|
+ }else {
|
|
|
|
+ cell.setCellValue("他运");
|
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
|
+ }
|
|
rownum++;
|
|
rownum++;
|
|
}
|
|
}
|
|
|
|
|