From ce4a6c80a379cd46acd59c8aff9212ad8d399825 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 12 六月 2024 13:53:22 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 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 c9cf88c..0a596ab 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java @@ -9,6 +9,7 @@ import com.zy.asrs.entity.*; import com.zy.asrs.entity.param.*; import com.zy.asrs.service.*; +import com.zy.asrs.utils.CodeDetectionUtil; import com.zy.common.model.DetlDto; import com.zy.common.service.AgvCommonService; import lombok.Synchronized; @@ -67,6 +68,9 @@ public String comb(CombParam param, Long userId) { if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { throw new CoolException(BaseRes.PARAM); + } + if (!CodeDetectionUtil.barcodeDetection(param.getBarcode())){ + throw new CoolException(param.getBarcode() + "璐ф灦鐮佹湁璇紝璇锋纭壂鐮侊紒锛侊紒"); } param.setContainerType(Short.valueOf(param.getBarcode().substring(0,2))); @@ -233,7 +237,7 @@ checkOrderQty(order,combMat); } - DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType()); + DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType(),combMat.getProcessSts()); //鍚屼竴璐ф灦涓嬬浉鍚岀墿鏂欎俊鎭拰鎵瑰彿杞负涓�涓叆搴撻�氱煡妗� if (DetlDto.has(detlDtos, detlDto)) { DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),detlDto.getContainerCode()); @@ -289,6 +293,8 @@ waitPakin.setDeadTime(detlDto.getIsoseq()); waitPakin.setLocType(detlDto.getLocType()); + + waitPakin.setProcessSts(detlDto.getProcessSts()); waitPakin.setAppeUser(userId); @@ -419,7 +425,7 @@ throw new CoolException("褰撳墠"+agvLocMast.getBarcode()+"璐ф灦鐮佸凡鍦ㄥ伐浣滄。涓�"); } //妫�绱㈠簱浣嶏紝閫夋嫨鍚堥�傜殑搴撲綅 - AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor); + AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor,false,true); if (Cools.isEmpty(locMast)) { throw new CoolException("褰撳墠妤煎眰娌℃湁绌哄簱浣�"); } @@ -497,10 +503,16 @@ @Synchronized public String allocationOut(AgvMobileStartPakin param, Long userId) { Date now = new Date(); + if(Cools.isEmpty(param.getBarcode())) { + throw new CoolException("璇疯緭鍏ヨ揣鏋剁爜"); + } AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", param.getDevNo())); Integer oldWrkNo = agvWrkMast.getWrkNo(); if (Cools.isEmpty(agvWrkMast)) { throw new CoolException("宸ヤ綔妗d腑娌℃湁姝ょ珯鐐逛换鍔�"); + } + if (!agvWrkMast.getBarcode().equals(param.getBarcode())) { + throw new CoolException("褰撳墠璐ф灦鐮佷笌浠诲姟涓嶅尮閰�"); } if (!agvWrkMast.getWrkSts().equals(207L)) { throw new CoolException("宸ヤ綔鐘舵�佷笉绗﹀悎绂诲満鏉′欢"); @@ -542,8 +554,14 @@ public String allocationIn(AgvMobileStartPakin param, Long userId) { Date now = new Date(); AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getBarcode())); + if (Cools.isEmpty(agvWrkMast)) { + throw new CoolException("鏆傛棤褰撳墠璐ф灦鐮佺殑浠诲姟"); + } if (agvWrkMast.getIoType() != 111) { throw new CoolException("闈炴墜鍔ㄨ皟鎷ㄤ换鍔★紝涓嶆敮鎸佹鍔熻兘"); + } + if (!Cools.isEmpty(agvWrkMast.getSourceLocNo())) { + throw new CoolException("褰撳墠璐ф灦鐮佷换鏈夋簮搴撲綅锛岃纭"); } AgvBasDevp agvBasDevp = agvBasDevpService.selectByDevNo(param.getDevNo()); if (Cools.isEmpty(agvWrkMast)) { @@ -552,7 +570,7 @@ if (agvWrkMast.getCrnNo() != agvBasDevp.getFloor()) { throw new CoolException("璇风Щ鍔ㄥ埌->" + agvWrkMast.getCrnNo() + "妤煎叆搴撶偣鍏ュ簱"); } - AgvLocMast locNo = agvCommonService.getLocNo(3, 1); + AgvLocMast locNo = agvCommonService.getLocNo(3, 1,false,true); //宸ヤ綔鐘舵�� agvWrkMast.setWrkSts(211L); //鍏ュ嚭搴撶被鍨� @@ -578,10 +596,16 @@ @Synchronized public String empOut(AgvMobileStartPakin param, Long userId) { Date now = new Date(); + if (Cools.isEmpty(param.getBarcode())) { + throw new CoolException("璇疯緭鍏ヨ揣鏋剁爜"); + } AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", param.getDevNo())); Integer oldWrkNo = agvWrkMast.getWrkNo(); if (Cools.isEmpty(agvWrkMast)) { throw new CoolException("宸ヤ綔妗d腑娌℃湁姝ょ珯鐐逛换鍔�"); + } + if (!agvWrkMast.getBarcode().equals(param.getBarcode())) { + throw new CoolException("褰撳墠璐ф灦鐮佷笌浠诲姟涓嶅尮閰�"); } agvWrkMast.setWrkSts(213L); agvWrkMast.setSourceLocNo(""); @@ -603,6 +627,12 @@ AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getBarcode())); if (Cools.isEmpty(agvWrkMast)) { throw new CoolException("宸ヤ綔妗d腑娌℃湁姝ょ珯鐐逛换鍔�"); + } + if (agvWrkMast.getIoType() != 113) { + throw new CoolException("褰撳墠宸ヤ綔绫诲瀷涓嶈兘绌烘灦杩涘満"); + } + if (agvWrkMast.getWrkSts() != 213) { + throw new CoolException("褰撳墠宸ヤ綔绫诲瀷涓嶈兘绌烘灦杩涘満"); } agvWrkMast.setWrkSts(214L); agvWrkMast.setSourceLocNo(param.getDevNo()); @@ -636,6 +666,12 @@ @Override @Transactional public String doBack(AgvMobileStartPakin param, Long userId) { + if (Cools.isEmpty(param.getBarcode()) || !CodeDetectionUtil.barcodeDetection(param.getBarcode())){ + throw new CoolException(param.getBarcode() + "璐ф灦鐮佹湁璇紝璇锋纭壂鐮侊紒锛侊紒"); + } + if (Cools.isEmpty(param.getDevNo()) || !CodeDetectionUtil.carCodeDetection(param.getDevNo())){ + throw new CoolException(param.getDevNo() + "灏忚溅鍦扮爜鏈夎锛岃姝g‘鎵爜锛侊紒锛�"); + } Date now = new Date(); AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", param.getDevNo())); AgvWrkMast agvWrkMastSource = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", param.getDevNo())); -- Gitblit v1.9.1