Yansen 2 years ago
parent
commit
c2a1f14b24

+ 2
- 14
src/main/java/com/example/civilizedcity/controller/TaMessageController.java View File

70
         IPage<TaMessage> pg = new Page<>(pageNum, pageSize);
70
         IPage<TaMessage> pg = new Page<>(pageNum, pageSize);
71
         QueryWrapper<TaMessage> queryWrapper = new QueryWrapper<>();
71
         QueryWrapper<TaMessage> queryWrapper = new QueryWrapper<>();
72
 
72
 
73
-        // 如果是管理员
74
-        if (dutyList.contains(Constants.DUTY_MANAGER)) {
75
-            // 可以查询当前单位以及给自己的
76
-            queryWrapper.nested(q -> q.eq("org_id", Constants.ROOT_ORG).or().eq("receive_user", sysUser.getUserId()));
77
-        } else if (dutyList.contains(Constants.DUTY_INSPECTOR)) {
78
-            // 督察员只能查询给自己的
79
-            queryWrapper.eq("receive_user", sysUser.getUserId());
80
-        } else if (dutyList.contains(Constants.DUTY_ORG_USER)) {
81
-            // 交办单位的,可以查询给本单位的
73
+        // 交办单位的,只能查询本单位的
74
+        if (dutyList.contains(Constants.DUTY_ORG_USER) || dutyList.contains(Constants.DUTY_ORG_MANAGER)) {
82
             queryWrapper.eq("org_id", sysUser.getOrgId());
75
             queryWrapper.eq("org_id", sysUser.getOrgId());
83
-            queryWrapper.ne("msg_type", "apply-verify");
84
-        } else if (dutyList.contains(Constants.DUTY_ORG_MANAGER)) {
85
-            // 交办单位管理员, 只能查询 问题单提审 类型的消息
86
-            queryWrapper.eq("org_id", sysUser.getOrgId());
87
-            queryWrapper.eq("msg_type", "apply-verify");
88
         }
76
         }
89
 
77
 
90
         queryWrapper.eq("status", Constants.STATUS_NORMAL);
78
         queryWrapper.eq("status", Constants.STATUS_NORMAL);

+ 1
- 1
src/main/java/com/example/civilizedcity/service/impl/TaOrgIssueServiceImpl.java View File

124
         }
124
         }
125
 
125
 
126
         // 删除部分文件
126
         // 删除部分文件
127
-        taAttachMapper.deleteNotIn(idList, Constants.SOURCE_ISSUE, taOrgIssue.getOrgIssueId().toString());
127
+        taAttachMapper.deleteNotIn(idList, Constants.SOURCE_ORG_ISSUE, taOrgIssue.getOrgIssueId().toString());
128
         taOrgIssue.setAttachList(attachList);
128
         taOrgIssue.setAttachList(attachList);
129
     }
129
     }
130
 }
130
 }