Browse Source

供应链管理员权限和社群一致

zhaoxian 2 năm trước cách đây
mục cha
commit
033e48c9d6

+ 3 - 15
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemCollectSamplesServiceImpl.java

@@ -362,7 +362,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("courtshipManager".equals(roleKey) || "bdManager".equals(roleKey)) {
             Long deptId = deptService.getDeptIdByUserId(userId);
             userList = deptService.getDeptUserListByDeptId(deptId);
-        } else if (roleKey.contains("association")) {
+        } else if (roleKey.contains("association") || "supplyChainAdmin".equals(roleKey)) {
             //社群查看所有 all
             userList = null;
         } else {
@@ -371,10 +371,6 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         int userType = 1;
         if (!"1".equals(type)) {
             userType = 2;
-            if ("supplyChainAdmin".equals(roleKey)) {
-                //供应链管理员查看 招商人员数据
-                userList = deptService.getDeptUserListByDeptId(150200L);
-            }
         }
         JSONObject returnJson = new JSONObject();
         JSONObject data = new JSONObject();
@@ -401,7 +397,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("courtshipManager".equals(roleKey) || "bdManager".equals(roleKey)) {
             Long deptId = deptService.getDeptIdByUserId(userId);
             userList = deptService.getDeptUserListByDeptId(deptId);
-        } else if (roleKey.contains("association")) {
+        } else if (roleKey.contains("association") || "supplyChainAdmin".equals(roleKey)) {
             //社群查看所有 all
             userList = null;
         } else {
@@ -414,10 +410,6 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("1".equals(type)) {
             returnJson.put("data", getgetOrderDataByChannel(userList, startDate, endDate));
         } else {
-            if ("supplyChainAdmin".equals(roleKey)) {
-                //供应链管理员查看 招商人员数据
-                userList = deptService.getDeptUserListByDeptId(150200L);
-            }
             returnJson.put("data", getgetOrderDataByAttractInvestment(userList, startDate, endDate));
         }
         return returnJson;
@@ -553,7 +545,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("courtshipManager".equals(roleKey) || "bdManager".equals(roleKey)) {
             Long deptId = deptService.getDeptIdByUserId(userId);
             userList = deptService.getDeptUserListByDeptId(deptId);
-        } else if (roleKey.contains("association")) {
+        } else if (roleKey.contains("association") || "supplyChainAdmin".equals(roleKey)) {
             //社群查看所有 all
             userList = null;
         } else {
@@ -566,10 +558,6 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
         if ("1".equals(type)) {
             returnJson.put("data", getDataAnalysisByChannel(userList));
         } else {
-            if ("supplyChainAdmin".equals(roleKey)) {
-                //供应链管理员查看 招商人员数据
-                userList = deptService.getDeptUserListByDeptId(150200L);
-            }
             returnJson.put("data", getDataAnalysisByAttractInvestment(userList));
         }
         return returnJson;