|
|
@@ -216,12 +216,7 @@ public class CaseZipImportImpl {
|
|
216
|
216
|
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
|
217
|
217
|
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
|
|
218
|
218
|
caseApplication.setCaseAppliId(caseApplication.getId());
|
|
219
|
|
- //默认案件标的 todo 案件标的是什么,默认写死
|
|
220
|
|
- caseApplication.setCaseSubjectAmount(new BigDecimal(100000));
|
|
221
|
|
- //todo 暂时设置计费比率为0.01
|
|
222
|
|
- BigDecimal feeRate = new BigDecimal(0.01);
|
|
223
|
|
- BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
224
|
|
- caseApplication.setFeePayable(feePayable);
|
|
|
219
|
+
|
|
225
|
220
|
// 设置批号
|
|
226
|
221
|
if (StrUtil.isEmpty(caseApplication.getBatchNumber())) {
|
|
227
|
222
|
maxBatchNumber = caseApplicationMapper.selectBatchNumberLike();
|
|
|
@@ -356,18 +351,32 @@ public class CaseZipImportImpl {
|
|
356
|
351
|
}
|
|
357
|
352
|
);
|
|
358
|
353
|
// todo 发送短信
|
|
359
|
|
-// ThreadPoolUtil.execute(() -> {
|
|
360
|
|
-// CaseLogUtils.batchInsertCaseLog(logRecords);
|
|
361
|
|
-// // 发送短信
|
|
362
|
|
-// if (CollectionUtil.isNotEmpty(smsRequestList)) {
|
|
363
|
|
-// for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
|
|
364
|
|
-// Boolean aBoolean = SmsUtils.sendSms(request);
|
|
365
|
|
-// }
|
|
366
|
|
-// }
|
|
367
|
|
-//
|
|
368
|
|
-// }
|
|
369
|
|
-//
|
|
370
|
|
-// );
|
|
|
354
|
+ ThreadPoolUtil.execute(() -> {
|
|
|
355
|
+ CaseLogUtils.batchInsertCaseLog(logRecords);
|
|
|
356
|
+ // 发送短信
|
|
|
357
|
+ if (CollectionUtil.isNotEmpty(smsRequestList)) {
|
|
|
358
|
+ Map<Long, SmsSendRecord> sendRecordMap = null;
|
|
|
359
|
+ if (CollectionUtil.isNotEmpty(smsSendRecordList)) {
|
|
|
360
|
+ sendRecordMap = smsSendRecordList.stream().collect(Collectors.toMap(SmsSendRecord::getCaseId, Function.identity()));
|
|
|
361
|
+ for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
|
|
|
362
|
+ Boolean aBoolean = SmsUtils.sendSms(request);
|
|
|
363
|
+ if (sendRecordMap != null && sendRecordMap.containsKey(sendSmsRequest.getCaseId())) {
|
|
|
364
|
+ if (aBoolean) {
|
|
|
365
|
+ sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(1);
|
|
|
366
|
+ } else {
|
|
|
367
|
+ sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(0);
|
|
|
368
|
+ }
|
|
|
369
|
+ }
|
|
|
370
|
+ }
|
|
|
371
|
+ smsRecordMapper.batchSaveSmsSendRecord(smsSendRecordList);
|
|
|
372
|
+ }
|
|
|
373
|
+
|
|
|
374
|
+
|
|
|
375
|
+ }
|
|
|
376
|
+
|
|
|
377
|
+ }
|
|
|
378
|
+
|
|
|
379
|
+ );
|
|
371
|
380
|
}
|
|
372
|
381
|
// 案件日志
|
|
373
|
382
|
return success("导入成功");
|
|
|
@@ -598,7 +607,7 @@ public class CaseZipImportImpl {
|
|
598
|
607
|
} else if (dictData.getDictLabel().contains("申请人") || dictData.getDictLabel().contains("统一社会信用代码")
|
|
599
|
608
|
|| dictData.getDictLabel().contains("法定代表人") || dictData.getDictLabel().contains("委托代理人")) {
|
|
600
|
609
|
// 组装申请人内置自段
|
|
601
|
|
- buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication.getId(), smsSendRecords, smsRequestList);
|
|
|
610
|
+ buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication, smsSendRecords, smsRequestList);
|
|
602
|
611
|
} else if (dictData.getDictLabel().contains("合同编号")) {
|
|
603
|
612
|
// 合同编号
|
|
604
|
613
|
String contractNumber = fatchMap.get("合同编号" + Constants.PDFSTR + caseApplication.getId());
|
|
|
@@ -608,6 +617,14 @@ public class CaseZipImportImpl {
|
|
608
|
617
|
String replaceAll = contractNumber.replaceAll(regx, "");
|
|
609
|
618
|
caseApplication.setContractNumber(replaceAll.toUpperCase());
|
|
610
|
619
|
}
|
|
|
620
|
+ }else if(dictData.getDictLabel().contains("案件标的")){
|
|
|
621
|
+ // todo 案件标的名字要改,字典配置中也要改
|
|
|
622
|
+ if(null!=caseApplication.getCaseSubjectAmount()) {
|
|
|
623
|
+ //todo 暂时设置计费比率为0.01
|
|
|
624
|
+ BigDecimal feeRate = new BigDecimal(0.01);
|
|
|
625
|
+ BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
626
|
+ caseApplication.setFeePayable(feePayable);
|
|
|
627
|
+ }
|
|
611
|
628
|
} else {
|
|
612
|
629
|
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
613
|
630
|
}
|
|
|
@@ -637,7 +654,7 @@ public class CaseZipImportImpl {
|
|
637
|
654
|
*/
|
|
638
|
655
|
private void buildAffilcateColumn(SysDictData dictData, Map<String, String> fatchMap, CaseAffiliate affiliate,
|
|
639
|
656
|
Map<String, Long> deptMap, List<SysDept> sysDepts,
|
|
640
|
|
- Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList, Long caseId,
|
|
|
657
|
+ Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList, CaseApplication caseApplication,
|
|
641
|
658
|
List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) {
|
|
642
|
659
|
|
|
643
|
660
|
affiliate.setIdentityType(1);
|
|
|
@@ -645,7 +662,7 @@ public class CaseZipImportImpl {
|
|
645
|
662
|
// 申请人
|
|
646
|
663
|
switch (dictData.getDictLabel()) {
|
|
647
|
664
|
case "申请人姓名":
|
|
648
|
|
- affiliate.setName((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)));
|
|
|
665
|
+ affiliate.setName((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
|
649
|
666
|
if (StrUtil.isNotEmpty(affiliate.getName())) {
|
|
650
|
667
|
// 组装申请机构
|
|
651
|
668
|
// 将组织机构id设为申请人名称
|
|
|
@@ -673,25 +690,25 @@ public class CaseZipImportImpl {
|
|
673
|
690
|
}
|
|
674
|
691
|
break;
|
|
675
|
692
|
case "统一社会信用代码":
|
|
676
|
|
- affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)));
|
|
|
693
|
+ affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
|
677
|
694
|
break;
|
|
678
|
695
|
case "法定代表人":
|
|
679
|
|
- affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
|
|
696
|
+ affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
680
|
697
|
break;
|
|
681
|
698
|
case "法定代表人职位":
|
|
682
|
|
- affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)));
|
|
|
699
|
+ affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
|
683
|
700
|
break;
|
|
684
|
701
|
case "申请人住所":
|
|
685
|
|
- affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)));
|
|
|
702
|
+ affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
|
686
|
703
|
break;
|
|
687
|
704
|
case "申请人联系地址":
|
|
688
|
|
- affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
|
|
705
|
+ affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
689
|
706
|
break;
|
|
690
|
707
|
case "委托代理人姓名":
|
|
691
|
|
- affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
|
|
708
|
+ affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
692
|
709
|
break;
|
|
693
|
710
|
case "委托代理人联系电话":
|
|
694
|
|
- affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
|
|
711
|
+ affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
695
|
712
|
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
|
696
|
713
|
SysUser agentUser = null;
|
|
697
|
714
|
// 用户已存在
|
|
|
@@ -736,28 +753,31 @@ public class CaseZipImportImpl {
|
|
736
|
753
|
|
|
737
|
754
|
}
|
|
738
|
755
|
if (addUsers != null) {
|
|
|
756
|
+ SysUser finalAgentUser = agentUser;
|
|
|
757
|
+ if(CollectionUtil.isNotEmpty(smsRequestList)&& smsRequestList.stream().noneMatch(smsSendRecord -> smsSendRecord.getPhone().equals(finalAgentUser.getPhonenumber()))){
|
|
739
|
758
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
740
|
759
|
request.setTemplateId("1956159");
|
|
741
|
760
|
request.setPhone(agentUser.getPhonenumber());
|
|
742
|
761
|
request.setTemplateParamSet(new String[]{agentUser.getNickName()});
|
|
743
|
|
- SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
744
|
|
- smsSendRecord.setCaseId(caseId);
|
|
745
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
746
|
|
- caseApplication.setId(caseId);
|
|
747
|
|
- smsSendRecord.setCaseNum(caseApplication.getCaseNum());
|
|
748
|
|
- smsSendRecord.setPhone(request.getPhone());
|
|
749
|
|
- smsSendRecord.setSendTime(new Date());
|
|
750
|
|
- String content = "尊敬的" + agentUser.getNickName() + ",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信";
|
|
751
|
|
- smsSendRecord.setSendContent(content);
|
|
752
|
|
- smsSendRecord.setCreateBy(getUsername());
|
|
753
|
|
- smsSendRecords.add(smsSendRecord);
|
|
754
|
|
- smsRequestList.add(request);
|
|
|
762
|
+ smsRequestList.add(request);
|
|
|
763
|
+ SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
|
764
|
+ smsSendRecord.setCaseId(caseApplication.getId());
|
|
|
765
|
+ smsSendRecord.setCaseNum(caseApplication.getCaseNum());
|
|
|
766
|
+ smsSendRecord.setPhone(request.getPhone());
|
|
|
767
|
+ smsSendRecord.setSendTime(new Date());
|
|
|
768
|
+ String content = "尊敬的" + agentUser.getNickName() + ",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信";
|
|
|
769
|
+ smsSendRecord.setSendContent(content);
|
|
|
770
|
+ smsSendRecord.setCreateBy(getUsername());
|
|
|
771
|
+ smsSendRecords.add(smsSendRecord);
|
|
|
772
|
+ }
|
|
|
773
|
+
|
|
|
774
|
+
|
|
755
|
775
|
}
|
|
756
|
776
|
|
|
757
|
777
|
}
|
|
758
|
778
|
break;
|
|
759
|
779
|
case "委托代理人电子邮件":
|
|
760
|
|
- affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId).replace("\n", "").replaceAll("\\s", "") : null);
|
|
|
780
|
+ affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()).replace("\n", "").replaceAll("\\s", "") : null);
|
|
761
|
781
|
|
|
762
|
782
|
break;
|
|
763
|
783
|
default:
|