Browse Source

托数(PLT)", "箱数(CTN)

master
han\hanst 1 month ago
parent
commit
002b732ce5
  1. 4
      src/main/java/com/xujie/sys/modules/ecss/data/EcssCoDelImportExportSummaryRow.java
  2. 19
      src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelServiceImpl.java
  3. 5
      src/main/resources/mapper/ecss/CoDelMapper.xml

4
src/main/java/com/xujie/sys/modules/ecss/data/EcssCoDelImportExportSummaryRow.java

@ -34,8 +34,12 @@ public class EcssCoDelImportExportSummaryRow {
private String destination;
/** 托数(PLT) */
private Integer packageQty;
/** 箱数(CTN) */
private Integer boxQty;
private BigDecimal netWeight;
private BigDecimal grossWeight;

19
src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelServiceImpl.java

@ -5006,7 +5006,7 @@ public class CoDelExcelServiceImpl implements CoDelExcelService {
String[] headers = new String[]{
"核销单号", "开票日期", "运输", "订货人", "收货人", "目的港",
"件数", "净重", "毛重kg", "体积", "数量pcs", "币种", "总价",
"托数(PLT)", "箱数(CTN)", "净重", "毛重kg", "体积", "数量pcs", "币种", "总价",
"发票号", "提单编号", "出口日期", "报关单号", "税务发票号码", "备注"
};
@ -5141,7 +5141,8 @@ public class CoDelExcelServiceImpl implements CoDelExcelService {
setImportExportTextCell(dataRow, c++, r.getOrdererName(), st.dataStyle());
setImportExportTextCell(dataRow, c++, r.getConsignee(), st.dataStyle());
setImportExportTextCell(dataRow, c++, r.getDestination(), st.dataStyle());
setImportExportIntCell(dataRow, c++, r.getPackageQty(), st.dataStyle());
setImportExportPositiveIntCell(dataRow, c++, r.getPackageQty(), st.dataStyle());
setImportExportIntCell(dataRow, c++, r.getBoxQty(), st.dataStyle());
setImportExportDecimalCell(dataRow, c++, r.getNetWeight(), st.weightStyle());
setImportExportDecimalCell(dataRow, c++, r.getGrossWeight(), st.weightStyle());
setImportExportDecimalCell(dataRow, c++, r.getTotalVolume(), st.volumeStyle());
@ -5241,6 +5242,20 @@ public class CoDelExcelServiceImpl implements CoDelExcelService {
}
}
/**
* 托数列特殊处理空值或0都显示为空白避免导出出现无意义的0
*/
private static void setImportExportPositiveIntCell(XSSFRow row, int col, Integer val, CellStyle style) {
XSSFCell cell = row.createCell(col);
if (val != null && val > 0) {
cell.setCellValue(val.doubleValue());
cell.setCellStyle(style);
} else {
cell.setCellValue("");
cell.setCellStyle(style);
}
}
private static void setImportExportQtyCell(XSSFRow row, int col, BigDecimal val, CellStyle qtyStyle) {
XSSFCell cell = row.createCell(col);
if (val != null) {

5
src/main/resources/mapper/ecss/CoDelMapper.xml

@ -1705,10 +1705,11 @@ create_by,create_date,update_by,update_date
NULLIF(LTRIM(RTRIM(a.overseasShipper)), '')
) AS consignee,
a.Destination AS destination,
d.package_qty AS packageQty,
COALESCE(
d.package_qty,
d.box_qty,
CONVERT(INT, ROUND(ISNULL(box.sum_box_qty, 0), 0))
) AS packageQty,
) AS boxQty,
COALESCE(d.net_weight, box.sum_net_weight) AS netWeight,
COALESCE(d.gross_weight, box.sum_gross_weight) AS grossWeight,
CONVERT(DECIMAL(20, 6), ISNULL(palVol.sum_pallet_volume, 0)) AS totalVolume,

Loading…
Cancel
Save