From 4391af490bdc1ecbe0d0e949dc4fc3b95bead0cf Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 06 八月 2025 19:07:09 +0800
Subject: [PATCH] 8-6问题修复

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java |   78 +++++++++++++++++++++++++++++++++++---
 1 files changed, 71 insertions(+), 7 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
index 39f9fe5..9210137 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
@@ -13,6 +13,7 @@
 import com.zy.asrs.wms.asrs.entity.dto.OrderInfoDto;
 import com.zy.asrs.wms.asrs.entity.dto.PickSheetDetlDto;
 import com.zy.asrs.wms.asrs.entity.dto.ShippingOrderDetlDto;
+import com.zy.asrs.wms.asrs.entity.enums.OrderType;
 import com.zy.asrs.wms.asrs.entity.param.BatchMergeOrdersParam;
 import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
 import com.zy.asrs.wms.asrs.service.MobileService;
@@ -26,6 +27,7 @@
 import com.zy.asrs.wms.system.service.UserService;
 import io.jsonwebtoken.lang.Collections;
 import io.netty.util.internal.StringUtil;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
@@ -64,6 +66,7 @@
      * @param barcode
      * @return
      */
+    @ApiOperation("鍏ュ簱鍗曟嵁--鎵爜鑾峰彇璁㈠崟鏄庣粏鍒楄〃")
     @PostMapping("/mat/auth")
     public R getProductForBarcode(@RequestBody Map<String, String> barcode) {
         if (Objects.isNull(barcode)) {
@@ -78,7 +81,9 @@
             return R.error("璁㈠崟涓嶅瓨鍦紒");
         }
 
-        List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId());
+
+
+        List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId() , barcode.get("matnr"));
 
         return R.ok(orders);
     }
@@ -151,7 +156,7 @@
             return R.parse(CodeRes.USER_10003);
         }
         String system = null;//鐧婚檰绯荤粺
-        if (wms) {
+        if (Objects.isNull(wms) || wms) {
             system = String.valueOf(LoginSystemType.WMS);
         }else {
             system = String.valueOf(LoginSystemType.WCS);
@@ -174,6 +179,12 @@
     }
 
 
+    /**
+     * @author Ryan
+     * @date 2025/6/25
+     * @description: 缁勬墭
+     * @version 1.0
+     */
     @PostMapping("/comb/auth")
     public  R combMats(@RequestBody BatchMergeOrdersParam ordersParam) {
         if (StringUtil.isNullOrEmpty(ordersParam.getOrderNo())) {
@@ -187,11 +198,15 @@
         }
 
         String str = ordersParam.getMergeNo().trim();
-        // CUT搴撴潯鐮乀寮�澶达紝鎴彇鍚�10浣�
+        // CTU搴撴潯鐮乀寮�澶达紝鎴彇鍚�10浣�
         if (str.charAt(0) == 'T') {
             ordersParam.setMergeNo(str.substring(str.length() - 10));
         }
-
+        if (str.startsWith("PK")) {
+            ordersParam.setInType(OrderType.PK_IN_ORDER.id);
+        } else {
+            ordersParam.setInType(OrderType.UTC_OUT_ORDER.id);
+        }
        boolean result = mobileService.batchMergeOrders(ordersParam);
         if (result) {
             return R.ok("缁勬墭鎴愬姛锛侊紒");
@@ -272,6 +287,32 @@
     }
 
 
+    @ApiOperation("鑾峰彇搴撲綅璇︾粏")
+    @GetMapping("/flat/transfer/{barcode}")
+    public R getDetlsBycode(@PathVariable String barcode) {
+        if (Objects.isNull(barcode)) {
+            return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        return R.ok().add(mobileService.getDetlsByCode(barcode));
+    }
+
+
+    @ApiOperation("骞虫澘杞Щ")
+    @PostMapping("/locs/transfer")
+    public R changeFlatBarcode(@RequestBody Map<String, String> param) {
+        if (Objects.isNull(param)) {
+            return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("barcode"))) {
+            return R.error("婧愬簱浣嶄笉鑳戒负绌猴紒锛�");
+        }
+        if (Objects.isNull(param.get("tarCode"))) {
+            return R.error("鐩爣搴撲綅涓嶈兘涓虹┖锛侊紒");
+        }
+
+        return mobileService.transferLocs(param);
+    }
+
     /**
      * 鑾峰彇鍙戣揣璁㈠崟鏄庣粏
      * @return
@@ -284,6 +325,31 @@
         return mobileService.selectShippingDetl(params);
     }
 
+
+    /**
+     * @author Ryan
+     * @date 2025/6/28
+     * @description: 鑾峰彇鎺ㄨ崘搴撲綅
+     * @version 1.0
+     */
+    @GetMapping("/recommend/locs")
+    public R getRecommend() {
+        return  mobileService.getRecommendLocs();
+    }
+
+
+    /**
+     * @author Ryan
+     * @date 2025/6/28
+     * @description: 鏌ヨ鐗╂枡淇℃伅
+     * @version 1.0
+     */
+    @GetMapping("/mats/search/{matnr}")
+    public R getMats(@PathVariable String matnr) {
+        return mobileService.getMatsByCode(matnr);
+    }
+
+
     /**
      * 纭鍙戣揣鍗曟槑缁�
      * @return
@@ -293,9 +359,7 @@
         if (params.isEmpty()) {
             throw new CoolException("鍙戣揣鍗曟槑缁嗕笉鑳戒负绌猴紒锛�");
         }
+
         return mobileService.confirmShippingDetl(params);
     }
-
-
-
 }

--
Gitblit v1.9.1