ソースを参照

实现批量组庭功能

qitz 2 年 前
コミット
82b6431be9

+ 10
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java ファイルの表示

@@ -292,6 +292,16 @@ public class CaseApplicationController extends BaseController {
292 292
         return toAjax(caseApplicationService.pendTralSure(caseApplication));
293 293
     }
294 294
 
295
+    /**
296
+     * 批量组庭审核
297
+     */
298
+//    @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
299
+    @Log(title = "批量组庭审核", businessType = BusinessType.UPDATE)
300
+    @PostMapping("/pendTralCheckBatch")
301
+    public AjaxResult pendTralCheckBatch(@Validated @RequestBody CaseApplication caseApplication) {
302
+        return toAjax(caseApplicationService.pendTralCheckBatch(caseApplication));
303
+    }
304
+
295 305
     /**
296 306
      * 修改开庭时间
297 307
      */

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java ファイルの表示

@@ -141,4 +141,6 @@ public interface ICaseApplicationService {
141 141
     int submitCaseApplicationBatch(String batchNumber);
142 142
 
143 143
     int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
144
+
145
+    int pendTralCheckBatch(CaseApplication caseApplication);
144 146
 }

+ 95
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java ファイルの表示

@@ -1692,7 +1692,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1692 1692
         int rows = 0;
1693 1693
         //同意组庭
1694 1694
         if (isAgreePendTral != null && isAgreePendTral == 1) {
1695
-            rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1695
+            CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
1696
+            if(caseApplicationselect==null){
1697
+                throw new ServiceException("案件不存在");
1698
+            }
1699
+            String arbitratorId = caseApplicationselect.getArbitratorId();
1700
+            String arbitratorName = caseApplicationselect.getArbitratorName();
1701
+            List<Arbitrator> arbitrators = caseApplication.getArbitrators();
1702
+            if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId)  && StringUtils.isEmpty(arbitratorName)){
1703
+                List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
1704
+                List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
1705
+                String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
1706
+                String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
1707
+                caseApplication.setArbitratorId(idstr);
1708
+                caseApplication.setArbitratorName(arbitratorNamestr);
1709
+                rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1710
+            }
1696 1711
         } else {
1697 1712
             List<Arbitrator> arbitrators = caseApplication.getArbitrators();
1698 1713
             // 仲裁员信息
@@ -2543,7 +2558,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2543 2558
 
2544 2559
     @Override
2545 2560
     public List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication) {
2546
-        return caseApplicationMapper.selectAdminCaseApplicationListBatch(caseApplication);
2561
+        List<CaseApplication> caseApplicationlist = caseApplicationMapper.selectAdminCaseApplicationListBatch(caseApplication);
2562
+        if(caseApplicationlist!=null&&caseApplicationlist.size()>0){
2563
+            for(CaseApplication caseApplicationselect : caseApplicationlist){
2564
+                Integer batchNumber = caseApplicationselect.getBatchNumber();
2565
+                CaseApplication caseApplicationsel = new CaseApplication();
2566
+                caseApplicationsel.setBatchNumber(batchNumber);
2567
+                List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
2568
+                if (caseApplications != null && caseApplications.size() > 0) {
2569
+                    List<Integer> caseStatuss = caseApplications.stream().map(CaseApplication::getCaseStatus).collect(Collectors.toList());
2570
+                    List<String> caseStatusNames = caseApplications.stream().map(CaseApplication::getCaseStatusName).collect(Collectors.toList());
2571
+                    List<Integer> caseStatussnew = caseStatuss.stream().distinct().collect(Collectors.toList());
2572
+                    List<String> caseStatusNamesnew = caseStatusNames.stream().distinct().collect(Collectors.toList());
2573
+                    String caseStatusName = caseStatusNamesnew.stream().map(Object::toString).collect(Collectors.joining(","));
2574
+                    caseApplicationselect.setCaseStatusName(caseStatusName);
2575
+                }
2576
+            }
2577
+        }
2578
+
2579
+        return caseApplicationlist;
2547 2580
     }
2548 2581
 
2549 2582
     @Override
@@ -2704,6 +2737,66 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2704 2737
         return rows;
2705 2738
     }
2706 2739
 
