From 7f9a488ea0b82e1e09b1d92a5bd83e5127d060f4 Mon Sep 17 00:00:00 2001 From: zhangchao <zc857179121@qq.com> Date: 星期三, 16 十月 2024 13:09:25 +0800 Subject: [PATCH] 证书问题 --- src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 44 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 38 insertions(+), 6 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 cb738c8..c7a658d 100644 --- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java @@ -115,6 +115,8 @@ agvBasDevp = agvWrkMast.getSourceLocNo(); } + + agvWrkMast.setModiTime(new Date()); //淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚 agvWrkMast.setWrkSts(207L); agvWrkMastService.updateById(agvWrkMast); @@ -168,11 +170,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()); @@ -259,15 +280,22 @@ //鍒犻櫎AGV宸ヤ綔鏄庣粏妗� agvWrkDetlService.delete(new EntityWrapper<AgvWrkDetl>().eq("wrk_no",wrkNo)); } +// else { +// agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); +// if (!agvWrkMast.getSourceLocNo().substring(0,2).equals("DB")) { +// agvWrkMast.setSourceLocNo(""); +// } +// agvWrkMastService.updateById(agvWrkMast); +// } if(!isJSON(orderNo)){ //妫�鏌ヨ鍗曟槸鍚﹀凡瀹屾垚 - orderService.checkComplete(orderNo); + orderService.checkComplete(orderNo,agvWrkMast.getLocNo()); }else{ List<Map> maps = JSONArray.parseArray(orderNo, Map.class); maps.forEach(map -> { String o = map.get("orderNo").toString(); - orderService.checkComplete(o); + orderService.checkComplete(o,agvWrkMast.getLocNo()); }); } @@ -300,6 +328,7 @@ String orderNo = getOrderNoByWrkNo(wrkNo); //淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚 agvWrkMast.setWrkSts(207L); + agvWrkMast.setModiTime(new Date()); agvWrkMastService.updateById(agvWrkMast); //淇敼婧愬簱浣嶇姸鎬佷负O if (agvWrkMast.getIoType() == 110) { @@ -362,12 +391,12 @@ agvWrkDetlService.delete(new EntityWrapper<AgvWrkDetl>().eq("wrk_no",wrkNo)); if(!isJSON(orderNo)){ //妫�鏌ヨ鍗曟槸鍚﹀凡瀹屾垚 - orderService.checkComplete(orderNo); + orderService.checkComplete(orderNo,agvWrkMast.getLocNo()); }else{ List<Map> maps = JSONArray.parseArray(orderNo, Map.class); maps.forEach(map -> { String o = map.get("orderNo").toString(); - orderService.checkComplete(o); + orderService.checkComplete(o,agvWrkMast.getLocNo()); }); } @@ -400,6 +429,7 @@ } //淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚 agvWrkMast.setWrkSts(207L); + agvWrkMast.setModiTime(new Date()); agvWrkMastService.updateById(agvWrkMast); //淇敼婧愬簱浣嶇姸鎬佷负O agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",null); @@ -418,12 +448,12 @@ agvWrkDetlService.delete(new EntityWrapper<AgvWrkDetl>().eq("wrk_no",wrkNo)); if(!isJSON(orderNo)){ //妫�鏌ヨ鍗曟槸鍚﹀凡瀹屾垚 - orderService.checkComplete(orderNo); + orderService.checkComplete(orderNo,agvWrkMast.getLocNo()); }else{ List<Map> maps = JSONArray.parseArray(orderNo, Map.class); maps.forEach(map -> { String o = map.get("orderNo").toString(); - orderService.checkComplete(o); + orderService.checkComplete(o,agvWrkMast.getLocNo()); }); } //涓婃姤mes @@ -452,6 +482,7 @@ } agvWrkMast.setWrkSts(202L); + agvWrkMast.setModiTime(new Date()); agvWrkMastService.updateById(agvWrkMast); if(agvWrkMast.getIoType() == 1){ //淇敼AGV鍏ュ簱閫氱煡妗g姸鎬佸叆鍑虹姸鎬佷负Y @@ -517,6 +548,7 @@ Map<String, Object> devNoMap = devNoMaps.get(0); if((int)devNoMap.get("num") < maxWrokNum){ agvWrkMast.setLocNo(devNoMap.get("dev_no").toString()); + agvWrkMast.setModiTime(new Date()); agvWrkMastService.updateById(agvWrkMast); log.info("after锛�" + devNoMap.toString() + ", wrkNo:" + agvWrkMast.getWrkNo() + ", locNo: " + agvWrkMast.getLocNo()); } -- Gitblit v1.9.1