From 6eecac9d82c970acf021669e3bb4cd782f36bbfe Mon Sep 17 00:00:00 2001
From: lsh <1>
Date: 星期三, 24 一月 2024 11:34:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index c0d6320..c0c1421 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -4,6 +4,7 @@
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.baomidou.mybatisplus.plugins.Page;
 import com.core.common.*;
 import com.core.exception.CoolException;
 import com.zy.asrs.entity.*;
@@ -29,10 +30,7 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * 绉诲姩绔湇鍔℃牳蹇冪被
@@ -88,6 +86,8 @@
     private LocDetlRullUpDetailService locDetlRullUpDetailService;
     @Autowired
     private TagService tagService;
+    @Autowired
+    private BasBoxTypeService basBoxTypeService;
 
 
     @Override
@@ -391,11 +391,11 @@
         } else if (basDevp.getWrkNo()!=0){
             throw new CoolException("212绔欑偣鏈夊伐浣滃彿");
         }
-        int workNo = 20211;
-        WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", 20211));
+        WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 212));
         if (!Cools.isEmpty(wrkMast1)){
             throw new CoolException("浠诲姟妗f宸插瓨鍦紒璇风瓑寰�...");
         }
+        int workNo = commonService.getWorkNo(6);
         Date now = new Date();
         // 鐢熸垚宸ヤ綔妗�
         WrkMast wrkMast = new WrkMast();
@@ -424,6 +424,13 @@
     public void PalletizingCompleteTwoFloorParam(PalletizingCompleteTwoFloorParam param) {
         Long userId = 7777L;//涓帶
         param.setPalletizingNo(212);
+
+        WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>()
+                .eq("io_type", 1).eq("wrk_sts", 1).eq("source_sta_no",212));
+        if (!Cools.isEmpty(wrkMast1)){
+            throw new CoolException("瀛樺湪涓�绗斿伐浣滄。妗堬紝璇峰厛鍏ュ簱锛�");
+        }
+
         //鍒ゆ柇param鍙傛暟
         if (Cools.isEmpty(param.getBarcode())){
             throw new CoolException("鍙傛暟锛氭墭鐩樼爜 barcode涓虹┖");
@@ -483,8 +490,13 @@
             }else {
                 throw new CoolException("鍙傛暟锛氭湪绠辩紪鍙� boxNo:"+matList.getBatch()+",鏈ㄧ缂栫爜瀛樺湪閲嶅");
             }
-        }
 
+            if (locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("batch", matList.getBatch()))!=0
+                    || wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("batch", matList.getBatch()))!=0
+                    || waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("batch", matList.getBatch()))!=0){
+                throw new CoolException("鏈ㄧ缂栧彿锛�"+matList.getBatch()+"宸插瓨鍦紝璇峰嬁閲嶅鍏ュ簱");
+            }
+        }
 
         if (locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()))!=0
                 || wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()))!=0
@@ -1147,4 +1159,19 @@
             throw new CoolException(locDetl.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
         }
     }
+
+    @Override
+    @Transactional
+    public List<Map<String, Object>> boxTypeComb() {
+        EntityWrapper<BasBoxType> wrapper = new EntityWrapper<>();
+        List<Map<String, Object>> result = new ArrayList<>();
+        List<BasBoxType> basBoxTypes = basBoxTypeService.selectList(wrapper.orderBy("id",true));
+        for (BasBoxType basBoxType : basBoxTypes){
+            Map<String, Object> map = new HashMap<>();
+            map.put("boxType", basBoxType.getBoxType());
+            map.put("boxSpecs", basBoxType.getBoxSpecs());
+            result.add(map);
+        }
+        return result;
+    }
 }

--
Gitblit v1.9.1