From 15c8f00ab3a1e3d2d96b56bae0ec11efedd60231 Mon Sep 17 00:00:00 2001 From: 18516761980 <4761516tqsxp> Date: 星期三, 29 九月 2021 11:14:15 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/service/erp/task/ErpScheduler.java | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java b/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java index 9a2bfa6..cf2464e 100644 --- a/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java +++ b/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java @@ -57,6 +57,16 @@ public void inStockExecute(){ List<InStockDto> readyInStock = erpService.getReadyInStock(); for (InStockDto dto : readyInStock) { + + //鍚屼竴鍗曞彿瀛樺湪鐩稿悓鐗╂枡缂栫爜鏁版嵁锛岃鍗曞彿涓嶄簣澶勭悊 + Number fnumberCount = erpService.QueryFnumberInCount(dto.getInStockBill().getFInterID()); + if(fnumberCount.intValue() > 1){ + if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo(),-1)) { + log.error("鏍囪鍘熸潗鏂欏叆搴撻�氱煡鍗曞凡璇籌nStockBill涓�-1澶辫触[FBillNo={},FInterID={}]", dto.getInStockBill().getFBillNo(),dto.getInStockBill().getFInterID()); + } + continue; + } + for (InStockBillEntry entry : dto.getInStockBillEntries()) { MatCode matCode = matCodeService.selectById(entry.getFnumber()); if (null != matCode) { @@ -100,7 +110,7 @@ } } } - if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo())) { + if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo(),1)) { log.error("鏍囪鍘熸潗鏂欏叆搴撻�氱煡鍗曞凡璇籌nStockBill澶辫触[FBillNo={}]", dto.getInStockBill().getFBillNo()); } } @@ -116,6 +126,16 @@ public void inCPICMOExecute(){ List<CPICMO> cpicmos = erpService.getReadyCPICMO(); for (CPICMO cpicmo : cpicmos) { + + //鍚屼竴鍗曞彿瀛樺湪鐩稿悓鐗╂枡缂栫爜鏁版嵁锛岃鍗曞彿涓嶄簣澶勭悊 + Number fnumberCount = erpService.QueryFnumberCPICMOCount(cpicmo.getFInterID()); + if(fnumberCount.intValue() > 1){ + if (!erpService.haveReadCPICMO(cpicmo.getFInterID(),-1)) { + log.error("鏍囪鎴愬搧鍏ュ簱閫氱煡鍗曞凡璇籆PICMO涓�-1澶辫触[Fnumber={},FInterID={}]", cpicmo.getFnumber(),cpicmo.getFInterID()); + } + continue; + } + MatCode matCode = matCodeService.selectById(cpicmo.getFnumber()); if (null != matCode) { // 鐢熸垚鍏ュ簱閫氱煡鍗� @@ -151,7 +171,7 @@ log.info("鍚屾鏇存柊鎴愬搧鍏ュ簱閫氱煡鍗旵PICMO澶辫触[FBillNo={},Fnumber={}]", waitPakin.getSupplier(), waitPakin.getMatnr()); } } - if (!erpService.haveReadCPICMO(cpicmo.getFBillNo())) { + if (!erpService.haveReadCPICMO(cpicmo.getFInterID(),1)) { log.error("鏍囪鎴愬搧鍏ュ簱閫氱煡鍗曞凡璇籆PICMO澶辫触[FBillNo={}]", cpicmo.getFBillNo()); } } @@ -198,6 +218,16 @@ List<OutStockBill> outStockBills = erpService.syncOutStock(); for (Integer i = 0; i < outStockBills.size(); i++) { OutStockBill outStockBill = outStockBills.get(i); + + //鍚屼竴鍗曞彿瀛樺湪鐩稿悓鐗╂枡缂栫爜鏁版嵁锛岃鍗曞彿涓嶄簣澶勭悊 + Number fnumberCount = erpService.QueryFnumberOutCount(outStockBill.getFInterID()); + if(fnumberCount.intValue() > 1){ + if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID(),-1)) { + log.error("鏇存柊鍑哄簱閫氱煡鍗曡鍙栫姸鎬佷负-1澶辫触[FBrNo={},FInterID={}]", outStockBill.getFBrNo(),outStockBill.getFInterID()); + } + continue; + } + OutStockBill main = outStockMainService.selectOne(new EntityWrapper<OutStockBill>().eq("FBillNo",outStockBill.getFBillNo()).and().eq("FInterID", outStockBill.getFInterID())); if (null == main) { outStockBill.setFflag_rw(1); @@ -242,7 +272,7 @@ } - if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID())) { + if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID(),1)) { log.error("鏇存柊鍑哄簱閫氱煡鍗曡鍙栫姸鎬佸け璐FBrNo={},FInterID={}]", outStockBill.getFBrNo(),outStockBill.getFInterID()); } } -- Gitblit v1.9.1