From 93674068e900b95726ef1ab9fd4dd61b50a1cb2f Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 12 六月 2024 09:56:45 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 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 0660704..0a596ab 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -237,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());
@@ -293,6 +293,8 @@
         waitPakin.setDeadTime(detlDto.getIsoseq());
 
         waitPakin.setLocType(detlDto.getLocType());
+
+        waitPakin.setProcessSts(detlDto.getProcessSts());
 
 
         waitPakin.setAppeUser(userId);
@@ -423,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("褰撳墠妤煎眰娌℃湁绌哄簱浣�");
         }
@@ -501,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("宸ヤ綔鐘舵�佷笉绗﹀悎绂诲満鏉′欢");
@@ -546,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)) {
@@ -556,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);
         //鍏ュ嚭搴撶被鍨�
@@ -582,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("");
@@ -608,6 +628,12 @@
         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());
         if (!agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no",agvWrkMast.getWrkNo()))) {

--
Gitblit v1.9.1