From 735c99bbbcba0fc0a68e60bec4d6e8c64b9d729d Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 08 十月 2024 09:39:28 +0800 Subject: [PATCH] -- --- src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java index aed1682..1dd5e23 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java @@ -177,7 +177,7 @@ } } } - if (agvLocDetls.size() == sameNumber) { + if (agvLocDetls.size() == sameNumber || agvLocDetls.size() == 1) { agvWrkMast.setIoType(101); agvWrkMast.setModiTime(new Date()); agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no", pickParams.getWrkNo())); @@ -517,7 +517,10 @@ if (ioType == 12 && locMast.getFloor() == 1 && floor != 4 && agvLocMast.getFloor() != 1) { List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", agvLocMast.getLocNo())); for (AgvLocDetl agvLocDetl : agvLocDetls) { - OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("three_code", agvLocDetl.getThreeCode()).eq("matnr", agvLocDetl.getMatnr()).eq("order_no", "DB" + agvLocDetl.getOrderNo())); + OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("three_code", agvLocDetl.getThreeCode()).eq("matnr", agvLocDetl.getMatnr()).eq("source", 33)); + if (Cools.isEmpty(orderDetl)) { + throw new CoolException("褰撳墠鐗╂枡鐨勮皟鎷ㄥ崟涓嶅瓨鍦紒"); + } orderDetl.setQty(orderDetl.getQty() - agvLocDetl.getAnfme()); if (!orderDetlService.updateById(orderDetl)) { throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); @@ -549,8 +552,28 @@ if (!agvWrkMast.getBarcode().equals(param.getBarcode())) { throw new CoolException("褰撳墠璐ф灦鐮佷笌浠诲姟涓嶅尮閰�"); } - if (!agvWrkMast.getWrkSts().equals(207L)) { - throw new CoolException("宸ヤ綔鐘舵�佷笉绗﹀悎绂诲満鏉′欢"); + if (!agvWrkMast.getWrkSts().equals(207L) && !agvWrkMast.getWrkSts().equals(205L)) { + throw new CoolException("褰撳墠宸ヤ綔鐘舵��:" + agvWrkMast.getWrkSts$() +"涓嶇鍚堢鍦烘潯浠�"); + } + if (agvWrkMast.getWrkSts().equals(205L)) { + // 搴撲綅 -- 鎺ラ┏浣� / 搴撲綅 + if (agvWrkMast.getLocNo().substring(0,2).equals("DB")) { + agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); + // 鎺ラ┏浣� -- 搴撲綅 + } else { + agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"D",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); + } + + // 鎺ラ┏浣� -- 搴撲綅 + if (agvWrkMast.getSourceLocNo().substring(0,2).equals("DB")) { + agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getSourceLocNo(),"O","",(short)0); + // 搴撲綅 -- 鎺ラ┏浣� / 搴撲綅 + } else { + //淇敼婧愬簱浣嶇姸鎬佷负O + agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",agvWrkMast.getWhsType().shortValue(),"",(short)0); + //鏇存柊鐩爣搴撲綅鏄庣粏 101.鍑哄簱 鍒犻櫎婧愬簱浣嶅簱瀛樻槑缁� + agvLocDetlService.delete(new EntityWrapper<AgvLocDetl>().eq("loc_no",agvWrkMast.getSourceLocNo())); + } } //鐢熸垚AGV宸ヤ綔鍘嗗彶妗� + 鐢熸垚AGV宸ヤ綔鏄庣粏鍘嗗彶妗� @@ -573,7 +596,7 @@ } } // 鏇存柊绔欑偣鐘舵�� - agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",null); +// agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",null); // 鏇存柊婧愬簱浣嶇姸鎬� agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); -- Gitblit v1.9.1