From 36cf5201b1d67c8307d113c44df6670b949e6073 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 04 九月 2024 10:04:47 +0800 Subject: [PATCH] 订单同步接口的docType --- src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java index 28ca056..9a23068 100644 --- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java @@ -58,6 +58,8 @@ private String orderReportPath; @Value("${mes.pakinReportPath}") private String pakinReportPath; + @Value("${mes.buyPakinReportPath}") + private String buyPakinReportPath; @Value("${mes.pakoutReportPath}") private String pakoutReportPath; @Value("${mes.getTokenPath}") @@ -113,6 +115,7 @@ agvBasDevp = agvWrkMast.getSourceLocNo(); } + //淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚 agvWrkMast.setWrkSts(207L); agvWrkMastService.updateById(agvWrkMast); @@ -166,11 +169,30 @@ agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getSourceLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); break; + case 57: + Date now = new Date(); + // 鏇存柊搴撳瓨鏄庣粏 + List<AgvWrkDetl> wrkDetlList = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", agvWrkMast.getWrkNo())); + wrkDetlList.forEach(agvWrkDetl -> { + AgvLocDetl agvLocDetl = new AgvLocDetl(); + agvLocDetl.setLocNo(agvWrkMast.getLocNo()); + agvLocDetl.sync(agvWrkDetl); + agvLocDetl.setModiTime(now); + agvLocDetl.setAppeTime(now); + if (!agvLocDetlService.insert(agvLocDetl)) { + throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); + } + }); + // 鏇存柊绔欑偣 + 搴撲綅鐘舵�� 婧愬簱浣嶆槸绔欑偣 + agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getSourceLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); + agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); + break; case 58: agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getSourceLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); break; case 108: + case 114: agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); //鏇存柊搴撳瓨鏄庣粏 agvLocDetlService.updateStock(agvWrkMast.getSourceLocNo(),agvWrkMast.getLocNo()); @@ -645,11 +667,14 @@ iteam.setStorageLocationCode(agvWrkMast.getLocNo()); iteam.setLineNo(orderDetl.getItemNum()); iteam.setSupplierCode(order.getSalesman()); + iteam.setUnit(agvWrkDetl.getUnit()); + + iteams.add(iteam); mesBuyPakinReportParam.setCode(orderNo); mesBuyPakinReportParam.setIteam(iteams); - doHttpRequest(mesBuyPakinReportParam,getMesTokenInfo(),"涓婃姤mes閲囪喘鍏ュ簱淇℃伅",url,pakinReportPath,null,"127.0.0.1"); + doHttpRequest(mesBuyPakinReportParam,getMesTokenInfo(),"涓婃姤mes閲囪喘鍏ュ簱淇℃伅",url,buyPakinReportPath,null,"127.0.0.1"); }else { MesPakinReportParam mesPakinReportParam = new MesPakinReportParam(); -- Gitblit v1.9.1