Ver código fonte

案件修改

18792927508 2 anos atrás
pai
commit
c6d0cb9579

+ 1
- 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java Ver arquivo

@@ -72,6 +72,7 @@ public class SmsUtils {
72 72
          * 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空
73 73
          */
74 74
         private String[] templateParamSet;
75
+        private Long caseId;
75 76
 
76 77
     }
77 78
 }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SmsRecordMapper.java Ver arquivo

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 
@@ -11,4 +12,11 @@ public interface SmsRecordMapper {
11 12
     int saveSmsSendRecord(SmsSendRecord smsSendRecord);
12 13
 
13 14
     List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
15
+
16
+    /**
17
+     * 批量新增
18
+     * @param smsSendRecordList
19
+     * @return
20
+     */
21
+    int batchSaveSmsSendRecord(@Param("list") List<SmsSendRecord> smsSendRecordList);
14 22
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Ver arquivo

@@ -111,7 +111,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
111 111
     String offLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于 "+offLineDate+"在仲裁委所在地开庭审理了本案。";
112 112
     //书面仲裁时
113 113
     String writtenDate="{{writtenDate}}";
114
-    String written = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于"+writtenDate+"在仲裁委所在地开庭审理了本案。";
114
+    String written = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于"+writtenDate+"在仲裁委所在地开庭审理了本案。仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,根据《2022年版仲裁规则》第五十八条的规定对本案进行了书面审理。 ";
115 115
     //开庭+缺席审理
116 116
     String absent = "申请人的特别授权委托代理人{{agentName}}"+"出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
117 117
             "《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明,\" +\n" +

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Ver arquivo

@@ -1249,10 +1249,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1249 1249
                     caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
1250 1250
                     // 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
1251 1251
                     SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
1252
+                    request.setCaseId(caseAffiliate.getCaseAppliId());
1252 1253
                     request.setTemplateId("1956159");
1253 1254
                     request.setPhone(agentUser.getPhonenumber());
1254 1255
                     request.setTemplateParamSet(new String[]{agentUser.getNickName()});
1255 1256
                     Boolean aBoolean = SmsUtils.sendSms(request);
1257
+
1256 1258
                     //保存短信发送记录
1257 1259
                     SmsSendRecord smsSendRecord = new SmsSendRecord();
1258 1260
                     smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());

+ 61
- 41
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseZipImportImpl.java Ver arquivo

@@ -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:

+ 25
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SmsRecordMapper.xml Ver arquivo

@@ -39,6 +39,31 @@
39 39
         sysdate()
40 40
         )
41 41
     </insert>
42
+    <insert id="batchSaveSmsSendRecord">
43
+
44
+        insert into sms_send_record(
45
+       case_appli_id,
46
+       case_num,
47
+       phone,
48
+       send_time,
49
+       send_content,
50
+       create_by,
51
+       send_status,
52
+        create_time
53
+        )values
54
+        <foreach item="item" index="index" collection="list" separator=",">
55
+        (
56
+        #{item.caseId},
57
+        #{item.caseNum},
58
+        #{item.phone},
59
+        #{item.sendTime},
60
+        #{item.sendContent},
61
+        #{item.createBy},
62
+        #{item.sendStatus},
63
+        sysdate()
64
+        )
65
+        </foreach>
66
+    </insert>
42 67
 
43 68
     <select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
44 69