From 2fed0b52d9c8e98d46c1eb8bd3876dafa60fc0b6 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期五, 25 十一月 2022 10:14:16 +0800
Subject: [PATCH] 1.修改导办数量可能是负数的问题

---
 flower_city/src/main/java/com/dg/core/controller/OrganizationController.java |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
index 70ad5b8..44cdb75 100644
--- a/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
@@ -244,4 +244,37 @@
         }
         return ids;
     }
+
+
+    /**
+     * 查询机构列表
+     */
+    @ApiOperation(value = "查询可切换机构列表",response = OrganizationChartEntity.class)
+    @GetMapping("switch/getList")
+    @Authorization
+    public TableDataInfo switchGetList(@CurrentUser SysUser sysUser)
+    {
+        List<String> ids=new ArrayList<>();
+        if(!StringUtils.isEmpty(sysUser.getMoreDepartmentIds()))
+        {
+            if(sysUser.getMoreDepartmentIds().indexOf(",")==-1)
+            {
+                ids.add(sysUser.getDepartmentId());
+            }
+            else
+            {
+                String[] list=sysUser.getMoreDepartmentIds().split(",");
+                for (String id:list)
+                {
+                    ids.add(id);
+                }
+            }
+        }
+        else
+        {
+            ids.add(sysUser.getDepartmentId());
+        }
+
+        return getDataTable(iOrganizationChartService.selectConfigList(ids));
+    }
 }

--
Gitblit v1.7.1