部分Bug修改

This commit is contained in:
18792927508
2023-10-25 11:01:37 +08:00
parent 729cb9120d
commit be624b638d
4 changed files with 34 additions and 10 deletions
@@ -11,5 +11,6 @@ import java.util.List;
public interface CaseEvidenceMapper {
List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
, @Param(value = "caseStatusList") List<Integer> caseStatusList
, @Param(value = "identityType" ) Integer identityType);
, @Param(value = "identityType" ) Integer identityType
);
}
@@ -4,10 +4,13 @@ import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -41,9 +44,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private CaseLogRecordMapper caseLogRecordMapper;
@Autowired
private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Override
@Transactional
@@ -135,15 +138,33 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@Override
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
// 是否为超级管理员
int adMinFlag=0;
if (StringUtils.isBlank(identityNum)) {
LoginUser loginUser = SecurityUtils.getLoginUser();
String username = loginUser.getUsername();
IdentityAuthentication authentication = new IdentityAuthentication();
authentication.setUserName(username);
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
if (authentication1 != null) {
identityNum = authentication1.getIdentityNo();
LoginUser loginUser = SecurityUtils.getLoginUser();
// 查询该用户的角色
// 查询登录人身份证号
SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
String username = sysUser.getUserName();
List<SysRole> roles = sysUser.getRoles();
if(CollectionUtil.isNotEmpty(roles)){
for (SysRole role : roles) {
if(role.getRoleName().equals("超级管理员")
){
// 超级管理员可查看所有待案件质证的案件
adMinFlag=1;
break;
}
}
}
if(adMinFlag!=1) {
authentication.setUserName(username);
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
if (authentication1 != null) {
identityNum = authentication1.getIdentityNo();
}
}
}
List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
return getCaseEvidenceVOList(identityNum, caseStatusList, 2);