From 83b51a5a0774ea8ecb9a06304af3b956a21307c8 Mon Sep 17 00:00:00 2001
From: pjb <123456>
Date: 星期六, 08 三月 2025 09:06:55 +0800
Subject: [PATCH] CUT库条码T开头,截取后10位

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java |  104 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 97 insertions(+), 7 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
index 46cfc43..d595118 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
@@ -2,24 +2,33 @@
 
 
 import com.zy.asrs.framework.common.R;
+import com.zy.asrs.framework.exception.CoolException;
 import com.zy.asrs.wms.apis.wcs.entity.request.ContainerArrivedParam;
+import com.zy.asrs.wms.apis.wcs.entity.request.RfidSingalRequest;
 import com.zy.asrs.wms.apis.wcs.entity.request.TasksStatusCallbackParam;
 import com.zy.asrs.wms.apis.wcs.services.WcsApiService;
+import com.zy.asrs.wms.asrs.entity.param.BindPlatformParam;
+import com.zy.asrs.wms.asrs.service.PlatformService;
+import com.zy.asrs.wms.system.controller.BaseController;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+import java.util.Objects;
 
 @Slf4j
 @RestController
 @RequestMapping("/out/stock/")
-public class OutStockController {
+public class OutStockController extends BaseController {
 
     @Autowired
     private WcsApiService wcsApiService;
+
+    @Autowired
+    private PlatformService platformService;
+
 
     /**
      * 鍑哄簱浠诲姟-鎺ユ敹鍥炶皟鐘舵�佹帴鍙�
@@ -35,7 +44,7 @@
             if (StringUtil.isNullOrEmpty(callbackParam.getTaskCode())) {
                 return R.error("浠诲姟缂栫爜涓嶈兘涓虹┖锛侊紒");
             }
-            wcsApiService.receiveTaskStatus(callbackParam, "outStock");
+            wcsApiService.receiveTaskStatus(callbackParam, "outStock", getHostId());
         } else {
             return R.error("涓婃姤浜嬩欢绫诲瀷涓嶈兘涓虹┖锛侊紒");
         }
@@ -58,9 +67,90 @@
             return R.error("杈撻�佺嚎鑺傜偣缂栫爜涓嶈兘涓虹┖锛侊紒");
         }
 
-        return wcsApiService.containerArrivedNotify(arrivedParam, "outStock");
+        return wcsApiService.containerArrivedNotify(arrivedParam, "outStock", getHostId());
 
     }
 
+    /**
+     * 瀹瑰櫒娴佸姩閫氱煡锛堝綋鍓嶇墿鏂欐挱绉嶅畬鎴愶級
+     * //fixme 姝ゆ帴鍙e皢涓嶅啀鍗曠嫭璋冪敤
+     * 1. 鏇存柊褰撳墠浠诲姟鐗╂枡淇℃伅
+     * 2.
+     * @param code 瀹瑰櫒缂栫爜
+     * @return
+     */
+    @GetMapping("/container/converyor/{code}")
+    public R containerConveyor(@PathVariable String code) {
+        if (StringUtil.isNullOrEmpty(code)) {
+            return R.error("瀹瑰櫒缂栫爜涓嶈兘涓虹┖锛侊紒锛�");
+        }
+        return wcsApiService.containerConveryor(code);
+    }
+
+
+    /**
+     * 鍙戦�佸懡浠ょ粰鐢靛瓙鏍囩锛屽彲浠ユ帶鍒剁數瀛愭爣绛句寒鐏鑹插強鐏伅绛夈��
+     *
+     * 1. 鍒ゆ柇褰撳墠瀹瑰櫒鏄惁杩樻湁鐗╂枡鏈嫞锛屾湭鎷e畬闂伅锛屾嫞瀹岄�氱煡瀹瑰櫒娴佸姩锛屽苟鐏伅
+     * 2. 瀹瑰櫒娴佸姩鍒ゆ柇锛屽鏋滄枡绠辨病鏈夌墿鏂� code浼�200锛� 鏈夌墿鏂欎紶100 鎵ц鍥炲簱浠诲姟, IOTYP = 4
+     *
+     * @param request
+     * @return
+     */
+    @PostMapping("/slap/light")
+    public R slapLightLogic(@RequestBody Map<String, Object> request) {
+        if (Objects.isNull(request)) {
+            throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(request.get("taskNo"))) {
+            throw new CoolException("浠诲姟鍙蜂笉鑳戒负绌猴紒锛�");
+        }
+        if (Objects.isNull(request.get("orderNo"))){
+            throw new CoolException("褰撳墠浠诲姟璁㈠崟鍙蜂笉鑳戒负绌猴紒锛�");
+        }
+
+         wcsApiService.slapLightLogic(request);
+
+        return R.ok();
+    }
+
+
+
+    /**
+     * 淇″彿鍥炰紶鎺ュ彛锛屽洖浼犵數瀛愭爣绛剧姸鎬佸彉鍖栧唴瀹圭粰涓婃父绯荤粺銆�
+     * 褰撲汉涓烘搷浣滐紙姣斿鎷嶇伅锛屾洿鏀规暟瀛楋紝鏀剧绛夛級瀵艰嚧鐢靛瓙鏍囩鐨勭姸鎬佸拰淇″彿绛夊彂鐢熷彉鍖栥�佹垨璁惧鏈韩鍙戠敓寮傚父鏃讹紝ESS鎺ユ敹鍒颁俊鍙峰悗锛岄�氳繃璇ユ帴鍙e皢淇″彿鍥炰紶缁欎笂娓哥郴缁熴��
+     * RFID鍥炶皟鎺ュ彛
+     * @param request
+     * @return
+     */
+    @PostMapping("/")
+    public R rfidCallback(@RequestBody RfidSingalRequest request) {
+        if (Objects.isNull(request)) {
+            throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        return wcsApiService.rfidCallback(request);
+    }
+
+
+    /**
+     * 鑾峰彇鎵�鏈夐泦璐у尯
+     * @return
+     */
+    @GetMapping("/all/platforms")
+    public R getPlatforms() {
+        return  wcsApiService.getPlatforms();
+    }
+
+//    /**
+//     * 缁戝畾璁㈠崟涓庨泦璐у尯鍏崇郴
+//     * @param platform
+//     * @return
+//     */
+//    @PostMapping("/bind/shipping/platform")
+//    public R bindShippingAndPlatform(@RequestBody BindPlatformParam platform) {
+//        return platformService.bindShippingPlatform(platform);
+//    }
+//
+
 
 }

--
Gitblit v1.9.1