Quellcode durchsuchen

Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev

qtz vor 2 Jahren
Ursprung
Commit
8be09de49c

+ 12
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Datei anzeigen

@@ -366,6 +366,18 @@ public class CaseApplicationController extends BaseController {
366 366
         return success(caseApplicationselect);
367 367
     }
368 368
 
369
+    /**
370
+     * 批量提交立案审查
371
+     */
372
+    @Log(title = "批量提交立案审查", businessType = BusinessType.UPDATE)
373
+    @PostMapping("/submitCaseApplicationCheckBatch")
374
+    public AjaxResult submitCaseApplicationCheckBatch(@RequestBody BatchCaseApplication batchCaseApplication) {
375
+        if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
376
+            return error("参数校验失败");
377
+        }
378
+        return success(caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
379
+    }
380
+
369 381
     /**
370 382
      * 下载案件压缩包
371 383
      */

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Datei anzeigen

@@ -139,4 +139,6 @@ public interface ICaseApplicationService {
139 139
     List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
140 140
 
141 141
     int submitCaseApplicationBatch(String batchNumber);
142
+
143
+    int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
142 144
 }

+ 89
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Datei anzeigen

@@ -1989,10 +1989,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1989 1989
             if (agreeOrNotCheck == 1) {//同意审核
1990 1990
                 caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
1991 1991
                 rows += caseApplicationMapper.submitCaseApplication(caseApplication);
1992
+                // 新增日志
1993
+                insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
1992 1994
             } else if (agreeOrNotCheck == 2) {//拒绝审核
1993 1995
                 notes="驳回立案申请,驳回原因:"+caseCheckReject;
1994 1996
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
1995 1997
                 rows += caseApplicationMapper.submitCaseApplication(caseApplication);
1998
+                // 新增日志
1999
+                insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, notes);
1996 2000
                 ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord();
1997 2001
                 arbitrateRecordsel.setCaseAppliId(id);
1998 2002
                 ArbitrateRecord arbitrateRecordnew = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordsel);
@@ -2044,11 +2048,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2044 2048
                     }
2045 2049
                 }
2046 2050
             }
2047
-            // 新增日志
2048
-            insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
2049
-        }
2050
-
2051 2051
 
2052
+        }
2052 2053
         return rows;
2053 2054
     }
2054 2055
 
@@ -2619,6 +2620,90 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2619 2620
         return rows;
2620 2621
     }
2621 2622
 
2623
+    @Override
2624
+    @Transactional
2625
+    public int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject) {
2626
+        int rows = 0;
2627
+        CaseApplication caseApplicationsel = new CaseApplication();
2628
+        caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
2629
+        caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
2630
+        List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
2631
+        List<Long> ids = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
2632
+        if(caseApplications!=null&&caseApplications.size()>0){
2633
+            for (Long id : ids) {
2634
+                String notes="";
2635
+                CaseApplication caseApplication = new CaseApplication();
2636
+                caseApplication.setId(id);
2637
+                caseApplication.setAgreeOrNotCheck(agreeOrNotCheck);
2638
+                if (agreeOrNotCheck == 1) {
2639
+                    //同意审核
2640
+                    caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
2641
+                    rows += caseApplicationMapper.submitCaseApplication(caseApplication);
2642
+                    // 新增日志
2643
+                    insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
2644
+                } else if (agreeOrNotCheck == 2) {
2645
+                    //拒绝审核
2646
+                    notes="驳回立案申请,驳回原因:"+caseCheckReject;
2647
+                    caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
2648
+                    rows += caseApplicationMapper.submitCaseApplication(caseApplication);
2649
+                    // 新增日志
2650
+                    insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, notes);
2651
+                    ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord();
2652
+                    arbitrateRecordsel.setCaseAppliId(id);
2653
+                    ArbitrateRecord arbitrateRecordnew = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordsel);
2654
+                    if(arbitrateRecordnew!=null){
2655
+                        arbitrateRecordnew.setCaseCheckReject(caseCheckReject);
2656
+                        arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
2657
+                    }else {
2658
+                        arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
2659
+                        arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
2660
+                    }
2661
+                    //发短信给申请人
2662
+                    SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
2663
+                    CaseAffiliate caseAffiliate = new CaseAffiliate();
2664
+                    caseAffiliate.setCaseAppliId(caseApplication.getId());
2665
+                    List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
2666
+                    if (caseAffiliates != null && caseAffiliates.size() > 0) {
2667
+                        for (CaseAffiliate affiliate : caseAffiliates) {
2668
+                            //获取身份类型
2669
+                            int identityType = affiliate.getIdentityType();
2670
+                            //查询案件详细信息
2671
+                            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
2672
+                            String caseName = "仲裁";
2673
+                            String caseNum = caseApplication1.getCaseNum();
2674
+
2675
+                            if (identityType == 1) {
2676
+                                request.setPhone(affiliate.getContactTelphone());
2677
+                                request.setTemplateId("2018697");
2678
+                                String name = affiliate.getName();
2679
+                                request.setTemplateParamSet(new String[]{name, caseName, caseNum,caseCheckReject});
2680
+                                Boolean aBoolean = SmsUtils.sendSms(request);
2681
+                                //保存短信发送记录
2682
+                                SmsSendRecord smsSendRecord = new SmsSendRecord();
2683
+                                smsSendRecord.setCaseId(caseApplication.getId());
2684
+                                smsSendRecord.setCaseNum(caseNum);
2685
+                                smsSendRecord.setPhone(request.getPhone());
2686
+                                smsSendRecord.setSendTime(new Date());
2687
+                                String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已拒绝,拒接原因:" + caseCheckReject;
2688
+                                smsSendRecord.setSendContent(content);
2689
+                                smsSendRecord.setCreateBy(getUsername());
2690
+                                if (aBoolean) {
2691
+                                    smsSendRecord.setSendStatus(1);
2692
+                                } else {
2693
+                                    smsSendRecord.setSendStatus(0);
2694
+                                }
2695
+                                smsRecordMapper.saveSmsSendRecord(smsSendRecord);
2696
+
2697
+                            }
2698
+
2699
+                        }
2700
+                    }
2701
+                }
2702
+            }
2703
+        }
2704
+        return rows;
2705
+    }
2706
+
2622 2707
     private String getColumnstr(String columnname) {
2623 2708
         String columnstr  = "";
2624 2709
         switch (columnname) {

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Datei anzeigen

@@ -235,6 +235,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
235 235
             caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
236 236
             caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter());
237 237
             caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris());
238
+            caseApplication1.setRespondentIsWrittenHear(caseEvidenceDTO.getRespondentIsWrittenHear());
238 239
             List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
239 240
             if (arbitrators != null && arbitrators.size() > 0) {
240 241
                 List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Datei anzeigen

@@ -1155,6 +1155,7 @@
1155 1155
             </if>
1156 1156
             <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
1157 1157
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
1158
+            <if test="respondentIsWrittenHear != null">respon_isWrit_hear = #{respondentIsWrittenHear},</if>
1158 1159
             <if test="hearDate != null">hear_date = #{hearDate},</if>
1159 1160
             <if test="filearbitraUrl != null  and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
1160 1161
             <if test="adjudicaCounterReason != null  and adjudicaCounterReason != ''">adjudica_counter_reason =