From 4fb06a58ed5df46f29af1e9fa65cfd40335263ad Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 18 一月 2025 17:06:18 +0800
Subject: [PATCH] # 6. 大屏添加作业类型 (全盘,还是分拣  IOType) 10.平库出库时,当前平库ID是写死在Sql里,需修改 11.平库出库没有判断是否预约出库,且生成拣货单时没有锁定库存,需确认是否考虑回库问题 26. 已拣过货的任务明细,可以再次拣货,拣货明细需添加一个拣货状态 47. 确认发货前,需判断是否已绑定至集货区 48. CTU出库后,库位103不再删除原有库位信息

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java |   80 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 78 insertions(+), 2 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 00bfa11..9179179 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
@@ -9,11 +9,14 @@
 import com.zy.asrs.framework.annotations.ManagerAuth;
 import com.zy.asrs.framework.common.Cools;
 import com.zy.asrs.framework.common.R;
+import com.zy.asrs.framework.exception.CoolException;
+import com.zy.asrs.wms.asrs.entity.CacheSite;
 import com.zy.asrs.wms.asrs.entity.Loc;
 import com.zy.asrs.wms.asrs.entity.Order;
 import com.zy.asrs.wms.asrs.entity.WaitPakin;
 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.param.BatchMergeOrdersParam;
 import com.zy.asrs.wms.asrs.entity.param.PageRequest;
 import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
@@ -71,10 +74,17 @@
      */
     @PostMapping("/mat/auth")
     public R getProductForBarcode(@RequestBody Map<String, String> barcode) {
+        if (Objects.isNull(barcode)) {
+            return  R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
         if (StringUtil.isNullOrEmpty(barcode.get("barcode"))) {
             return  R.error("鏉$爜涓嶈兘涓虹┖锛侊紒");
         }
         Order order =  orderService.selectByBarcode(barcode.get("barcode"));
+
+        if (Objects.isNull(order)) {
+            return R.error("璁㈠崟涓嶅瓨鍦紒");
+        }
 
         List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId());
 
@@ -82,6 +92,7 @@
     }
 
     /**
+     * 骞冲簱涓婃灦
      * PDA鎵爜鍏ュ簱
      * 1. 缁戝畾搴撲綅鍙蜂笌鎷栫洏鐮�
      * 2. 搴撲綅缃负鍦ㄥ簱鐘舵��
@@ -105,7 +116,7 @@
     }
 
     /**
-     * 鑾峰彇鎷栫爜鐩樼粦瀹氬晢鍝�
+     * 鑾峰彇鎷栫洏鐮佺粦瀹氬晢鍝�
      * @return
      */
     @GetMapping("/barcode/matnr/{code}")
@@ -113,7 +124,7 @@
         if (StringUtil.isNullOrEmpty(code)) {
             return R.error("鎵樼洏鐮佷笉鑳戒负绌猴紒锛�");
         }
-        List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code).eq(WaitPakin::getIoStatus, 0));
+        List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code));
 
         return R.ok(waitPakins);
     }
@@ -215,6 +226,71 @@
     }
 
 
+    /**
+     * 鑾峰彇鎾浣�
+     * @return
+     */
+    @GetMapping("/pick/seed/locs")
+    public R seedLocs() {
+        List<CacheSite> sites = mobileService.getSeedLocs();
+        return R.ok(sites);
+    }
+
+    /**
+     * 璁㈠崟缁戝畾绔欑偣
+     * @param param
+     * @return
+     */
+    @PostMapping("/pick/seed/bind")
+    public R bindLoc(@RequestBody Map<String, Object> param) {
+        if (Objects.isNull(param)) {
+            throw new CoolException("璇锋眰鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("barcode"))) {
+            throw new CoolException("鎾澧欏鍣ㄧ紪鐮佷笉鑳戒负绌�");
+        }
+        if (Objects.isNull(param.get("orderNo"))) {
+            throw new CoolException("璁㈠崟缂栧彿涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("siteNo"))) {
+            throw new CoolException("鎾绔欑偣涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("type"))) {
+            throw new CoolException("鍙傛暟绫诲瀷涓嶈兘涓虹┖锛侊紒");
+        }
+       boolean result =  mobileService.bindOrderBySite(param);
+        if (result) {
+            return R.ok("缁戝畾鎴愬姛锛侊紒");
+        } else {
+            return R.error("缁戝畾澶辫触锛侊紒");
+        }
+    }
+
+
+    /**
+     * 鑾峰彇鍙戣揣璁㈠崟鏄庣粏
+     * @return
+     */
+    @PostMapping("/shipping/order/detl")
+    public R  getOrderDetl(@RequestBody Map<String, Object> params) {
+        if (Objects.isNull(params)) {
+            throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        return mobileService.selectShippingDetl(params);
+    }
+
+    /**
+     * 纭鍙戣揣鍗曟槑缁�
+     * @return
+     */
+    @PostMapping("/shipping/confirm")
+    public R confirmShipping(@RequestBody List<ShippingOrderDetlDto> params) {
+        if (params.isEmpty()) {
+            throw new CoolException("鍙戣揣鍗曟槑缁嗕笉鑳戒负绌猴紒锛�");
+        }
+        return mobileService.confirmShippingDetl(params);
+    }
+
 
 
 }

--
Gitblit v1.9.1