|
|
@@ -1050,10 +1050,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1050
|
1050
|
mediatorVO.setCompleteAmount(0L);
|
|
1051
|
1051
|
} else if(caseMap.containsKey(user.getUserId())) {
|
|
1052
|
1052
|
List<MsCaseApplication> applications = caseMap.get(user.getUserId());
|
|
1053
|
|
- // 已办案件
|
|
|
1053
|
+ // 待办案件
|
|
1054
|
1054
|
long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
|
|
1055
|
|
- mediatorVO.setTodoAmount(applications.size()-count);
|
|
1056
|
|
- mediatorVO.setCompleteAmount(count);
|
|
|
1055
|
+ mediatorVO.setCompleteAmount(applications.size()-count);
|
|
|
1056
|
+ mediatorVO.setTodoAmount(count);
|
|
1057
|
1057
|
}
|
|
1058
|
1058
|
mediatorVOS.add(mediatorVO);
|
|
1059
|
1059
|
}
|
|
|
@@ -1240,6 +1240,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1240
|
1240
|
*/
|
|
1241
|
1241
|
@Transactional
|
|
1242
|
1242
|
public void verifyMediator(MsCaseApplication application,BookingVO vo) {
|
|
|
1243
|
+ MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(vo.getCaseFlowId());
|
|
|
1244
|
+ if (currentFlow == null) {
|
|
|
1245
|
+ throw new ServiceException("未找到当前流程节点");
|
|
|
1246
|
+ }
|
|
1243
|
1247
|
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(vo.getCaseFlowId());
|
|
1244
|
1248
|
if (nextFlow == null) {
|
|
1245
|
1249
|
throw new ServiceException("未找到下一个流程节点");
|
|
|
@@ -1257,36 +1261,41 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1257
|
1261
|
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
|
1258
|
1262
|
// 根据案件id查询案件
|
|
1259
|
1263
|
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(application.getId());
|
|
1260
|
|
- MsCaseAffiliate affiliate = msCaseAffiliateMapper.selectByPrimaryKey(application.getId());
|
|
1261
|
|
- if(caseApplication==null || affiliate==null){
|
|
1262
|
|
- throw new ServiceException("未找到该案件");
|
|
1263
|
|
- }
|
|
1264
|
|
- // 申请人电话
|
|
1265
|
|
- String phone="";
|
|
1266
|
|
- if(affiliate.getOrganizeFlag().equals(0)){
|
|
1267
|
|
- // 自然人
|
|
1268
|
|
- if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())){
|
|
1269
|
|
- phone=affiliate.getContactTelphoneAgent();
|
|
1270
|
|
- }else {
|
|
1271
|
|
- phone=affiliate.getApplicationPhone();
|
|
|
1264
|
+ // 发送开庭短信
|
|
|
1265
|
+ if(CollectionUtil.isNotEmpty(vo.getHerDates())) {
|
|
|
1266
|
+
|
|
|
1267
|
+ MsCaseAffiliate affiliate = msCaseAffiliateMapper.selectByPrimaryKey(application.getId());
|
|
|
1268
|
+ if (caseApplication == null || affiliate == null) {
|
|
|
1269
|
+ throw new ServiceException("未找到该案件");
|
|
1272
|
1270
|
}
|
|
|
1271
|
+ // 申请人电话
|
|
|
1272
|
+ String phone = "";
|
|
|
1273
|
+ if (affiliate.getOrganizeFlag().equals(0)) {
|
|
|
1274
|
+ // 自然人
|
|
|
1275
|
+ if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
|
|
1276
|
+ phone = affiliate.getContactTelphoneAgent();
|
|
|
1277
|
+ } else {
|
|
|
1278
|
+ phone = affiliate.getApplicationPhone();
|
|
|
1279
|
+ }
|
|
1273
|
1280
|
|
|
1274
|
|
- }else {
|
|
1275
|
|
- phone=affiliate.getContactTelphoneAgent();
|
|
1276
|
|
- }
|
|
1277
|
|
- caseApplication.setHearDate(application.getHearDate());
|
|
1278
|
|
- // 申请人发送开庭日期短信
|
|
1279
|
|
- sendHearDateSms(caseApplication,phone);
|
|
1280
|
|
- // 被申发送开庭日期短信
|
|
1281
|
|
- sendHearDateSms(caseApplication,affiliate.getRespondentPhone());
|
|
1282
|
|
- // 调解员发送短信
|
|
1283
|
|
- // 根据调解员id查询用户
|
|
1284
|
|
- if(caseApplication.getMediatorId()!=null) {
|
|
1285
|
|
- SysUser sysUser = sysUserMapper.selectUserById(caseApplication.getMediatorId());
|
|
1286
|
|
- sendHearDateSms(caseApplication, sysUser.getPhonenumber());
|
|
|
1281
|
+ } else {
|
|
|
1282
|
+ phone = affiliate.getContactTelphoneAgent();
|
|
|
1283
|
+ }
|
|
|
1284
|
+ caseApplication.setHearDate(application.getHearDate());
|
|
|
1285
|
+ // 申请人发送开庭日期短信
|
|
|
1286
|
+ sendHearDateSms(caseApplication, phone);
|
|
|
1287
|
+ // 被申发送开庭日期短信
|
|
|
1288
|
+ sendHearDateSms(caseApplication, affiliate.getRespondentPhone());
|
|
|
1289
|
+ // 调解员发送短信
|
|
|
1290
|
+ // 根据调解员id查询用户
|
|
|
1291
|
+ if (caseApplication.getMediatorId() != null) {
|
|
|
1292
|
+ SysUser sysUser = sysUserMapper.selectUserById(caseApplication.getMediatorId());
|
|
|
1293
|
+ sendHearDateSms(caseApplication, sysUser.getPhonenumber());
|
|
|
1294
|
+ }
|
|
1287
|
1295
|
}
|
|
1288
|
1296
|
// 新增日志
|
|
1289
|
|
- CaseLogUtils.insertCaseLog(caseApplication.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(), "");
|
|
|
1297
|
+
|
|
|
1298
|
+ CaseLogUtils.insertCaseLog(caseApplication.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "");
|
|
1290
|
1299
|
|
|
1291
|
1300
|
}
|
|
1292
|
1301
|
|
|
|
@@ -1299,10 +1308,20 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1299
|
1308
|
if(StrUtil.isEmpty(phone)){
|
|
1300
|
1309
|
return;
|
|
1301
|
1310
|
}
|
|
1302
|
|
- // 2075447 尊敬的用户,您的{1}案件,线上调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
|
1303
|
|
- Boolean smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
|
1304
|
|
- String sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线上调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
|
1305
|
|
- // 新增短信记录
|
|
|
1311
|
+ Boolean smsFlag =true;
|
|
|
1312
|
+ String sendContent="";
|
|
|
1313
|
+ if(StrUtil.isNotEmpty(application.getMediationMethod()) && application.getMediationMethod().equals("1")){
|
|
|
1314
|
+
|
|
|
1315
|
+ // 线上调解 2075447 尊敬的用户,您的{1}案件,线上调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
|
|
1316
|
+ smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
|
|
1317
|
+ sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线上调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
|
|
1318
|
+ }else {
|
|
|
1319
|
+ // 线下调解 2077966 尊敬的用户,您的{1}案件,线下调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
|
|
|
1320
|
+ smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
|
|
|
1321
|
+ sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线下调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
|
|
|
1322
|
+
|
|
|
1323
|
+ }
|
|
|
1324
|
+ // 新增短信记录
|
|
1306
|
1325
|
SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), application.getCaseNum(), phone, new Date(), sendContent);
|
|
1307
|
1326
|
if(smsFlag){
|
|
1308
|
1327
|
smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
|