From 58c4a2210dadf2e7cbcee3851fd719730df2b6d8 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期一, 09 三月 2026 19:30:59 +0800
Subject: [PATCH] no message

---
 src/main/java/com/zy/asrs/controller/OpenController.java      |   26 ++++++
 src/main/java/com/zy/asrs/entity/param/StockOutParam.java     |   43 ++++++++++
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |  139 ----------------------------------
 3 files changed, 69 insertions(+), 139 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index 7b3e816..7e82c13 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -53,7 +53,6 @@
     private WaitPakinService waitPakinService;
 
 
-
     /**
      * 缁勬墭鏌ヨ鎺ュ彛
      */
@@ -75,6 +74,31 @@
     }
 
     /**
+     * 浠诲姟鏌ヨ鎺ュ彛
+     */
+    @PostMapping("/queryTask")
+    public synchronized R queryTask(@RequestBody QueryTaskParam param) {
+        if (Cools.isEmpty(param)) {
+            return R.parse(BaseRes.PARAM);
+        }
+        if (Cools.isEmpty(param.getTaskNo())) {
+            return R.error("浠诲姟鍙穂taskNo]涓嶈兘涓虹┖");
+        }
+        WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no",param.getTaskNo()));
+        if (wrkMast == null) {
+            return R.error("浠诲姟涓嶅瓨鍦�");
+        }
+
+        List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(Integer.valueOf(param.getTaskNo()));
+
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("taskNo", param.getTaskNo());
+        map.put("ioType", wrkMast.getIoType());
+        map.put("wrkDetls", wrkDetls);
+        return R.ok().add(map);
+    }
+
+    /**
      * 搴撳瓨淇℃伅鏌ヨ鎺ュ彛
      */
     @GetMapping("/queryLoc")
diff --git a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
index 331d3b0..aa3524e 100644
--- a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
@@ -1,5 +1,7 @@
 package com.zy.asrs.entity.param;
 
+import com.baomidou.mybatisplus.annotations.TableField;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.List;
@@ -31,6 +33,47 @@
         // 鏁伴噺
         private Double count;
 
+        private String brand;
+
+        /**
+         * 澶囩敤1
+         */
+        @ApiModelProperty(value= "澶囩敤1")
+        private String standby1 = "";
+
+        /**
+         * 澶囩敤2
+         */
+        @ApiModelProperty(value= "澶囩敤2")
+        private String standby2 = "";
+
+        /**
+         * 澶囩敤3
+         */
+        @ApiModelProperty(value= "澶囩敤3")
+        private String standby3 = "";
+
+        /**
+         * 澶囩敤1
+         */
+        @ApiModelProperty(value= "澶囩敤1")
+        @TableField("box_type1")
+        private String boxType1 = "1";
+
+        /**
+         * 澶囩敤2
+         */
+        @ApiModelProperty(value= "澶囩敤2")
+        @TableField("box_type2")
+        private String boxType2 = "1";
+
+        /**
+         * 澶囩敤3
+         */
+        @ApiModelProperty(value= "澶囩敤3")
+        @TableField("box_type3")
+        private String boxType3 = "1";
+
     }
 
 }
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 8b58225..5a20ba6 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1673,7 +1673,7 @@
             WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>()
                     .eq("matnr", stationDetl.getMatnr())
                     .eq("wrk_no", wrkMast.getWrkNo())
-                    .eq("suppCode", combMat.getSuppCode()));
+                    .eq("supp_code", combMat.getSuppCode()));
 
             if (Objects.isNull(wrkDetl)) {
                 //TODO 鏂版彃鍏�
@@ -1703,143 +1703,6 @@
             }
 
         }
