From 8eba3203511d8edbc5ee04aa82eceeaa3e38f889 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 07 九月 2024 14:34:28 +0800
Subject: [PATCH] #

---
 zy-asrs-admin/src/components/task/generateTask/index.vue                         |   16 +++++++++++++++-
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/LocTypeController.java |   28 ++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-admin/src/components/task/generateTask/index.vue b/zy-asrs-admin/src/components/task/generateTask/index.vue
index 1570739..9d8e406 100644
--- a/zy-asrs-admin/src/components/task/generateTask/index.vue
+++ b/zy-asrs-admin/src/components/task/generateTask/index.vue
@@ -14,6 +14,7 @@
 
 const open = ref(false);
 const barcode = ref(null);
+const locTypeHeight = ref(null);
 
 const {
     getColumnSearchProps,
@@ -24,7 +25,8 @@
     post('/api/rpc/generatePakIn', {
         taskType: 1,
         barcode: barcode.value,
-        originSite: "101"
+        originSite: "101",
+        locTypeHeight: locTypeHeight.value
     }).then(resp => {
         let result = resp.data;
         if (result.code === 200) {
@@ -46,6 +48,15 @@
     postForm('/api/waitPakin/barcode/query', {}).then(resp => {
         let result = resp.data;
         waitPakinQueryList.value = result.data;
+    })
+}
+
+const locTypeHeightQueryList = ref(null);
+locTypeHeightQueryListQuery();
+function locTypeHeightQueryListQuery() {
+    postForm('/api/locType/height/query', {}).then(resp => {
+        let result = resp.data;
+        locTypeHeightQueryList.value = result.data;
     })
 }
 
@@ -74,6 +85,9 @@
             <a-select v-model:value="barcode" :placeholder="formatMessage('common.select', '璇烽�夋嫨')" style="width: 100%"
                 show-search :options="waitPakinQueryList" optionFilterProp="label" optionLabelProp="label">
             </a-select>
+            <a-select v-model:value="locTypeHeight" :placeholder="formatMessage('common.select', '璇烽�夋嫨搴撲綅楂樺害')" style="width: 100%;margin-top: 20px;"
+                show-search :options="locTypeHeightQueryList" optionFilterProp="label" optionLabelProp="label">
+            </a-select>
         </a-modal>
     </div>
 </template>
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/LocTypeController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/LocTypeController.java
index 2a608fd..8b15b9f 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/LocTypeController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/LocTypeController.java
@@ -4,6 +4,8 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 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.enums.LocTypeHeightType;
 import com.zy.asrs.wms.common.annotation.OperationLog;
 import com.zy.asrs.wms.common.domain.BaseParam;
 import com.zy.asrs.wms.common.domain.KeyValVo;
@@ -108,6 +110,32 @@
     }
 
     @PreAuthorize("hasAuthority('asrs:locType:list')")
+    @PostMapping("/locType/height/query")
+    public R heightQuery(@RequestParam(required = false) String condition) {
+        LocType parent = locTypeService.getOne(new LambdaQueryWrapper<LocType>().eq(LocType::getFlag, "locTypeHeight"));
+        if (parent == null) {
+            throw new CoolException("鐖剁骇绫诲瀷寮傚父");
+        }
+
+        List<KeyValVo> vos = new ArrayList<>();
+        LambdaQueryWrapper<LocType> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(LocType::getParentId, parent.getId());
+        if (!Cools.isEmpty(condition)) {
+            wrapper.like(LocType::getName, condition);
+        }
+        List<LocType> list = locTypeService.list(wrapper);
+        for (LocType locType : list) {
+            LocTypeHeightType locTypeHeightType = LocTypeHeightType.get(locType.getFlag());
+            if (locTypeHeightType == null) {
+                throw new CoolException("搴撲綅楂樺害绫诲瀷寮傚父");
+            }
+            KeyValVo keyValVo = new KeyValVo(locTypeHeightType.id, locTypeHeightType.desc);
+            vos.add(keyValVo);
+        }
+        return R.ok().add(vos);
+    }
+
+    @PreAuthorize("hasAuthority('asrs:locType:list')")
     @PostMapping("/locType/export")
     public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
         ExcelUtil.build(ExcelUtil.create(locTypeService.list(), LocType.class), response);

--
Gitblit v1.9.1