From 025934b151c3f5edc782f5a35cd126910a720740 Mon Sep 17 00:00:00 2001
From: zc <zc>
Date: 星期六, 27 七月 2024 18:09:49 +0800
Subject: [PATCH] 代码bug修改调试

---
 src/main/java/com/zy/third/erp/entity/OutDetTB.java           |    4 ++
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   12 +++---
 src/main/java/com/zy/third/erp/task/ERPInOrOutService.java    |    2 +
 src/main/java/com/zy/third/lk/task/LKInTBScheduler.java       |   66 +++++++++++++++++---------------
 4 files changed, 47 insertions(+), 37 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index e37ebd6..52b1e21 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -85,9 +85,9 @@
         if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
             throw new CoolException(BaseRes.PARAM);
         }
-        if(param.getCombMats().size()>1){
-            throw new CoolException("璇锋彁鍙栦竴涓晢鍝侊紝鎴栬�呭埛鏂伴噸鏂扮粍鎵橈紒");
-        }
+//        if(param.getCombMats().size()>1){
+//            throw new CoolException("璇锋彁鍙栦竴涓晢鍝侊紝鎴栬�呭埛鏂伴噸鏂扮粍鎵橈紒");
+//        }
         // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
         if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                 eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
@@ -97,9 +97,9 @@
         if(param.getBarcode().length()!=8){
             throw new CoolException("鏉$爜闀垮害涓嶆槸8浣�===>>" + param.getBarcode());
         }
-        if (param.getCombMats().size()>1){
-            throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
-        }
+//        if (param.getCombMats().size()>1){
+//            throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
+//        }
 
         int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
         int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
diff --git a/src/main/java/com/zy/third/erp/entity/OutDetTB.java b/src/main/java/com/zy/third/erp/entity/OutDetTB.java
index f6aebfb..d53c9a3 100644
--- a/src/main/java/com/zy/third/erp/entity/OutDetTB.java
+++ b/src/main/java/com/zy/third/erp/entity/OutDetTB.java
@@ -91,6 +91,10 @@
 //    private Date delDate;
 
     @ApiModelProperty(value = "")
+    @TableField("proType")
+    private String protype;
+
+    @ApiModelProperty(value = "")
     @TableField("LKName")
     private String LKName;
 
diff --git a/src/main/java/com/zy/third/erp/task/ERPInOrOutService.java b/src/main/java/com/zy/third/erp/task/ERPInOrOutService.java
index ef5d846..c9543c7 100644
--- a/src/main/java/com/zy/third/erp/task/ERPInOrOutService.java
+++ b/src/main/java/com/zy/third/erp/task/ERPInOrOutService.java
@@ -137,6 +137,7 @@
             orderDetl.setUpdateBy(9527L);
             orderDetl.setUpdateTime(now);
             orderDetl.setStatus(1);
