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/lk/task/LKInTBScheduler.java |   66 +++++++++++++++++---------------
 1 files changed, 35 insertions(+), 31 deletions(-)

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