2740
+    @Override
2741
+    @Transactional
2742
+    public int pendTralCheckBatch(CaseApplication caseApplication) {
2743
+        Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
2744
+        int rows = 0;
2745
+        CaseApplication caseApplicationsel = new CaseApplication();
2746
+        caseApplicationsel.setBatchNumber(caseApplication.getBatchNumber());
2747
+        caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
2748
+        List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
2749
+        if (caseApplications != null && caseApplications.size() > 0) {
2750
+            List<String> caseNums = caseApplications.stream().map(CaseApplication::getCaseNum).collect(Collectors.toList());
2751
+            List<String> caseNumsnew = caseNums.stream().distinct().collect(Collectors.toList());
2752
+            String caseNumsstr = caseNumsnew.stream().map(Object::toString).collect(Collectors.joining(","));
2753
+            throw new ServiceException("案件编号"+caseNumsstr+"在案件质证节点,请先进行案件质证,然后再批量组庭审核");
2754
+        }
2755
+
2756
+        CaseApplication caseApplication1 = new CaseApplication();
2757
+        caseApplication1.setBatchNumber(caseApplication.getBatchNumber());
2758
+        caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
2759
+        List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplication1);
2760
+        if (caseApplications1 != null && caseApplications1.size() > 0) {
2761
+            for(CaseApplication caseApplicationse:caseApplications1){
2762
+                //同意组庭
2763
+                if (isAgreePendTral != null && isAgreePendTral == 1) {
2764
+
2765
+                    String arbitratorId = caseApplicationse.getArbitratorId();
2766
+                    String arbitratorName = caseApplicationse.getArbitratorName();
2767
+                    List<Arbitrator> arbitrators = caseApplication.getArbitrators();
2768
+                    if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId)  && StringUtils.isEmpty(arbitratorName)){
2769
+                        List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
2770
+                        List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
2771
+                        String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
2772
+                        String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
2773
+                        caseApplicationse.setArbitratorId(idstr);
2774
+                        caseApplicationse.setArbitratorName(arbitratorNamestr);
2775
+                        caseApplicationse.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
2776
+                        rows += caseApplicationMapper.submitCaseApplication(caseApplicationse);
2777
+                    }
2778
+                } else {
2779
+                    List<Arbitrator> arbitrators = caseApplication.getArbitrators();
2780
+                    // 仲裁员信息
2781
+                    if (arbitrators != null && arbitrators.size() > 0) {
2782
+                        List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
2783
+                        List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
2784
+                        String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
2785
+                        String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
2786
+                        caseApplicationse.setArbitratorId(idstr);
2787
+                        caseApplicationse.setArbitratorName(arbitratorNamestr);
2788
+                        caseApplicationse.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
2789
+                        rows += caseApplicationMapper.submitCaseApplication(caseApplicationse);
2790
+                    }
2791
+                }
2792
+                // 新增日志
2793
+                insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
2794
+
2795
+            }
2796
+        }
2797
+        return rows;
2798
+    }
2799
+
2707 2800
     private String getColumnstr(String columnname) {
2708 2801
         String columnstr  = "";
2709 2802
         switch (columnname) {

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java ファイルの表示

@@ -330,7 +330,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
330 330
         String batchNumber = casePayDTO.getBatchNumber();
331 331
         CaseApplication caseApplicationsel = new CaseApplication();
332 332
         caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
333
-        caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
333
+//        caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
334 334
         List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
335 335
         CasePayListVO listVO = new CasePayListVO();
336 336
         BigDecimal sum = new BigDecimal(0);

+ 1
- 11
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml ファイルの表示

@@ -856,17 +856,7 @@
856 856
 
857 857
     <select id="selectAdminCaseApplicationListBatch" parameterType="CaseApplication" resultMap="CaseApplicationResult">
858 858
         SELECT DISTINCT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
859
-        c.arbitrator_id  ,c.case_status ,a.identity_type ,a.name ,
860
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
861
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
862
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
863
-        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
864
-        when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
865
-        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
866
-        when 18 then '待仲裁员审核仲裁文书'
867
-        when 31 then '待修改开庭时间'
868
-        ELSE '无案件状态'
869
-        END caseStatusName,
859
+        c.arbitrator_id  ,a.identity_type ,a.name ,
870 860
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
871 861
         ELSE '无审理方式'
872 862
         END arbitratMethodName