From bbb98371ad9e677127c48320b3ebf863a4c6e7b6 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期日, 15 六月 2025 16:44:43 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java index 2174899..36d77ce 100644 --- a/src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/ReportToThirdServiceImpl.java @@ -210,16 +210,18 @@ } @Override - public void reportTkrk(String batch, String orderNo, Double anfme) { - Object process1 = processTKRK(batch, orderNo, anfme); + public boolean reportTkrk(String matnr, String batch, String orderNo, Double anfme) { + Object process1 = processTKRK(matnr, batch, orderNo, anfme); //鍙戦�佽姹� NcResultMessage response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, saveRefDelivery, JSONObject.toJSONString(process1)); - log.info("閿�鍞彂璐esponse:{}", response); -// if (!Cools.isEmpty(response) && response.isSuccess()) { -// log.info("閿�鍞彂璐esponse:{}", response); -// } else { + log.info("閫�搴撳叆搴搑esponse:{}", response); + if (!Cools.isEmpty(response) && response.isSuccess()) { + log.info("閫�搴撳叆搴搑esponse:{}", response); + return true; + } else { // remark = response.getMessage() + "--" + response.getErrorStack().substring(0, 100); -// } + return false; + } } private Object processXSFH(List<OrderDetl> orderDetls, Boolean flag) { @@ -261,17 +263,17 @@ return data; } - private Object processTKRK(String batch, String orderNo, Double anfme) { - EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); - wrapper.eq("VBATCHCODE", batch).eq("VSOURCEBILLCODE", orderNo); - NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); - if (null == nccXsckmxTkWms) { - throw new CoolException("鏈壘鍒版鏉$爜"); - } + private Object processTKRK(String matnr,String batch, String orderNo, Double anfme) { +// EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); +// wrapper.eq("VBATCHCODE", batch).eq("VSOURCEBILLCODE", orderNo); +// NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); +// if (null == nccXsckmxTkWms) { +// throw new CoolException("鏈壘鍒版鏉$爜"); +// } NccSaleXsfhmxWms nccSaleXsfhmxWms = nccSaleXsfhmxWmsService.selectOne(new EntityWrapper<NccSaleXsfhmxWms>() - .eq("VBILLCODE", nccXsckmxTkWms.getVsourcebillcode()) - .eq("WLBM", nccXsckmxTkWms.getWlbm()) + .eq("VBILLCODE", orderNo) + .eq("WLBM", matnr) ); if(null == nccSaleXsfhmxWms) { throw new CoolException("鏈壘鍒伴攢鍞崟鎹�"); @@ -286,12 +288,11 @@ saleOutBodyVO = new SaleOutBodyVO(); saleOutBodyVO.setCsourcetype("4331"); - saleOutBodyVO.setCsourcebillbid(nccXsckmxTkWms.getCsourcebillbid()); - saleOutBodyVO.setCsourcebillhid(nccXsckmxTkWms.getCsourcebillhid()); + saleOutBodyVO.setCsourcebillbid(nccSaleXsfhmxWms.getCdeliverybid()); + saleOutBodyVO.setCsourcebillhid(nccSaleXsfhmxWms.getCdeliveryid()); saleOutHeadVO.setCwarehouseid(nccSaleXsfhmxWms.getFhckbm()); - saleOutBodyVO.setVbatchcode(nccXsckmxTkWms.getVbatchcode()); - saleOutBodyVO.setNshouldnum(anfme * -1); + saleOutBodyVO.setVbatchcode(batch); saleOutBodyVO.setNnum(anfme * -1); saleOutBodyVOList.add(saleOutBodyVO); -- Gitblit v1.9.1