From 933d8f735abaccfc26a20438e8ab2ec2592f5fa9 Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Thu, 29 Aug 2024 16:25:42 +0800
Subject: [PATCH] 库位比较库区只显示立库

---
 ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue                            | 4 +---
 huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java | 7 ++++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue
index 737962f..7d106e9 100644
--- a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue
+++ b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue
@@ -306,9 +306,7 @@ export default {
     },
     initDictConfig() {},
     loadFrom() {
-      let param = Object.assign(
-        { type: 'L' }
-      )
+      let param = { zoneTypeList: ["L"] }
       getZoneList(param).then(res => {
         if (res.success) {
           this.zoneList = res.result
diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
index 5754243..dcdfccb 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
@@ -19,6 +19,7 @@ import org.jeecg.modules.wms.config.zone.service.IZoneService;
 import org.jeecg.utils.HuahengJwtUtil;
 import org.jeecg.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -171,7 +172,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> {
      * @param req
      */
     @RequestMapping(value = "/getZoneList")
-    public Result<?> getZoneList(@RequestParam(name = "type", required = true) String type, HttpServletRequest req) {
+    public Result<?> getZoneList(@RequestParam(name = "zoneTypeList[]", required = false) List<String> zoneTypeList, HttpServletRequest req) {
         LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
         HuahengJwtUtil.setWarehouseCode(zoneLambdaQueryWrapper, Zone.class, req);
         String username = HuahengJwtUtil.getCurrentUsername();
@@ -181,8 +182,8 @@ public class ZoneController extends JeecgController<Zone, IZoneService> {
                 zoneLambdaQueryWrapper.in(Zone::getCode, Arrays.asList(sysUser.getZoneCode().split(StrUtil.COMMA)));
             }
         }
-        if (!StringUtils.isEmpty(type)) {
-            zoneLambdaQueryWrapper.eq(Zone::getType, type);
+        if (!CollectionUtils.isEmpty(zoneTypeList)) {
+            zoneLambdaQueryWrapper.in(Zone::getType, zoneTypeList);
         }
         List<Zone> zoneList = zoneService.list(zoneLambdaQueryWrapper);
         return Result.OK(zoneList);
--
libgit2 0.22.2