From 499432a81f8c30ac65e9ca815edec6c9c0c93607 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期五, 06 一月 2023 08:13:40 +0800 Subject: [PATCH] # --- src/main/java/com/zy/ints/task/scheduler/ErpPrdtScheduler.java | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/zy/ints/task/scheduler/ErpPrdtScheduler.java b/src/main/java/com/zy/ints/task/scheduler/ErpPrdtScheduler.java index 66179df..0231f2b 100644 --- a/src/main/java/com/zy/ints/task/scheduler/ErpPrdtScheduler.java +++ b/src/main/java/com/zy/ints/task/scheduler/ErpPrdtScheduler.java @@ -6,7 +6,6 @@ import com.zy.asrs.service.ApiLogService; import com.zy.asrs.service.MatService; import com.zy.asrs.service.TagService; -import com.zy.ints.entity.ErpDetTb; import com.zy.ints.entity.Prdt; import com.zy.ints.entity.PrdtBak; import com.zy.ints.erp.ErpSqlServer; @@ -82,6 +81,9 @@ erpSqlServer.update(sqlUpDatePrdtTwo + "'" + prdt.getPrdNo() + "'"); callApiLogSave(prdt, "erp_prdt", "鎺ユ敹ERP涓嬪彂鍟嗗搧淇℃伅澶辫触锛侊紒锛佹坊鍔犲晢鍝佷俊鎭け璐ワ紒锛侊紒", false); } + } else { + erpSqlServer.update(sqlUpDatePrdtTwo + "'" + prdt.getPrdNo() + "'"); + callApiLogSave(prdt, "erp_prdt", "鎺ユ敹ERP涓嬪彂鍟嗗搧淇℃伅澶辫触锛侊紒锛佸晢鍝佸凡瀛樺湪锛侊紒锛�", false); } } else if (type == 2) { Mat mat = matService.selectByMatnr(prdt.getPrdNo()); @@ -109,7 +111,7 @@ } } } else { - callApiLogSave(prdt, "erp_prdt", "鍟嗗搧淇℃伅鍑虹幇寮傚父璧勬枡锛�", false); + callApiLogSave(prdt, "erp_prdt", "鍟嗗搧淇℃伅鍑虹幇寮傚父璧勬枡鏈鐞嗭紒", false); } } else if (prdt.getStatus() == 1) { HashMap<String, Object> condition = new HashMap<>(); @@ -120,14 +122,14 @@ condition.put("type", "'" + prdt.getType() + "'"); condition.put("status", "'" + prdt.getStatus() + "'"); erpSqlServer.insert(PrdtBak.class, condition); - callApiLogSave(prdt, "erp_prdt_bak", "ERP涓嬪彂鍟嗗搧淇℃伅澶囦唤鎴愬姛锛�", true); +// callApiLogSave(prdt, "erp_prdt_bak", "ERP涓嬪彂鍟嗗搧淇℃伅澶囦唤鎴愬姛锛�", true); HashMap<String, String> condition2 = new HashMap<>(); condition2.put("prd_no", "'" + prdt.getPrdNo() + "'"); erpSqlServer.delete(Prdt.class, condition2); - callApiLogSave(prdt, "erp_prdt_bak", "ERP涓嬪彂鍟嗗搧淇℃伅澶囦唤鍚庡垹闄ゆ垚鍔燂紒", true); - } else{ - callApiLogSave(prdt, "erp_prdt", "鍟嗗搧淇℃伅鍑虹幇寮傚父璧勬枡锛�", false); +// callApiLogSave(prdt, "erp_prdt_bak", "ERP涓嬪彂鍟嗗搧淇℃伅澶囦唤鍚庡垹闄ゆ垚鍔燂紒", true); + } else { + callApiLogSave(prdt, "erp_prdt", "鍟嗗搧淇℃伅鍑虹幇寮傚父璧勬枡鏈鐞嗭紒", false); } } } @@ -138,8 +140,8 @@ } public void callApiLogSave(Prdt prdt, String tableName, String response, Boolean bool) { - apiLogService.save("ERP涓嬪彂鍟嗗搧淇℃伅", "涓棿琛細" + tableName, "null", ip, - "鍝佸彿锛�" + prdt.getPrdNo() + "鍝佸悕锛�" + prdt.getName() + "绫诲瀷锛�" + prdt.getType() + "鐘舵�侊細" + prdt.getStatus(), + apiLogService.save("ERP涓嬪彂鍟嗗搧淇℃伅", tableName, "null", ip, + "鍝佸彿锛�" + prdt.getPrdNo() + "銆佸搧鍚嶏細" + prdt.getName() + "銆佺被鍨嬶細" + prdt.getType() + "銆佺姸鎬侊細" + prdt.getStatus$(), response, bool); } } -- Gitblit v1.9.1