From 7a326ec05e656413e7d78eb40cb974cc72f08e62 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期日, 07 四月 2024 15:05:26 +0800
Subject: [PATCH] 导入重复单据后,修改单据状态

---
 src/main/java/com/zy/asrs/controller/AgvMobileController.java |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index 15ec11f..48c754f 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -4,10 +4,7 @@
 import com.zy.asrs.entity.AgvBasDevp;
 import com.zy.asrs.entity.param.AgvMobileStartParam;
 import com.zy.asrs.entity.param.CombParam;
-import com.zy.asrs.service.AgvBasDevpService;
-import com.zy.asrs.service.AgvMobileService;
-import com.zy.asrs.service.AgvWorkService;
-import com.zy.asrs.service.OrderDetlService;
+import com.zy.asrs.service.*;
 import com.zy.common.web.BaseController;
 import lombok.Synchronized;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +13,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -34,6 +32,8 @@
     private AgvBasDevpService agvBasDevpService;
     @Autowired
     private AgvWorkService workService;
+    @Autowired
+    private AgvLocMastService agvLocMastService;
     @Autowired
     private OrderDetlService orderDetlService;
 
@@ -54,7 +54,7 @@
     public R combBinding(@RequestBody Map<String,Object> map){
         String barcode = map.get("barcode").toString();
         String stationCode = map.get("stationCode").toString();
-        Short containerType = Short.valueOf(map.get("containerType").toString());
+        Short containerType = Short.valueOf(barcode.substring(0,2));
         agvMobileService.combBinding(barcode,stationCode,containerType);
         return R.ok("鎵樼洏缁戝畾绔欑偣鎴愬姛");
     }
@@ -104,7 +104,8 @@
     public R pakinEmpty(@RequestBody AgvMobileStartParam params){
 
         for (AgvMobileStartParam.Pda pda : params.getPad()) {
-            workService.emptyPlateIn(pda.getDevNo(),pda.getContainerCode(),pda.getContainerType(), getUserId());
+            pda.setContainerType(Short.valueOf(pda.getContainerCode().substring(0,2)));
+            workService.emptyPlateIn(pda.getDevNo(),pda.getContainerCode(),pda.getContainerType(), getUserId(),false);
         }
 
         return R.ok();
@@ -124,4 +125,18 @@
         return R.ok();
     }
 
+    /*
+    绌烘澘鍑哄簱瀹瑰櫒鐮侀�夋嫨
+     */
+    @PostMapping("/pakout/empty/container/selector/auth")
+    public R containerType(@RequestBody HashMap<String,String> params){
+
+        String devNo = params.get("devNo");
+        AgvBasDevp agvBasDevp = agvBasDevpService.selectById(devNo);
+
+        return R.ok(agvLocMastService.queryContainerTypeByLocType1(agvBasDevp.getLocType1()));
+
+    }
+
+
 }

--
Gitblit v1.9.1