+            orderDetl.setProType(outDetTB.getProtype());
             orderDetl.setQty(0.0D);
             if (!orderDetlService.insert(orderDetl)) {
                 throw new CoolException("鐢熸垚鍗曟嵁鏄庣粏澶辫触锛岃鑱旂郴绠$悊鍛�");
@@ -237,6 +238,7 @@
             orderDetl.setUpdateTime(now);
             orderDetl.setStatus(1);
             orderDetl.setQty(0.0D);
+            orderDetl.setProType(outDetTB.getProType());
             if (!orderDetlService.insert(orderDetl)) {
                 throw new CoolException("鐢熸垚鍗曟嵁鏄庣粏澶辫触锛岃鑱旂郴绠$悊鍛�");
             }
diff --git a/src/main/java/com/zy/third/lk/task/LKInTBScheduler.java b/src/main/java/com/zy/third/lk/task/LKInTBScheduler.java
index 16a3b57..41e56ed 100644
--- a/src/main/java/com/zy/third/lk/task/LKInTBScheduler.java
+++ b/src/main/java/com/zy/third/lk/task/LKInTBScheduler.java
@@ -132,14 +132,15 @@
         HashMap<String, Object> content = new HashMap<>();
         content.put("BillNo", "'" + order.getOrderNo() + "'");
         content.put("IoKindID", "'" + order.getDocType() + "'");
-        content.put("ObjectId", "'" + order.getCstmr() + "'");
-        content.put("ObjectName", "'" + order.getCstmrName() + "'");
-        content.put("Remark", "'" + order.getMemo() + "'");
+        if (!Cools.isEmpty(order.getCstmr())) content.put("ObjectId", "'" + order.getCstmr() + "'");
+        if (!Cools.isEmpty(order.getCstmrName())) content.put("ObjectName", "'" + order.getCstmrName() + "'");
+        if (!Cools.isEmpty(order.getMemo())) content.put("Remark", "'" + order.getMemo() + "'");
         content.put("LKName", "'涓壃浜屾湡'");
+        content.put("bPass", "1");
         int insert = erpSqlServer.insert(InHedTB.class, content);
-        String sql = "UPDATE lk_InHedTB SET bPass = 1, LKName='涓壃浜屾湡' WHERE BillNo = '" + order.getOrderNo() + "'";
-        int update = erpSqlServer.update(sql);
-        if (update == 1) {
+        //String sql = "UPDATE lk_InHedTB SET bPass = 1, LKName='涓壃浜屾湡' WHERE BillNo = '" + order.getOrderNo() + "'";
+        //int update = erpSqlServer.update(sql);
+        if (insert == 1) {
             log.info("鍏ュ簱鍗曡〃澶村洖浼犳垚鍔�:" + content);
             return true;
         } else {
@@ -199,14 +200,15 @@
         HashMap<String, Object> content = new HashMap<>();
         content.put("BillNo", "'" + order.getOrderNo() + "'");
         content.put("IoKindID", "'" + order.getDocType() + "'");
-        content.put("ObjectId", "'" + order.getCstmr() + "'");
-        content.put("ObjectName", "'" + order.getCstmrName() + "'");
-        content.put("Remark", "'" + order.getMemo() + "'");
+        if (!Cools.isEmpty(order.getCstmr())) content.put("ObjectId", "'" + order.getCstmr() + "'");
+        if (!Cools.isEmpty(order.getCstmrName())) content.put("ObjectName", "'" + order.getCstmrName() + "'");
+        if (!Cools.isEmpty(order.getMemo())) content.put("Remark", "'" + order.getMemo() + "'");
         content.put("LKName", "'涓壃浜屾湡'");
+        content.put("bPass", "1");
         int insert = erpSqlServer.insert(OutHedTB.class, content);
-        String sql = "UPDATE lk_OutHedTB SET bPass = 1, LKName='涓壃浜屾湡' WHERE BillNo = '" + order.getOrderNo() + "'";
-        int update = erpSqlServer.update(sql);
-        if (update == 1) {
+        //String sql = "UPDATE lk_OutHedTB SET bPass = 1, LKName='涓壃浜屾湡' WHERE BillNo = '" + order.getOrderNo() + "'";
+        //int update = erpSqlServer.update(sql);
+        if (insert == 1) {
             log.info("鍏ュ簱鍗曡〃澶村洖浼犳垚鍔�:" + content);
             return true;
         } else {
@@ -217,25 +219,27 @@
 
     private Map<String, Object> getMap(OrderDetl orderDetl) {
         Map<String, Object> content = new HashMap<>();
-        if (!Cools.isEmpty()) content.put("BillNo", "'" + orderDetl.getOrderNo() + "'");
-        if (!Cools.isEmpty()) content.put("iNO", "'" + orderDetl.getINO() + "'");
-        if (!Cools.isEmpty()) content.put("detId", orderDetl.getThreeCode());
-        if (!Cools.isEmpty()) content.put("ItemId", "'" + orderDetl.getThreeCode() + "'");
-        if (!Cools.isEmpty()) content.put("ItemCode", "'" + orderDetl.getMatnr() + "'");
-        if (!Cools.isEmpty()) content.put("ItemBatch", "'" + orderDetl.getBatch() + "'");
-        if (!Cools.isEmpty()) content.put("proType", "'" + orderDetl.getProType() + "'");
-        if (!Cools.isEmpty()) content.put("remark", "'" + orderDetl.getMemo() + "'");
-        if (!Cools.isEmpty()) content.put("OrderNo", "'" + orderDetl.getOutOrderNo() + "'");
-        if (!Cools.isEmpty()) content.put("MainNum", orderDetl.getQty());
-        if (!Cools.isEmpty()) content.put("WareId", "'" + orderDetl.getWareId() + "'");
-        if (!Cools.isEmpty()) content.put("WareName", "'" + orderDetl.getWareName() + "'");
-        if (!Cools.isEmpty()) content.put("Packing", "'" + orderDetl.getPacking() + "'");
-        if (!Cools.isEmpty()) content.put("LuHao", "'" + orderDetl.getLuHao() + "'");
-        if (!Cools.isEmpty()) content.put("sPgNO", "'" + orderDetl.getSPgNO() + "'");
-        if (!Cools.isEmpty()) content.put("temp1", "'" + orderDetl.getTemp1() + "'");
-        if (!Cools.isEmpty()) content.put("temp2", "'" + orderDetl.getTemp2() + "'");
-        if (!Cools.isEmpty()) content.put("temp3", "'" + orderDetl.getTemp3() + "'");
-        if (!Cools.isEmpty()) content.put("LKName", "'涓壃浜屾湡'");
+        if (!Cools.isEmpty(orderDetl.getOrderNo())) content.put("BillNo", "'" + orderDetl.getOrderNo() + "'");
+        if (!Cools.isEmpty(orderDetl.getINO())) content.put("iNO", "'" + orderDetl.getINO() + "'");
+        if (!Cools.isEmpty(orderDetl.getThreeCode())) content.put("detId", orderDetl.getThreeCode());
+        if (!Cools.isEmpty(orderDetl.getThreeCode())) content.put("ItemId", "'" + orderDetl.getThreeCode() + "'");
+        if (!Cools.isEmpty(orderDetl.getMatnr())) content.put("ItemCode", "'" + orderDetl.getMatnr() + "'");
+        if (!Cools.isEmpty(orderDetl.getBatch())) content.put("ItemBatch", "'" + orderDetl.getBatch() + "'");
+        if (!Cools.isEmpty(orderDetl.getProType())) content.put("proType", "'" + orderDetl.getProType() + "'");
+        if (!Cools.isEmpty(orderDetl.getMemo())) content.put("remark", "'" + orderDetl.getMemo() + "'");
+        if (!Cools.isEmpty(orderDetl.getOutOrderNo())) content.put("OrderNo", "'" + orderDetl.getOutOrderNo() + "'");
+        if (!Cools.isEmpty(orderDetl.getQty())) content.put("MainNum", orderDetl.getQty());
+        if (!Cools.isEmpty(orderDetl.getWareId())) content.put("WareId", "'" + orderDetl.getWareId() + "'");
+        if (!Cools.isEmpty(orderDetl.getWareName())) content.put("WareName", "'" + orderDetl.getWareName() + "'");
+        if (!Cools.isEmpty(orderDetl.getPacking())) content.put("Packing", "'" + orderDetl.getPacking() + "'");
+        if (!Cools.isEmpty(orderDetl.getLuHao())) content.put("LuHao", "'" + orderDetl.getLuHao() + "'");
+        if (!Cools.isEmpty(orderDetl.getSPgNO())) content.put("sPgNO", "'" + orderDetl.getSPgNO() + "'");
+        if (!Cools.isEmpty(orderDetl.getTemp1())) content.put("temp1", "'" + orderDetl.getTemp1() + "'");
+        if (!Cools.isEmpty(orderDetl.getTemp2())) content.put("temp2", "'" + orderDetl.getTemp2() + "'");
+        if (!Cools.isEmpty(orderDetl.getTemp3())) content.put("temp3", "'" + orderDetl.getTemp3() + "'");
+        content.put("LKName", "'涓壃浜屾湡'");
         return content;
     }
+
+
 }

--
Gitblit v1.9.1