|
|
@@ -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) {
|