From 422977efcb551606f6194e8c87934062f5841c48 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 09 五月 2024 10:01:47 +0800
Subject: [PATCH] #

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

diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index b72ee5f..47bfee1 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -7,6 +7,7 @@
 import com.zy.asrs.entity.AgvBasDevp;
 import com.zy.asrs.entity.AgvLocDetl;
 import com.zy.asrs.entity.AgvLocMast;
+import com.zy.asrs.entity.LocMast;
 import com.zy.asrs.entity.param.AgvMobileStartPakin;
 import com.zy.asrs.entity.param.AgvMobileStartParam;
 import com.zy.asrs.entity.param.CombParam;
@@ -193,6 +194,12 @@
 
         List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(wrapper);
 
+        for (AgvLocDetl agvLocDetl : agvLocDetls) {
+            AgvLocMast locNo = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocDetl.getLocNo()));
+            agvLocDetl.setLocSts(locNo.getLocSts());
+            agvLocDetl.setLocSts$(locNo.getLocSts$());
+        }
+
         return R.ok(agvLocDetls);
     }
 
@@ -346,6 +353,29 @@
 
     }
 
+    @PostMapping("/agv/v1/locMove")
+    @Transactional
+    public R agvLocMove(@RequestBody HashMap<String,Object> params){
+        String fl = String.valueOf(params.get("floor"));
+        short floor =(short)Integer.parseInt(fl.substring(0, 1));
+        List<HashMap<String,String>> dbList = (List<HashMap<String, String>>) params.get("dbList");
+         params.get("dbList");
+        Object moveType = params.get("moveType");
+        if (moveType == "unAuto") {
+            return R.error("鎵嬪姩鍔熻兘鏆傛椂鏃犳硶浣跨敤");
+        }
+        for (HashMap<String, String> map : dbList) {
+            String locNo = map.get("locNo");
+            Wrapper<AgvLocMast> wrapper = new EntityWrapper<AgvLocMast>().eq("loc_no", locNo);
+            AgvLocMast agvLocMast = agvLocMastService.selectOne(wrapper);
+            agvLocMast.setLocType("1");
+            agvLocMast.setLocType3(floor);
+            agvLocMastService.update(agvLocMast,wrapper);
+            //System.out.println(locNo);
+        }
+        return R.ok();
+    }
+
     public static void main(String[] args) {
         List<AgvLocDetl> agvLocDetls1 = new ArrayList<>();
         List<AgvLocDetl> agvLocDetls2 = new ArrayList<>();

--
Gitblit v1.9.1