|
|
@@ -4,10 +4,13 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
4
|
4
|
import com.ruoyi.common.config.RuoYiConfig;
|
|
5
|
5
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
6
|
6
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
7
|
+import com.ruoyi.common.core.domain.entity.SysRole;
|
|
|
8
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
7
|
9
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
8
|
10
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
9
|
11
|
import com.ruoyi.common.utils.StringUtils;
|
|
10
|
12
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
|
13
|
+import com.ruoyi.system.mapper.SysUserMapper;
|
|
11
|
14
|
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
|
|
12
|
15
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
13
|
16
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
@@ -41,9 +44,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
41
|
44
|
@Autowired
|
|
42
|
45
|
private CaseAttachMapper caseAttachMapper;
|
|
43
|
46
|
@Autowired
|
|
44
|
|
- private CaseLogRecordMapper caseLogRecordMapper;
|
|
45
|
|
- @Autowired
|
|
46
|
47
|
private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
|
|
|
48
|
+ @Autowired
|
|
|
49
|
+ private SysUserMapper sysUserMapper;
|
|
47
|
50
|
|
|
48
|
51
|
@Override
|
|
49
|
52
|
@Transactional
|
|
|
@@ -135,15 +138,33 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
135
|
138
|
|
|
136
|
139
|
@Override
|
|
137
|
140
|
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
|
|
141
|
+ // 是否为超级管理员
|
|
|
142
|
+ int adMinFlag=0;
|
|
138
|
143
|
if (StringUtils.isBlank(identityNum)) {
|
|
139
|
|
- LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
140
|
|
- String username = loginUser.getUsername();
|
|
141
|
144
|
IdentityAuthentication authentication = new IdentityAuthentication();
|
|
142
|
|
- authentication.setUserName(username);
|
|
143
|
|
- IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
|
144
|
|
- if (authentication1 != null) {
|
|
145
|
|
- identityNum = authentication1.getIdentityNo();
|
|
|
145
|
+ LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
146
|
+ // 查询该用户的角色
|
|
|
147
|
+ // 查询登录人身份证号
|
|
|
148
|
+ SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
|
|
|
149
|
+ String username = sysUser.getUserName();
|
|
|
150
|
+ List<SysRole> roles = sysUser.getRoles();
|
|
|
151
|
+ if(CollectionUtil.isNotEmpty(roles)){
|
|
|
152
|
+ for (SysRole role : roles) {
|
|
|
153
|
+ if(role.getRoleName().equals("超级管理员")
|
|
|
154
|
+ ){
|
|
|
155
|
+ // 超级管理员可查看所有待案件质证的案件
|
|
|
156
|
+ adMinFlag=1;
|
|
|
157
|
+ break;
|
|
|
158
|
+ }
|
|
|
159
|
+ }
|
|
146
|
160
|
}
|
|
|
161
|
+ if(adMinFlag!=1) {
|
|
|
162
|
+ authentication.setUserName(username);
|
|
|
163
|
+ IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
|
|
164
|
+ if (authentication1 != null) {
|
|
|
165
|
+ identityNum = authentication1.getIdentityNo();
|
|
|
166
|
+ }
|
|
|
167
|
+ }
|
|
147
|
168
|
}
|
|
148
|
169
|
List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
|
|
149
|
170
|
return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
|