From 59c76e8ec3fbcb474993f3373ae4a03b4d604ff9 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 15 十一月 2022 13:57:24 +0800
Subject: [PATCH] 修改导办人员即是领导又是工人    bug

---
 flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java |   46 +++++++++++++++++++++-------------------------
 1 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java b/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
index 172674f..58dd366 100644
--- a/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
@@ -237,7 +237,7 @@
                 WxUtil wxUtil=new WxUtil();
                 String accessToken="0";
                 try {
-                    accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString();
+                    accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get();
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }
@@ -387,18 +387,16 @@
         String userId=null;
         if( StringUtils.equals("2",sysUser.getRoleIds()))
         {
-//            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
-//            {
-//                userId=null;
-//            }
-//            else
-//            {
-//                ids=null;
-//                userId=sysUser.getUserId()+"";
-//            }
-            userId=sysUser.getUserId()+"";
-//            ids=new ArrayList<>();
-//            ids.add(sysUser.getDepartmentId());
+            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
+            {
+                ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
+            }
+            else
+            {
+                userId=sysUser.getUserId()+"";
+                ids=new ArrayList<>();
+                ids.add(sysUser.getDepartmentId());
+            }
         }
         else
         {
@@ -422,18 +420,16 @@
         String userId=null;
         if( StringUtils.equals("2",sysUser.getRoleIds()))
         {
-//            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
-//            {
-//                userId=null;
-//            }
-//            else
-//            {
-//                ids=null;
-//                userId=sysUser.getUserId()+"";
-//            }
-            userId=sysUser.getUserId()+"";
-//            ids=new ArrayList<>();
-//            ids.add(sysUser.getDepartmentId());
+            if(StringUtils.equals("1",sysUser.getIsDivisionHead()))
+            {
+                ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService);
+            }
+            else
+            {
+                userId=sysUser.getUserId()+"";
+                ids=new ArrayList<>();
+                ids.add(sysUser.getDepartmentId());
+            }
         }
         else
         {

--
Gitblit v1.7.1