From aeedea5255687377a1e0288cbe82762e3226aeed Mon Sep 17 00:00:00 2001 From: liuxy Date: Sat, 3 Dec 2022 17:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pda/st/service/impl/PrintServiceImpl.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PrintServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PrintServiceImpl.java index da7a474a0..229581f5c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PrintServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/PrintServiceImpl.java @@ -46,6 +46,7 @@ public class PrintServiceImpl implements PrintService { JSONObject jo = new JSONObject(); WQLObject printTab = WQLObject.getWQLObject("pdm_bi_printinfo"); WQLObject custTab = WQLObject.getWQLObject("md_cs_customerbase"); + WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); String box_no = whereJson.getString("box_no"); @@ -68,17 +69,22 @@ public class PrintServiceImpl implements PrintService { String product_description = box_jo.getString("product_description"); //物料号 String product_name = box_jo.getString("product_name"); - //规格 - String width = box_jo.getString("width"); + //规格: 厚度*幅宽 + String width = box_jo.getString("thickness")+"*"+box_jo.getString("width"); //批号 String pcsn = box_jo.getString("date_of_production"); + if (ObjectUtil.isNotEmpty(pcsn)) { + pcsn = pcsn.replaceAll("[[\\s-:punct:]]", ""); + } - //入库日期 - String date_of_FG_inbound = box_jo.getString("date_of_fg_inbound"); + //入库日期:取此箱子中最晚的入库日期 + JSONObject jsonInbound= subTab.query("package_box_sn = '" + box_no + "' order by date_of_fg_inbound DESC").uniqueResult(0); + String date_of_FG_inbound = jsonInbound.getString("date_of_fg_inbound"); //毛重 String box_weight = NumberUtil.round(box_jo.getString("box_weight"),2).toString(); - //生产日期 - String date_of_production = box_jo.getString("date_of_production"); + //生产日期:取此箱子中最晚的生产日期 + JSONObject jsonProduction = subTab.query("package_box_sn = '" + box_no + "' order by date_of_production DESC").uniqueResult(0); + String date_of_production = jsonProduction.getString("date_of_production"); //卷数 String quanlity_in_box = box_jo.getString("quanlity_in_box"); //保质期