From b922fe4d80f7e278b1ff958c4c95626b27cf8266 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 12 四月 2024 15:42:14 +0800
Subject: [PATCH] Merge branch 'phyzasrs' of http://47.97.1.152:5880/r/zy-asrs into phyzasrs

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

diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index f59f308..3d65e5c 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -1,7 +1,11 @@
 package com.zy.asrs.controller;
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.core.common.Cools;
 import com.core.common.R;
 import com.zy.asrs.entity.AgvBasDevp;
+import com.zy.asrs.entity.AgvLocDetl;
 import com.zy.asrs.entity.param.AgvMobileStartPakin;
 import com.zy.asrs.entity.param.AgvMobileStartParam;
 import com.zy.asrs.entity.param.CombParam;
@@ -38,6 +42,8 @@
     private AgvLocMastService agvLocMastService;
     @Autowired
     private OrderDetlService orderDetlService;
+    @Autowired
+    private AgvLocDetlService agvLocDetlService;
 
 
     /*
@@ -107,15 +113,11 @@
     @Transactional
     public R startPakin(@RequestBody AgvMobileStartPakin params){
         // 缁勬墭
-        try {
-            params.getCombParams().forEach(combParam -> {
-                agvMobileService.comb(combParam,getUserId());
-            });
-            params.setContainerType(Short.valueOf(params.getContainerCode().substring(0,2)));
-            workService.emptyPlateIn(params.getDevNo(),params.getContainerCode(),params.getContainerType(), getUserId(),false);
-        } catch (Exception e) {
-            return R.error("鐢熸垚宸ヤ綔妗f垚鍔�");
-        }
+        params.getCombParams().forEach(combParam -> {
+            agvMobileService.comb(combParam,getUserId());
+        });
+        params.setContainerType(Short.valueOf(params.getContainerCode().substring(0,2)));
+        workService.emptyPlateIn(params.getDevNo(),params.getContainerCode(),params.getContainerType(), getUserId(),false);
 
         return R.ok("鐢熸垚宸ヤ綔妗f垚鍔�");
     }
@@ -161,6 +163,27 @@
         return R.ok(agvLocMastService.queryContainerTypeByLocType1(agvBasDevp.getLocType1()));
 
     }
+    
+    /*
+    鏌ヨ搴撳瓨 鍏ュ簱璁㈠崟涓庨攢鍞崟鍙�
+     */
+    @PostMapping("/query/locDetl/v1")
+    public R queryAgvLocDetl(@RequestBody HashMap<String,String> params){
+
+        String orderNo = params.get("orderNo");
+        String threeCode = params.get("threeCode");
+        String matnr = params.get("matnr");
+
+        Wrapper<AgvLocDetl> wrapper = new EntityWrapper<AgvLocDetl>().eq("matnr", matnr);
+
+//        wrapper.eq("orderNo",orderNo);
+
+        wrapper = Cools.isEmpty(threeCode) ? wrapper.isNull("three_code") : wrapper.eq("three_code",threeCode);
+
+        List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(wrapper);
+
+        return R.ok(agvLocDetls);
+    }
 
 
 }

--
Gitblit v1.9.1