联调
This commit is contained in:
+4
-4
@@ -61,7 +61,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.hearDateFlag != null \">" +
|
||||
" AND a.mediation_method = '1'" +
|
||||
" AND c.mediation_method = '1'" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.startTime != null and req.startTime != ''\">" +
|
||||
@@ -95,11 +95,11 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
" AND a1.application_organ_id = #{req.applicationOrganId} " +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} AND c1.case_flow_id=#{req.caseFlowId}" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.hearDateFlag != null \">" +
|
||||
" AND a.mediation_method = '1'" +
|
||||
" AND c.mediation_method = '1'" +
|
||||
"</if> "
|
||||
+
|
||||
|
||||
@@ -133,7 +133,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.hearDateFlag != null \">" +
|
||||
" AND a.mediation_method = '1'" +
|
||||
" AND c.mediation_method = '1'" +
|
||||
"</if> "
|
||||
+
|
||||
|
||||
|
||||
+43
-11
@@ -143,15 +143,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
*/
|
||||
@Override
|
||||
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
||||
// admin查询所有案件
|
||||
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
||||
startPage();
|
||||
return msCaseApplicationMapper.list(req, null);
|
||||
}
|
||||
|
||||
// 根据用户查询角色
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
SysUser sysUser = loginUser.getUser();
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
// 根据id查询用户
|
||||
SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
|
||||
List<SysRole> roles = loginUser.getUser().getRoles();
|
||||
if (CollectionUtil.isEmpty(roles)) {
|
||||
throw new ServiceException("该用户未指定角色");
|
||||
}
|
||||
@@ -170,16 +167,47 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if (CollectionUtil.isEmpty(caseFlows)) {
|
||||
throw new ServiceException("该角色为绑定案件流程");
|
||||
}
|
||||
Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
|
||||
// admin查询所有案件
|
||||
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
||||
MsCaseFlow caseFlow =null;
|
||||
if(req.getHearDateFlag()!=null){
|
||||
caseFlow = flowMap.get("caseManagement:list:mediate");
|
||||
}else {
|
||||
// 根据按钮权限标识符查询待选择调解员流程id
|
||||
caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
||||
}
|
||||
if(caseFlow!=null) {
|
||||
req.setCaseFlowId(caseFlow.getId());
|
||||
}
|
||||
startPage();
|
||||
|
||||
return msCaseApplicationMapper.list(req, null);
|
||||
}
|
||||
for (SysRole role : roles) {
|
||||
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
|
||||
if(loginUser.getDeptId()!=null) {
|
||||
req.setApplicationOrganId(String.valueOf(loginUser.getDeptId()));
|
||||
if(sysUser.getDeptId()!=null) {
|
||||
req.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
|
||||
}
|
||||
req.setApplicantFlag(1);
|
||||
break;
|
||||
|
||||
}
|
||||
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
|
||||
// todo 被申请人案件根据被申请人身份证号查询案件列表
|
||||
req.setRespondentIdentityNum(sysUser.getIdCard());
|
||||
MsCaseFlow caseFlow =null;
|
||||
// 查询待调解流程id
|
||||
if(req.getHearDateFlag()!=null){
|
||||
caseFlow = flowMap.get("caseManagement:list:mediate");
|
||||
}else {
|
||||
// 根据按钮权限标识符查询待选择调解员流程id
|
||||
caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
||||
}
|
||||
if(caseFlow!=null) {
|
||||
req.setCaseFlowId(caseFlow.getId());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
@@ -948,7 +976,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
criteria.andIsNull("type");
|
||||
}
|
||||
criteria.andEqualTo("caseAppliId", vo.getId());
|
||||
criteria.andEqualTo("mediatorId", user.getUserId());
|
||||
// criteria.andEqualTo("mediatorId", user.getUserId());
|
||||
int count = msCaseMediatorMapper.selectCountByExample(example);
|
||||
if (count > 0) {
|
||||
// 申请人已预约,更新主表流程节点
|
||||
@@ -2100,7 +2128,11 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
|
||||
userMapper.insertUser(agentUser);
|
||||
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
||||
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
|
||||
} else if (null == agentUser.getDeptId() ) {
|
||||
// todo 未关联部门,关联部门
|
||||
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
|
||||
userMapper.updateUser(agentUser);
|
||||
}else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
|
||||
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
|
||||
throw new ServiceException("该申请代理人已在【" + agentUser.getDept().getDeptName() + "】申请机构下存在,请检查填写信息是否正确");
|
||||
} else {
|
||||
|
||||
@@ -274,21 +274,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
|
||||
update ms_sys_user
|
||||
<set>
|
||||
dept_id = #{deptId},
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
id_card = #{idCard},
|
||||
email = #{email},
|
||||
phonenumber = #{phonenumber},
|
||||
sex = #{sex},
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
remark = #{remark},
|
||||
specialty = #{specialty},
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="specialty != null">specialty = #{specialty},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
|
||||
Reference in New Issue
Block a user