|
@@ -1407,6 +1407,13 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
return warehouseBaseInfoList;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 入库导出
|
|
|
+ * @param warehouseBaseInfo
|
|
|
+ * @param response
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@Override
|
|
|
public void export(WarehouseBaseInfo warehouseBaseInfo, HttpServletResponse response) throws Exception {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
@@ -1621,7 +1628,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(34, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(35, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(36, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(37, 1 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(37, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(38, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(39, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(40, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(41, 1 * 256 + 184);
|
|
|
|
|
|
// 创建单元格对象
|
|
|
HSSFCell cell = null;
|
|
@@ -1715,6 +1726,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellStyle(styleTitle);
|
|
|
cell = row0.createCell(36);
|
|
|
cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(37);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(38);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(39);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(40);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
rownum++;
|
|
|
|
|
|
HSSFRow row1 = sheet.createRow((int) rownum);
|
|
@@ -1762,69 +1781,81 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue("杂质");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(15);
|
|
|
- cell.setCellValue("车牌号");
|
|
|
+ cell.setCellValue("霉变粒");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(16);
|
|
|
- cell.setCellValue("箱号1");
|
|
|
+ cell.setCellValue("不完善粒");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(17);
|
|
|
- cell.setCellValue("箱号2");
|
|
|
+ cell.setCellValue("容重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(18);
|
|
|
- cell.setCellValue("封号1");
|
|
|
+ cell.setCellValue("热损伤");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(19);
|
|
|
- cell.setCellValue("封号2");
|
|
|
+ cell.setCellValue("车牌号");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(20);
|
|
|
+ cell.setCellValue("箱号1");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(21);
|
|
|
+ cell.setCellValue("箱号2");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(22);
|
|
|
+ cell.setCellValue("封号1");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(23);
|
|
|
+ cell.setCellValue("封号2");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(24);
|
|
|
cell.setCellValue("净重单价");
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = row1.createCell(21);
|
|
|
+ cell = row1.createCell(25);
|
|
|
cell.setCellValue("毛重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(22);
|
|
|
+ cell = row1.createCell(26);
|
|
|
cell.setCellValue("皮重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(23);
|
|
|
+ cell = row1.createCell(27);
|
|
|
cell.setCellValue("扣重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(24);
|
|
|
+ cell = row1.createCell(28);
|
|
|
cell.setCellValue("净重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(25);
|
|
|
+ cell = row1.createCell(29);
|
|
|
cell.setCellValue("发货净重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(26);
|
|
|
+ cell = row1.createCell(30);
|
|
|
cell.setCellValue("发货库");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(27);
|
|
|
+ cell = row1.createCell(31);
|
|
|
cell.setCellValue("运输单价");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(28);
|
|
|
+ cell = row1.createCell(32);
|
|
|
cell.setCellValue("运费");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(29);
|
|
|
+ cell = row1.createCell(33);
|
|
|
cell.setCellValue("扣单价");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(30);
|
|
|
+ cell = row1.createCell(34);
|
|
|
cell.setCellValue("纯重单价");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(31);
|
|
|
+ cell = row1.createCell(35);
|
|
|
cell.setCellValue("纯重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(32);
|
|
|
+ cell = row1.createCell(36);
|
|
|
cell.setCellValue("合计应付");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(33);
|
|
|
+ cell = row1.createCell(37);
|
|
|
cell.setCellValue("实付金额");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(34);
|
|
|
+ cell = row1.createCell(38);
|
|
|
cell.setCellValue("姓名");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(35);
|
|
|
+ cell = row1.createCell(39);
|
|
|
cell.setCellValue("卡号");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(36);
|
|
|
+ cell = row1.createCell(40);
|
|
|
cell.setCellValue("开户支行");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
|
|
@@ -1841,6 +1872,15 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ExportVView> dataList = baseMapper.getListByCondition(pageView);
|
|
|
// 详情信息
|
|
|
if (!CollectionUtils.isEmpty(dataList)) {
|
|
|
+ Double waterContentTotal = 0d;//水分合计
|
|
|
+ Double impurityTotal = 0d;//杂质合计
|
|
|
+ Double mildewGrainTotal = 0d;//霉变粒合计
|
|
|
+ Double imperfectGrainTotal = 0d;//不完善粒合计
|
|
|
+ Double bulkDensityTotal = 0d;//容重合计
|
|
|
+ Double jiaorenliTotal = 0d;//热损伤合计
|
|
|
+ Double netWeightPriceTotal = 0d;//净重单价合计
|
|
|
+ Double netWeightTotal = 0d;//净重合计
|
|
|
+ Double amountIngPayableTotal = 0d;//合计应付合计
|
|
|
for (int i = 0; i < dataList.size(); i++) {
|
|
|
ExportVView exportVView = dataList.get(i);
|
|
|
HSSFRow rowx = sheet.createRow((int) rownum);
|
|
@@ -1887,85 +1927,136 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue(editString(exportVView.getGrade()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(13);
|
|
|
- cell.setCellValue(editString(exportVView.getWaterContent()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()!=null?exportVView.getWaterContent():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(14);
|
|
|
- cell.setCellValue(editString(exportVView.getImpurity()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getImpurity()!=null?exportVView.getImpurity():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()!=null?exportVView.getMildewGrain():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(16);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()!=null?exportVView.getImperfectGrain():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(17);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()!=null?exportVView.getBulkDensity():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(18);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()!=null?exportVView.getJiaorenli():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(19);
|
|
|
cell.setCellValue(editString(exportVView.getCarNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(16);
|
|
|
+ cell = rowx.createCell(20);
|
|
|
cell.setCellValue(editString(exportVView.getBoxNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(17);
|
|
|
+ cell = rowx.createCell(21);
|
|
|
cell.setCellValue(editString(exportVView.getBoxNoOther()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(18);
|
|
|
+ cell = rowx.createCell(22);
|
|
|
cell.setCellValue(editString(exportVView.getTitleNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(19);
|
|
|
+ cell = rowx.createCell(23);
|
|
|
cell.setCellValue(editString(exportVView.getTitleNoOther()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(20);
|
|
|
+ cell = rowx.createCell(24);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getNetWeightPrice()!=null?exportVView.getNetWeightPrice():"0"));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(21);
|
|
|
+ cell = rowx.createCell(25);
|
|
|
HSSFDataFormat df = wb.createDataFormat(); // 此处设置数据格式
|
|
|
contextstyle.setDataFormat(df.getBuiltinFormat("#,##0.00"));//保留两位小数点
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(22);
|
|
|
+ cell = rowx.createCell(26);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getTare()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(23);
|
|
|
+ cell = rowx.createCell(27);
|
|
|
cell.setCellValue(editFloat(exportVView.getBuckleWeight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(24);
|
|
|
+ cell = rowx.createCell(28);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(25);
|
|
|
- cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getDeliveryVolume())).toString());
|
|
|
+ cell = rowx.createCell(29);
|
|
|
+ cell.setCellValue(editDouble(exportVView.getDeliveryVolume()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(26);
|
|
|
+ cell = rowx.createCell(30);
|
|
|
cell.setCellValue(editString(exportVView.getSendWarehouse()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(27);
|
|
|
+ cell = rowx.createCell(31);
|
|
|
cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getTranPrice())).toString());
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(28);
|
|
|
+ cell = rowx.createCell(32);
|
|
|
cell.setCellValue(editFloat(exportVView.getFreight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(29);
|
|
|
+ cell = rowx.createCell(33);
|
|
|
cell.setCellValue(editDouble(exportVView.getUnitDeduction()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(30);
|
|
|
+ cell = rowx.createCell(34);
|
|
|
cell.setCellValue(new Formatter().format("%.3f", editDouble(exportVView.getPureWeightPrice())).toString());
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(31);
|
|
|
+ cell = rowx.createCell(35);
|
|
|
cell.setCellValue(editFloat(exportVView.getPureWeight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(32);
|
|
|
- cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountIngPayable())).toString());
|
|
|
-// cell.setCellValue(editDouble(exportVView.getAmountIngPayable()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(33);
|
|
|
+ cell = rowx.createCell(36);
|
|
|
+ cell.setCellValue(editDouble(exportVView.getAmountIngPayable()));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(37);
|
|
|
cell.setCellValue(new Formatter().format("%.2f", editDouble(exportVView.getAmountEdPayable())).toString());
|
|
|
// cell.setCellValue(editDouble(exportVView.getAmountEdPayable()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(34);
|
|
|
+ cell = rowx.createCell(38);
|
|
|
cell.setCellValue(editString(exportVView.getCustomerName()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(35);
|
|
|
+ cell = rowx.createCell(39);
|
|
|
cell.setCellValue(editString(exportVView.getCardNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(36);
|
|
|
+ cell = rowx.createCell(40);
|
|
|
cell.setCellValue(editString(exportVView.getBankDeposit() + "-" +exportVView.getBankDepositBranch()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
|
|
|
+ //水分累计和
|
|
|
+ waterContentTotal = waterContentTotal + ((Double.valueOf(String.valueOf(exportVView.getWaterContent()!=null?exportVView.getWaterContent():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ impurityTotal = impurityTotal + ((Double.valueOf(String.valueOf(exportVView.getImpurity()!=null?exportVView.getImpurity():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ mildewGrainTotal = mildewGrainTotal + ((Double.valueOf(String.valueOf(exportVView.getMildewGrain()!=null?exportVView.getMildewGrain():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ imperfectGrainTotal = imperfectGrainTotal + ((Double.valueOf(String.valueOf(exportVView.getImperfectGrain()!=null?exportVView.getImperfectGrain():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ bulkDensityTotal = bulkDensityTotal + ((Double.valueOf(String.valueOf(exportVView.getBulkDensity()!=null?exportVView.getBulkDensity():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ jiaorenliTotal = jiaorenliTotal + ((Double.valueOf(String.valueOf(exportVView.getJiaorenli()!=null?exportVView.getJiaorenli():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ netWeightPriceTotal = netWeightPriceTotal + (Double.valueOf(String.valueOf(exportVView.getNetWeightPrice()!=null?exportVView.getNetWeightPrice():"0")));
|
|
|
+ netWeightTotal = netWeightTotal + (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0")));
|
|
|
+ amountIngPayableTotal = amountIngPayableTotal + exportVView.getAmountIngPayable();
|
|
|
+
|
|
|
rownum++;
|
|
|
}
|
|
|
-
|
|
|
+ HSSFRow rowp = sheet.createRow((int)(rownum));
|
|
|
+ rowp.setHeightInPoints(20);
|
|
|
+ //水分平均值
|
|
|
+
|
|
|
+ cell = rowp.createCell(13);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell.setCellValue(waterContentTotal/netWeightTotal);
|
|
|
+ cell = rowp.createCell(14);
|
|
|
+ cell.setCellValue(impurityTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(15);
|
|
|
+ cell.setCellValue(mildewGrainTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(16);
|
|
|
+ cell.setCellValue(imperfectGrainTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(17);
|
|
|
+ cell.setCellValue(bulkDensityTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(18);
|
|
|
+ cell.setCellValue(jiaorenliTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(24);
|
|
|
+ cell.setCellValue(netWeightPriceTotal/dataList.size());
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ //纯重合计
|
|
|
+ cell = rowp.createCell(28);
|
|
|
+ cell.setCellValue(netWeightTotal);
|
|
|
+ cell = rowp.createCell(36);
|
|
|
+ cell.setCellValue(amountIngPayableTotal);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2216,7 +2307,11 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
sheet.setColumnWidth(38, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(39, 12 * 256 + 184);
|
|
|
sheet.setColumnWidth(40, 12 * 256 + 184);
|
|
|
- sheet.setColumnWidth(41, 1 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(41, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(42, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(43, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(44, 12 * 256 + 184);
|
|
|
+ sheet.setColumnWidth(45, 1 * 256 + 184);
|
|
|
|
|
|
// 创建单元格对象
|
|
|
HSSFCell cell = null;
|
|
@@ -2318,6 +2413,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellStyle(styleTitle);
|
|
|
cell = row0.createCell(40);
|
|
|
cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(41);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(42);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(43);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
+ cell = row0.createCell(44);
|
|
|
+ cell.setCellStyle(styleTitle);
|
|
|
rownum++;
|
|
|
|
|
|
HSSFRow row1 = sheet.createRow((int) rownum);
|
|
@@ -2368,86 +2471,94 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellValue("杂质");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(16);
|
|
|
- cell.setCellValue("车厢号");
|
|
|
+ cell.setCellValue("霉变粒");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(17);
|
|
|
- cell.setCellValue("箱号1");
|
|
|
+ cell.setCellValue("不完善粒");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(18);
|
|
|
- cell.setCellValue("箱号2");
|
|
|
+ cell.setCellValue("容重");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(19);
|
|
|
- cell.setCellValue("封号1");
|
|
|
+ cell.setCellValue("热损伤");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = row1.createCell(20);
|
|
|
+ cell.setCellValue("车厢号");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(21);
|
|
|
+ cell.setCellValue("箱号1");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(22);
|
|
|
+ cell.setCellValue("箱号2");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(23);
|
|
|
+ cell.setCellValue("封号1");
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = row1.createCell(24);
|
|
|
cell.setCellValue("封号2");
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = row1.createCell(21);
|
|
|
+ cell = row1.createCell(25);
|
|
|
cell.setCellValue("船名");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(22);
|
|
|
+ cell = row1.createCell(26);
|
|
|
cell.setCellValue("航次");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(23);
|
|
|
+ cell = row1.createCell(27);
|
|
|
cell.setCellValue("车牌号");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(24);
|
|
|
+ cell = row1.createCell(28);
|
|
|
cell.setCellValue("毛重(吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(25);
|
|
|
+ cell = row1.createCell(29);
|
|
|
cell.setCellValue("皮重(吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(26);
|
|
|
+ cell = row1.createCell(30);
|
|
|
cell.setCellValue("出库净重(吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(27);
|
|
|
+ cell = row1.createCell(31);
|
|
|
cell.setCellValue("反馈重量(吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(28);
|
|
|
+ cell = row1.createCell(32);
|
|
|
cell.setCellValue("反馈日期");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(29);
|
|
|
+ cell = row1.createCell(33);
|
|
|
cell.setCellValue("结算重量(吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(30);
|
|
|
+ cell = row1.createCell(34);
|
|
|
cell.setCellValue("结算单价(元/吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(31);
|
|
|
+ cell = row1.createCell(35);
|
|
|
cell.setCellValue("汽运运费(元/吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(32);
|
|
|
+ cell = row1.createCell(36);
|
|
|
cell.setCellValue("火运运费(元/吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(33);
|
|
|
+ cell = row1.createCell(37);
|
|
|
cell.setCellValue("船运运费(元/吨)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(34);
|
|
|
+ cell = row1.createCell(38);
|
|
|
cell.setCellValue("运费");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(35);
|
|
|
+ cell = row1.createCell(39);
|
|
|
cell.setCellValue("应收金额(元)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(36);
|
|
|
+ cell = row1.createCell(40);
|
|
|
cell.setCellValue("已收金额(元)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(37);
|
|
|
+ cell = row1.createCell(41);
|
|
|
cell.setCellValue("未收金额(元)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(38);
|
|
|
+ cell = row1.createCell(42);
|
|
|
cell.setCellValue("收款日期");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(39);
|
|
|
+ cell = row1.createCell(43);
|
|
|
cell.setCellValue("已开票金额(元)");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = row1.createCell(40);
|
|
|
+ cell = row1.createCell(44);
|
|
|
cell.setCellValue("状态");
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
rownum++;
|
|
|
+
|
|
|
DecimalFormat decimalFormat=new DecimalFormat(".00");
|
|
|
Map<String, Object> pageView = new HashMap<>();
|
|
|
// 公司ID
|
|
@@ -2459,6 +2570,15 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
List<ExportVView> dataList = baseMapper.getListByConditionOut(pageView);
|
|
|
// 详情信息
|
|
|
if (!CollectionUtils.isEmpty(dataList)) {
|
|
|
+ Double waterContentTotal = 0d;//水分合计
|
|
|
+ Double impurityTotal = 0d;//杂质合计
|
|
|
+ Double mildewGrainTotal = 0d;//霉变粒合计
|
|
|
+ Double imperfectGrainTotal = 0d;//不完善粒合计
|
|
|
+ Double bulkDensityTotal = 0d;//容重合计
|
|
|
+ Double jiaorenliTotal = 0d;//热损伤合计
|
|
|
+ Double netWeightPriceTotal = 0d;//单价合计
|
|
|
+ Double netWeightTotal = 0d;//净重合计
|
|
|
+ Double amountIngPayableTotal = 0d;//应收合计
|
|
|
for (int i = 0; i < dataList.size(); i++) {
|
|
|
ExportVView exportVView = dataList.get(i);
|
|
|
HSSFRow rowx = sheet.createRow((int) rownum);
|
|
@@ -2505,92 +2625,144 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
cell = rowx.createCell(14);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getWaterContent()!=null?exportVView.getWaterContent():"0"));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(15);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getImpurity()!=null?exportVView.getImpurity():"0"));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
cell = rowx.createCell(16);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getMildewGrain()!=null?exportVView.getMildewGrain():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(17);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getImperfectGrain()!=null?exportVView.getImperfectGrain():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(18);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getBulkDensity()!=null?exportVView.getBulkDensity():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(19);
|
|
|
+ cell.setCellValue(Double.parseDouble(exportVView.getJiaorenli()!=null?exportVView.getJiaorenli():"0"));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(20);
|
|
|
cell.setCellValue(editString(exportVView.getWingNumber()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(17);
|
|
|
+ cell = rowx.createCell(21);
|
|
|
cell.setCellValue(editString(exportVView.getBoxNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(18);
|
|
|
+ cell = rowx.createCell(22);
|
|
|
cell.setCellValue(editString(exportVView.getBoxNoOther()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(19);
|
|
|
+ cell = rowx.createCell(23);
|
|
|
cell.setCellValue(editString(exportVView.getTitleNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(20);
|
|
|
+ cell = rowx.createCell(24);
|
|
|
cell.setCellValue(editString(exportVView.getTitleNoOther()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(21);
|
|
|
+ cell = rowx.createCell(25);
|
|
|
cell.setCellValue(editString(exportVView.getShipNumber()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(22);
|
|
|
+ cell = rowx.createCell(26);
|
|
|
cell.setCellValue(editString(exportVView.getShipName()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(23);
|
|
|
+ cell = rowx.createCell(27);
|
|
|
cell.setCellValue(editString(exportVView.getCarNo()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
HSSFDataFormat df = wb.createDataFormat(); // 此处设置数据格式
|
|
|
contextstyle.setDataFormat(df.getBuiltinFormat("#,##0.00"));//保留两位小数点
|
|
|
- cell = rowx.createCell(24);
|
|
|
+ cell = rowx.createCell(28);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getGrossWeight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(25);
|
|
|
+ cell = rowx.createCell(29);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getTare()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(26);
|
|
|
+ cell = rowx.createCell(30);
|
|
|
cell.setCellValue(Double.parseDouble(exportVView.getNetWeight()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(27);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(31);
|
|
|
cell.setCellValue(editFloat(exportVView.getFeedbackWeight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(28);
|
|
|
+ cell = rowx.createCell(32);
|
|
|
String date1 = addDateOneDay(exportVView.getFeedbackDate()!=null?exportVView.getFeedbackDate():new Date());
|
|
|
cell.setCellValue(date1);
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(29);
|
|
|
+ cell = rowx.createCell(33);
|
|
|
cell.setCellValue(editFloat(exportVView.getSettlementWeight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(30);
|
|
|
+ cell = rowx.createCell(34);
|
|
|
cell.setCellValue(editFloat(exportVView.getSettlementPrice()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(31);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(35);
|
|
|
cell.setCellValue(editFloat(exportVView.getCarFreight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(32);
|
|
|
+ cell = rowx.createCell(36);
|
|
|
cell.setCellValue(editFloat(exportVView.getTrainFreight()));
|
|
|
cell.setCellStyle(contextstyle);
|
|
|
- cell = rowx.createCell(33);
|
|
|
+ cell = rowx.createCell(37);
|
|
|
cell.setCellValue(editFloat(exportVView.getShipFreight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(34);
|
|
|
+ cell = rowx.createCell(38);
|
|
|
cell.setCellValue(editFloat(exportVView.getShipFreight()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(35);
|
|
|
- cell.setCellValue(editFloat(exportVView.getAmountIngReceivable()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(36);
|
|
|
- cell.setCellValue(editFloat(exportVView.getAmountEdReceivable()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(37);
|
|
|
- cell.setCellValue(editFloat(exportVView.getAmountNotReceivable()));
|
|
|
- cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(38);
|
|
|
+ cell = rowx.createCell(39);
|
|
|
+ cell.setCellValue(editDouble(exportVView.getAmountIngReceivable()));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(40);
|
|
|
+ cell.setCellValue(editDouble(exportVView.getAmountEdReceivable()));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(41);
|
|
|
+ cell.setCellValue(editDouble(exportVView.getAmountNotReceivable()));
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowx.createCell(42);
|
|
|
String date2 = addDateOneDay(exportVView.getCollectionDate()!=null?exportVView.getCollectionDate():new Date());
|
|
|
cell.setCellValue(date2);
|
|
|
- cell = rowx.createCell(39);
|
|
|
+ cell.setCellStyle(styleDetail);
|
|
|
+ cell = rowx.createCell(43);
|
|
|
cell.setCellValue(editFloat(exportVView.getMoney()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
- cell = rowx.createCell(40);
|
|
|
+ cell = rowx.createCell(44);
|
|
|
cell.setCellValue(editString(exportVView.getStatus()));
|
|
|
cell.setCellStyle(styleDetail);
|
|
|
|
|
|
+ //水分累计和
|
|
|
+ waterContentTotal = waterContentTotal + ((Double.valueOf(String.valueOf(exportVView.getWaterContent()!=null?exportVView.getWaterContent():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ impurityTotal = impurityTotal + ((Double.valueOf(String.valueOf(exportVView.getImpurity()!=null?exportVView.getImpurity():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ mildewGrainTotal = mildewGrainTotal + ((Double.valueOf(String.valueOf(exportVView.getMildewGrain()!=null?exportVView.getMildewGrain():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ imperfectGrainTotal = imperfectGrainTotal + ((Double.valueOf(String.valueOf(exportVView.getImperfectGrain()!=null?exportVView.getImperfectGrain():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ bulkDensityTotal = bulkDensityTotal + ((Double.valueOf(String.valueOf(exportVView.getBulkDensity()!=null?exportVView.getBulkDensity():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ jiaorenliTotal = jiaorenliTotal + ((Double.valueOf(String.valueOf(exportVView.getJiaorenli()!=null?exportVView.getJiaorenli():"0"))) * (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0"))));
|
|
|
+ netWeightPriceTotal = netWeightPriceTotal + (Double.valueOf(exportVView.getUnitContractPrice()));
|
|
|
+ netWeightTotal = netWeightTotal + (Double.valueOf(String.valueOf(exportVView.getNetWeight()!=null?exportVView.getNetWeight():"0")));
|
|
|
+ amountIngPayableTotal = amountIngPayableTotal + exportVView.getAmountIngReceivable();
|
|
|
+
|
|
|
rownum++;
|
|
|
}
|
|
|
-
|
|
|
+ HSSFRow rowp = sheet.createRow((int)(rownum));
|
|
|
+ rowp.setHeightInPoints(20);
|
|
|
+ //水分平均值
|
|
|
+ cell = rowp.createCell(9);
|
|
|
+ cell.setCellValue(netWeightPriceTotal/dataList.size());
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(14);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell.setCellValue(waterContentTotal/netWeightTotal);
|
|
|
+ cell = rowp.createCell(15);
|
|
|
+ cell.setCellValue(impurityTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(16);
|
|
|
+ cell.setCellValue(mildewGrainTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(17);
|
|
|
+ cell.setCellValue(imperfectGrainTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(18);
|
|
|
+ cell.setCellValue(bulkDensityTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ cell = rowp.createCell(19);
|
|
|
+ cell.setCellValue(jiaorenliTotal/netWeightTotal);
|
|
|
+ cell.setCellStyle(contextstyle);
|
|
|
+ //纯重合计
|
|
|
+ cell = rowp.createCell(30);
|
|
|
+ cell.setCellValue(netWeightTotal);
|
|
|
+ cell = rowp.createCell(39);
|
|
|
+ cell.setCellValue(amountIngPayableTotal);
|
|
|
}
|
|
|
|
|
|
|