-//        // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
-//        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())
-//                .eq("io_status", "N")) > 0) {
-//            throw new CoolException(param.getBarcode() + "鏁版嵁姝e湪杩涜鍏ュ簱");
-//        }
-//
-//        int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()));
-//        int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()));
-//        if (countWrk > 0 || countLoc > 0) {
-//            WrkMast wrkDetl = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", param.getBarcode()));
-//            if (!wrkDetl.getIoType().equals(TaskIOType.MERGE_OUT.type)) {
-//                throw new CoolException("缁勬墭妗�/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
-//            }
-//        }
-//        int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode()));
-//        if (countwait > 0) {
-//            throw new CoolException("缁勬墭妗�/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
-//        }
-//
-//        // 鐢熸垚鍏ュ簱閫氱煡妗�
-//        List<DetlDto> detlDtos = new ArrayList<>();
-//        param.getCombMats().forEach(elem -> {
-//            DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(),
-//                    elem.getStandby2(), elem.getStandby3(),
-//                    elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3(), elem.getAnfme(), elem.getThreeCode());
-//            if (DetlDto.has(detlDtos, detlDto)) {
-//                DetlDto one = DetlDto.findDto(detlDtos, detlDto);
-//                assert one != null;
-//                one.setAnfme(one.getAnfme() + detlDto.getAnfme());
-//            } else {
-//                detlDtos.add(detlDto);
-//            }
-//        });
-//        BasContainer container = basContainerService
-//                .selectOne(new EntityWrapper<BasContainer>().eq("barcode", param.getBarcode()));
-//        if (Objects.isNull(container)) {
-//            throw new CoolException("鏁版嵁閿欒锛氬鍣ㄧ爜涓嶅瓨鍦紒锛�");
-//        }
-//        if (container.getMixMax() < detlDtos.size()) {
-//            throw new CoolException("瓒呭嚭瀹瑰櫒鏈�澶ф贩瑁呮暟閲忥紝褰撳墠瀹瑰櫒鏈�澶ф暟閲忎负锛�" + container.getMixMax() + "!!");
-//        }
-//        List<Mat> tempMats = new ArrayList<>();
-//        for (DetlDto detlDto : detlDtos) {
-//            Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", detlDto.getMatnr())
-//                    .eq("supp_code", detlDto.getStandby1()));
-//            tempMats.add(mat);
-//        }
-//        Set<Long> tagIds = tempMats.stream().map(Mat::getTagId).collect(Collectors.toSet());
-//        if (tagIds.size() > 1) {
-//            throw new CoolException("缁勬墭鐗╂枡绫诲瀷涓嶄竴鑷达紝鍙湁鐩稿悓鐨勭墿鏂欏垎绫绘墠鍙互缁勬墭锛侊紒");
-//        }
-//        // 杩樺彲浠ユ斁鍏ュ灏戠鐗╂枡
-//        Double suplus = container.getMixMax();
-//        Date now = new Date();
-//        for (DetlDto detlDto : detlDtos) {
-//            Mat mat = matService.selectByMatnr(detlDto.getMatnr());
-//            if (Cools.isEmpty(mat)) {
-//                throw new CoolException(detlDto.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
-//            }
-//            // 鏈�澶氬彲鏀炬暟閲�
-//            Double singleMax = mat.getUpQty() * suplus;
-//            if (singleMax.compareTo(detlDto.getAnfme()) < 0) {
-//                throw new CoolException("鐗╂枡锛�" + detlDto.getMatnr() + "鍗曟缁勬墭涓婇檺涓猴細" + mat.getUpQty() + ",褰撳墠鎬婚噺瓒呭嚭鎵樼洏瑁呰浇涓婇檺!!");
-//            }
-//            BigDecimal decimal = new BigDecimal(detlDto.getAnfme() / mat.getUpQty());
-//            // 褰撳墠鐗╂枡闇�瑕佸崰鐢ㄦ枡绠辨牸鏁�
-//            Integer curr = decimal.setScale(0, RoundingMode.CEILING).intValue();
-//            suplus = suplus - curr;
-//            if (suplus < 0) {
-//                throw new CoolException("鐗╂枡锛�" + detlDto.getMatnr() + ", 瓒呭嚭褰撳墠鎵樼洏瑁呰浇涓婇檺锛侊紒");
-//            }
-//
-//            BasStationDetl stationDetl = basStationDetlService.selectOne(new EntityWrapper<BasStationDetl>()
-//                    .eq("zpallet", param.getCarBarcode())
-//                    .eq("three_code", detlDto.getThreeCode()));
-//            if (Objects.isNull(stationDetl)) {
-//                throw new CoolException("鏄庣粏鍐呭涓嶅瓨鍦紒锛�");
-//            }
-//
-//            Double v = Math.round((stationDetl.getAnfme() - stationDetl.getWorkQty()) * 10000) / 10000.0;
-//            if (detlDto.getAnfme().compareTo(v) > 0) {
-//                throw new CoolException("缁勬墭涓婇檺涓猴細" + stationDetl.getAnfme() + ", 宸茬粍鎵橈細" + stationDetl.getWorkQty() + ", 杩樺彲缁勬墭锛�" + v);
-//            }
-//
-//            WaitPakin waitPakin = new WaitPakin();
-//            BeanUtils.copyProperties(mat, waitPakin);
-//            waitPakin.setBatch(detlDto.getBatch());
-//            waitPakin.setType(param.getType());
-//            waitPakin.setZpallet(param.getBarcode());
-//            // 璁剧疆缁勬墭绫诲瀷
-//            waitPakin.setType(param.getType());
-//            waitPakin.setIoStatus("N");
-//            waitPakin.setAnfme(detlDto.getAnfme());
-//            waitPakin.setThreeCode(detlDto.getThreeCode());
-//            waitPakin.setStatus("Y");
-//            waitPakin.setSuppCode(detlDto.getStandby1());
-//            waitPakin.setStandby1(detlDto.getStandby1());
-//            waitPakin.setStandby2(detlDto.getStandby2());
-//            waitPakin.setStandby3(detlDto.getStandby3());
-//            waitPakin.setBoxType1(detlDto.getBoxType1());
-//            waitPakin.setBoxType2(detlDto.getBoxType2());
-//            waitPakin.setBoxType3(detlDto.getBoxType3());
-//            waitPakin.setAppeUser(userId);
-//            waitPakin.setAppeTime(now);
-//            waitPakin.setModiUser(userId);
-//            waitPakin.setModiTime(now);
-//            if (!waitPakinService.insert(waitPakin)) {
-//                throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
-//            }
-//
-//            Double v1 = Math.round((stationDetl.getWorkQty() + detlDto.getAnfme()) * 10000) / 10000.0;
-//            stationDetl.setWorkQty(v1);
-//
-//            if (!basStationDetlService.updateById(stationDetl)) {
-//                throw new CoolException("绔欑偣鏄庣粏淇敼澶辫触");
-//            }
-//
-//            if (v1.compareTo(stationDetl.getAnfme()) >= 0) {
-//                if (!basStationDetlService.deleteById(stationDetl)) {
-//                    throw new CoolException("鍘熷鏁版嵁绉婚櫎澶辫触锛�");
-//                }
-//            }
-//
-//            List<BasStationDetl> stas = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>()
-//                    .eq("dev_no", stationDetl.getDevNo()));
-//            if (Objects.isNull(stas) || stas.isEmpty()) {
-//                BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", stationDetl.getDevNo()));
-//                if (Objects.isNull(station)) {
-//                    throw new CoolException("鏁版嵁閿欒锛岀珯鐐逛笉瀛樺湪锛侊紒");
-//                }
-//                station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
-//                station.setBarcode("");
-//                if (!basStationService.updateById(station)) {
-//                    throw new CoolException("绔欑偣鐘舵�佹洿鏂板け璐ワ紒锛�");
-//                }
-//            }
-//        }
     }
 
     /**

--
Gitblit v1.9.1