1
This commit is contained in:
@@ -329,6 +329,30 @@ public class CaseApplication extends BaseEntity {
|
||||
*/
|
||||
private String userId;
|
||||
private List<Long> deptIds;
|
||||
/**
|
||||
* 部门长状态
|
||||
*/
|
||||
private List<Integer> deptHeadStatus;
|
||||
/**
|
||||
* 财务状态
|
||||
*/
|
||||
private Integer financeStatus;
|
||||
|
||||
public Integer getFinanceStatus() {
|
||||
return financeStatus;
|
||||
}
|
||||
|
||||
public void setFinanceStatus(Integer financeStatus) {
|
||||
this.financeStatus = financeStatus;
|
||||
}
|
||||
|
||||
public List<Integer> getDeptHeadStatus() {
|
||||
return deptHeadStatus;
|
||||
}
|
||||
|
||||
public void setDeptHeadStatus(List<Integer> deptHeadStatus) {
|
||||
this.deptHeadStatus = deptHeadStatus;
|
||||
}
|
||||
|
||||
public List<Long> getDeptIds() {
|
||||
return deptIds;
|
||||
|
||||
+6
-2
@@ -167,24 +167,28 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
throw new ServiceException("该用户没有角色权限");
|
||||
}
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
List<Integer> caseStatusList=new ArrayList<>();
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
){
|
||||
return caseApplicationMapper.selectAdminCaseToDoCount();
|
||||
}
|
||||
|
||||
// 查看所有案件
|
||||
if(role.getRoleName().equals("仲裁委")
|
||||
||role.getRoleName().equals("部门长")){
|
||||
List<Integer> caseStatusList=new ArrayList<>();
|
||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
return caseApplicationMapper.selectDeptHeadCaseToDoCount(caseStatusList);
|
||||
caseApplication.setDeptHeadStatus(caseStatusList);
|
||||
}
|
||||
if(role.getRoleName().equals("仲裁员")){
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
}
|
||||
if(role.getRoleName().equals("财务")){
|
||||
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
}
|
||||
if(role.getRoleName().equals("法律顾问")){
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
|
||||
@@ -39,12 +39,11 @@
|
||||
|
||||
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select t1.* from(
|
||||
select dinstinct(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
||||
select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
||||
t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
||||
t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
|
||||
t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
|
||||
t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.application_organ_name as
|
||||
applicantName,
|
||||
t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
|
||||
t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
|
||||
from(
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
@@ -105,14 +104,25 @@
|
||||
#{item}
|
||||
</foreach> )
|
||||
</if>
|
||||
<where>
|
||||
|
||||
<!--申请人-->
|
||||
<if test="nameId != null and nameId != ''">
|
||||
or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||
or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||
and t.case_status in (0,2))
|
||||
)
|
||||
|
||||
</if>
|
||||
<!--部门长-->
|
||||
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||
or t.case_status in
|
||||
<foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--申请人-->
|
||||
<if test="financeStatus != null and financeStatus != ''">
|
||||
or( t.case_status =#{financeStatus})
|
||||
|
||||
</if>
|
||||
</where>
|
||||
</where>
|
||||
) t1
|
||||
<!-- <where>-->
|
||||
@@ -356,10 +366,38 @@
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||
<where>
|
||||
c.case_status in
|
||||
<!--部门长-->
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
or c.case_status in
|
||||
<foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
<!--被申请人-->
|
||||
<if test="idCard != null and idCard != ''">
|
||||
or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
||||
</if>
|
||||
<!--仲裁员-->
|
||||
<if test="userId != null and userId != ''">
|
||||
or ( t.identity_type=1 and
|
||||
t.case_status in (7,8,9,12,13,14)
|
||||
and
|
||||
instr (t.arbitrator_id,#{userId})>0)
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
||||
and t.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach> )
|
||||
</if>
|
||||
<!--申请人-->
|
||||
<if test="nameId != null and nameId != ''">
|
||||
or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
||||
and t.case_status in (0,2))
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user