This commit is contained in:
qitz
2023-10-25 14:18:18 +08:00
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);
@@ -67,6 +67,7 @@
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.hear_date ,c.arbitrat_claims ,
@@ -239,6 +240,7 @@
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.hear_date ,c.arbitrat_claims ,
@@ -16,7 +16,7 @@
and d.identity_num = #{identityNum}
</if>
<if test="identityType != null ">
and identity_type = #{identityType}
and d.identity_type = #{identityType}
</if>
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in