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

---
 ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue                            | 5 ++++-
 huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java | 5 ++++-
 2 files changed, 8 insertions(+), 2 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 4436fb1..737962f 100644
--- a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue
+++ b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocation.vue
@@ -306,7 +306,10 @@ export default {
     },
     initDictConfig() {},
     loadFrom() {
-      getZoneList().then(res => {
+      let param = Object.assign(
+        { type: '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 e0871a6..5754243 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
@@ -171,7 +171,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> {
      * @param req
      */
     @RequestMapping(value = "/getZoneList")
-    public Result<?> getZoneList(HttpServletRequest req) {
+    public Result<?> getZoneList(@RequestParam(name = "type", required = true) String type, HttpServletRequest req) {
         LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
         HuahengJwtUtil.setWarehouseCode(zoneLambdaQueryWrapper, Zone.class, req);
         String username = HuahengJwtUtil.getCurrentUsername();
@@ -181,6 +181,9 @@ 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);
+        }
         List<Zone> zoneList = zoneService.list(zoneLambdaQueryWrapper);
         return Result.OK(zoneList);
     }
--
libgit2 0.22.2