This commit is contained in:
qitz
2024-02-04 14:59:47 +08:00
3 changed files with 12 additions and 57 deletions
@@ -56,10 +56,6 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " + " AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
"</if> " "</if> "
+ +
"<if test=\"req.hearDateFlag != null \">" +
" AND c.mediation_method = '1'" +
"</if> "
+
"<if test=\"req.startTime != null and req.startTime != ''\">" + "<if test=\"req.startTime != null and req.startTime != ''\">" +
"and c.create_time &gt;= #{req.startTime}</if>" + "and c.create_time &gt;= #{req.startTime}</if>" +
"<if test=\"req.endTime != null and req.endTime != ''\">" + "<if test=\"req.endTime != null and req.endTime != ''\">" +
@@ -78,9 +74,6 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
"</foreach>" + "</foreach>" +
"</if> " "</if> "
+ +
"<if test=\"req.batchNumber != null and req.batchNumber != ''\">" +
" AND c1.batch_number = #{req.batchNumber} " +
"</if> " +
"<if test=\"req.caseFlowId != null \">" + "<if test=\"req.caseFlowId != null \">" +
" AND c1.case_flow_id = #{req.caseFlowId} " + " AND c1.case_flow_id = #{req.caseFlowId} " +
"</if> " + "</if> " +
@@ -91,27 +84,13 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
" AND a1.respondent_identity_num = #{req.respondentIdentityNum} " + " AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
"</if> " "</if> "
+ +
"<if test=\"req.hearDateFlag != null \">" +
" AND c1.mediation_method = '1'" +
"</if> "
+
"<if test=\"req.startTime != null and req.startTime != ''\">" + "<if test=\"req.startTime != null and req.startTime != ''\">" +
"and c1.create_time &gt;= #{req.startTime}</if>" + "and c1.create_time &gt;= #{req.startTime}</if>" +
"<if test=\"req.endTime != null and req.endTime != ''\">" + "<if test=\"req.endTime != null and req.endTime != ''\">" +
"and c1.create_time &lt;= #{req.endTime}</if>" + "and c1.create_time &lt;= #{req.endTime}</if>" +
" </where> " + " </where> " +
" ) " " ) "
// +
// "<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c.case_status_name in" +
// "<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
// "#{caseStatus}" +
// "</foreach>" +
// "</if> "
+ +
"<if test=\"req.batchNumber != null and req.batchNumber != ''\">" +
" AND c.batch_number = #{req.batchNumber} " +
"</if> " +
"<if test=\"req.caseFlowId != null \">" + "<if test=\"req.caseFlowId != null \">" +
" AND c.case_flow_id = #{req.caseFlowId} " + " AND c.case_flow_id = #{req.caseFlowId} " +
"</if> " + "</if> " +
@@ -122,10 +101,6 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " + " AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
"</if> " "</if> "
+ +
"<if test=\"req.hearDateFlag != null \">" +
" AND c.mediation_method = '1'" +
"</if> "
+
"<if test=\"req.startTime != null and req.startTime != ''\">" + "<if test=\"req.startTime != null and req.startTime != ''\">" +
"and c.create_time &gt;= #{req.startTime}</if>" + "and c.create_time &gt;= #{req.startTime}</if>" +
@@ -149,13 +149,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) { public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
// admin查询所有案件 // admin查询所有案件
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) { if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
if(req.getHearDateFlag()!=null){
// todo 暂时写死
req.setCaseFlowId(9);
}
startPage(); startPage();
return msCaseApplicationMapper.list(req, null); return msCaseApplicationMapper.list(req, null);
} }
// 根据用户查询角色 // 根据用户查询角色
@@ -184,32 +178,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity())); Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList()); List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
for (SysRole role : roles) { for (SysRole role : roles) {
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){ if(StrUtil.isNotEmpty(role.getRoleName())){
req.setApplicantFlag(1); if(StrUtil.equals(role.getRoleName(),"申请人")) {
break;
}
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
caseStatusNames=new ArrayList<>();
// todo 被申请人案件根据被申请人身份证号查询案件列表
req.setRespondentIdentityNum(sysUser.getIdCard());
MsCaseFlow caseFlow =null;
// todo 查询待调解流程id被申请人暂时写死
if(req.getMiniProgressFlag()!=null) {
if (req.getHearDateFlag() != null) {
// caseFlow = flowMap.get("caseManagement:list:mediate");
caseStatusNames.add("待调解"); caseStatusNames.add("待调解");
} else {
// 待选择调解员
caseStatusNames.add("待选择调解员");
}
}else {
// PC端
caseStatusNames.add("待被申请人签收");
}
break; break;
} }
if(StrUtil.equals(role.getRoleName(),"被申请人")){
caseStatusNames.add("待调解");
req.setRespondentIdentityNum(sysUser.getIdCard());
break;
}
}
} }
startPage(); startPage();
// 查询案件列表 // 查询案件列表
@@ -904,6 +883,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
if (StrUtil.isNotEmpty(affiliate.getRespondentPhone())) { if (StrUtil.isNotEmpty(affiliate.getRespondentPhone())) {
String sendContent = "尊敬的" + affiliate.getRespondentName() + "用户,您的" + application.getCaseNum() + "仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信"; String sendContent = "尊敬的" + affiliate.getRespondentName() + "用户,您的" + application.getCaseNum() + "仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信";
// 给被申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信 // 给被申请人发送案件受理短信 尊敬的{1}用户,您的{2}仲裁案件,已成功受理,请知晓,如非本人操作,请忽略本短信
// todo 发送申请人注册小程序短信
Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2049503", affiliate.getRespondentPhone(), new String[]{affiliate.getRespondentName(), application.getCaseNum()}); Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2049503", affiliate.getRespondentPhone(), new String[]{affiliate.getRespondentName(), application.getCaseNum()});
CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent); CaseLogUtils.insertCaseLog(application.getId(), caseFlow.getNodeId(), caseFlow.getNodeName(), "向被申请人发送短信," + sendContent);
SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent); SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), affiliate.getRespondentPhone(), new Date(), sendContent);
@@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectUserVo"> <sql id="selectUserVo">
select u.user_id, u.user_name, u.nick_name,u.specialty, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, select u.user_id, u.user_name, u.nick_name,u.specialty, u.id_card,u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
from ms_sys_user u from ms_sys_user u
left join ms_sys_user_role ur on u.user_id = ur.user_id left join ms_sys_user_role ur on u.user_id = ur.user_id