|
|
@@ -2545,7 +2545,169 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2545
|
2545
|
return caseAttach;
|
|
2546
|
2546
|
}
|
|
2547
|
2547
|
|
|
|
2548
|
+ @Override
|
|
|
2549
|
+ public List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication) {
|
|
|
2550
|
+ return caseApplicationMapper.selectAdminCaseApplicationListBatch(caseApplication);
|
|
|
2551
|
+ }
|
|
2548
|
2552
|
|
|
|
2553
|
+ @Override
|
|
|
2554
|
+ @Transactional
|
|
|
2555
|
+ public int submitCaseApplicationBatch(String batchNumber) {
|
|
|
2556
|
+ int rows = 0;
|
|
|
2557
|
+ CaseApplication caseApplicationsel = new CaseApplication();
|
|
|
2558
|
+ caseApplicationsel.setBatchNumber(batchNumber);
|
|
|
2559
|
+ caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
|
|
2560
|
+ List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
|
|
|
2561
|
+ List<Long> ids = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
|
|
|
2562
|
+ if(caseApplications!=null&&caseApplications.size()>0){
|
|
|
2563
|
+ Map<Long, CaseApplication> applicationMap = caseApplications.stream().collect(Collectors.toMap(CaseApplication::getId, Function.identity(), (n1, n2) -> n2));
|
|
|
2564
|
+ List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliateByCaseIds(ids);
|
|
|
2565
|
+ // 转换为Map<CaseId,List<CaseAffiliate>>形式
|
|
|
2566
|
+ Map<Long, List<CaseAffiliate>> caseAffiliateMap = caseAffiliates.stream().collect(Collectors.groupingBy(CaseAffiliate::getCaseAppliId));
|
|
|
2567
|
+ for (Long id : ids) {
|
|
|
2568
|
+ // 查询案件信息,做必填校验,校验不通过,提示,不能提交
|
|
|
2569
|
+ StringBuilder errorMsg = new StringBuilder();
|
|
|
2570
|
+ // 必填校验
|
|
|
2571
|
+ CaseApplication caseApplication = applicationMap.get(id);
|
|
|
2572
|
+ String caseNum = caseApplication.getCaseNum();
|
|
|
2573
|
+ // 基本字段校验
|
|
|
2574
|
+ if(caseApplication!=null) {
|
|
|
2575
|
+ for (String baseColumn : baseColumns) {
|
|
|
2576
|
+ if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, baseColumn))){
|
|
|
2577
|
+ errorMsg.append(getColumnstr(baseColumn)).append("不能为空,");
|
|
|
2578
|
+// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
|
|
2579
|
+ }
|
|
|
2580
|
+ }
|
|
|
2581
|
+ // 校验人员
|
|
|
2582
|
+ if(CollectionUtil.isNotEmpty(caseAffiliates)){
|
|
|
2583
|
+ List<CaseAffiliate> affiliateList = caseAffiliateMap.get(id);
|
|
|
2584
|
+ if(CollectionUtil.isNotEmpty(affiliateList)){
|
|
|
2585
|
+ for (CaseAffiliate caseAffiliate : affiliateList) {
|
|
|
2586
|
+ if(caseAffiliate.getIdentityType()==1){
|
|
|
2587
|
+ // 校验申请人
|
|
|
2588
|
+ for (String applicAffiliateColumn : applicAffiliateColumns) {
|
|
|
2589
|
+ if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
|
|
|
2590
|
+ errorMsg.append(getColumnstr(applicAffiliateColumn)).append("不能为空,");
|
|
|
2591
|
+// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
|
|
2592
|
+ }
|
|
|
2593
|
+ }
|
|
|
2594
|
+ }else {
|
|
|
2595
|
+ // 校验被申请人
|
|
|
2596
|
+ for (String applicAffiliateColumn : dectborAffiliateColumns) {
|
|
|
2597
|
+ if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
|
|
|
2598
|
+ errorMsg.append(getColumnstr(applicAffiliateColumn)).append("不能为空,");
|
|
|
2599
|
+// throw new ServiceException("必填字段未填写,请完善案件信息!");
|
|
|
2600
|
+ }
|
|
|
2601
|
+ }
|
|
|
2602
|
+ }
|
|
|
2603
|
+ }
|
|
|
2604
|
+ }
|
|
|
2605
|
+ }
|
|
|
2606
|
+ }
|
|
|
2607
|
+ if(StringUtils.isNotEmpty(errorMsg.toString())){
|
|
|
2608
|
+ throw new ServiceException("案件编号" + caseNum + errorMsg.toString()+"请完善案件信息!");
|
|
|
2609
|
+ }
|
|
|
2610
|
+
|
|
|
2611
|
+ CaseApplication application = new CaseApplication();
|
|
|
2612
|
+ application.setId(id);
|
|
|
2613
|
+ //提交立案申请
|
|
|
2614
|
+ application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
|
|
|
2615
|
+ rows += caseApplicationMapper.submitCaseApplication(application);
|
|
|
2616
|
+ // 新增日志
|
|
|
2617
|
+ insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
|
|
|
2618
|
+ }
|
|
|
2619
|
+
|
|
|
2620
|
+ }else{
|
|
|
2621
|
+ throw new ServiceException("这个批号没有批量提交的案件");
|
|
|
2622
|
+ }
|
|
|
2623
|
+
|
|
|
2624
|
+ return rows;
|
|
|
2625
|
+ }
|
|
|
2626
|
+
|
|
|
2627
|
+ private String getColumnstr(String columnname) {
|
|
|
2628
|
+ String columnstr = "";
|
|
|
2629
|
+ switch (columnname) {
|
|
|
2630
|
+ case "caseName":
|
|
|
2631
|
+ columnstr = "案件名称";
|
|
|
2632
|
+ break;
|
|
|
2633
|
+ case "caseSubjectAmount":
|
|
|
2634
|
+ columnstr = "案件标的";
|
|
|
2635
|
+ break;
|
|
|
2636
|
+ case "loanStartDate":
|
|
|
2637
|
+ columnstr = "借款开始日期";
|
|
|
2638
|
+ break;
|
|
|
2639
|
+ case "loanEndDate":
|
|
|
2640
|
+ columnstr = "借款结束日期";
|
|
|
2641
|
+ break;
|
|
|
2642
|
+ case "contractNumber":
|
|
|
2643
|
+ columnstr = "合同编号";
|
|
|
2644
|
+ break;
|
|
|
2645
|
+ case "claimInterestOwed":
|
|
|
2646
|
+ columnstr = "申请人主张欠利息";
|
|
|
2647
|
+ break;
|
|
|
2648
|
+ case "claimLiquidDamag":
|
|
|
2649
|
+ columnstr = "申请人主张违约金";
|
|
|
2650
|
+ break;
|
|
|
2651
|
+ case "claimPrinciOwed":
|
|
|
2652
|
+ columnstr = "申请人主张欠本金";
|
|
|
2653
|
+ break;
|
|
|
2654
|
+ case "arbitratClaims":
|
|
|
2655
|
+ columnstr = "申请人仲裁请求及事实和理由";
|
|
|
2656
|
+ break;
|
|
|
2657
|
+ case "name":
|
|
|
2658
|
+ columnstr = "姓名";
|
|
|
2659
|
+ break;
|
|
|
2660
|
+ case "identityNum":
|
|
|
2661
|
+ columnstr = "身份证号";
|
|
|
2662
|
+ break;
|
|
|
2663
|
+ case "contactTelphone":
|
|
|
2664
|
+ columnstr = "联系电话";
|
|
|
2665
|
+ break;
|
|
|
2666
|
+ case "contactAddress":
|
|
|
2667
|
+ columnstr = "联系地址";
|
|
|
2668
|
+ break;
|
|
|
2669
|
+ case "workTelphone":
|
|
|
2670
|
+ columnstr = "单位电话";
|
|
|
2671
|
+ break;
|
|
|
2672
|
+ case "workAddress":
|
|
|
2673
|
+ columnstr = "单位地址";
|
|
|
2674
|
+ break;
|
|
|
2675
|
+ case "residenAffili":
|
|
|
2676
|
+ columnstr = "住所";
|
|
|
2677
|
+ break;
|
|
|
2678
|
+ case "compLegalPerson":
|
|
|
2679
|
+ columnstr = "法定代表人";
|
|
|
2680
|
+ break;
|
|
|
2681
|
+ case "compLegalperPost":
|
|
|
2682
|
+ columnstr = "法定代表人职位";
|
|
|
2683
|
+ break;
|
|
|
2684
|
+ case "email":
|
|
|
2685
|
+ columnstr = "邮箱";
|
|
|
2686
|
+ break;
|
|
|
2687
|
+ case "nameAgent":
|
|
|
2688
|
+ columnstr = "代理人姓名";
|
|
|
2689
|
+ break;
|
|
|
2690
|
+ case "identityNumAgent":
|
|
|
2691
|
+ columnstr = "代理人身份证号";
|
|
|
2692
|
+ break;
|
|
|
2693
|
+ case "contactTelphoneAgent":
|
|
|
2694
|
+ columnstr = "代理人联系电话";
|
|
|
2695
|
+ break;
|
|
|
2696
|
+ case "contactAddressAgent":
|
|
|
2697
|
+ columnstr = "代理人联系地址";
|
|
|
2698
|
+ break;
|
|
|
2699
|
+ case "responSex":
|
|
|
2700
|
+ columnstr = "被申请人性别";
|
|
|
2701
|
+ break;
|
|
|
2702
|
+ case "responBirth":
|
|
|
2703
|
+ columnstr = "被申请人出生年月日";
|
|
|
2704
|
+ break;
|
|
|
2705
|
+ default:
|
|
|
2706
|
+ columnstr = "";
|
|
|
2707
|
+ }
|
|
|
2708
|
+
|
|
|
2709
|
+ return columnstr;
|
|
|
2710
|
+ }
|
|
2549
|
2711
|
|
|
2550
|
2712
|
|
|
2551
|
2713
|
@Override
|
|
|
@@ -2599,9 +2761,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2599
|
2761
|
|
|
2600
|
2762
|
//发送短信通知 1947342 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
2601
|
2763
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
2602
|
|
- request.setTemplateId("1947342");
|
|
|
2764
|
+ request.setTemplateId("2033619");
|
|
2603
|
2765
|
// 发送开庭日期通知短信
|
|
2604
|
|
- sendHearDateMessage(caseApplication, request, "1947342");
|
|
|
2766
|
+ sendHearDateMessage(caseApplication, request, "2033619");
|
|
2605
|
2767
|
// 新增日志
|
|
2606
|
2768
|
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
|
|
2607
|
2769
|
|
|
|
@@ -2619,9 +2781,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2619
|
2781
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
|
2620
|
2782
|
|
|
2621
|
2783
|
String caseNum = caseApplicationselect.getCaseNum();
|
|
2622
|
|
- //Date hearDate = caseApplicationselect.getHearDate();
|
|
|
2784
|
+ Date hearDate = caseApplicationselect.getHearDate();
|
|
|
2785
|
+ String hearDatestr = "";
|
|
2623
|
2786
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
2624
|
|
- String hearDatestr = null;
|
|
|
2787
|
+ if(hearDate!=null) {
|
|
|
2788
|
+ hearDatestr = dateFormat.format(hearDate);
|
|
|
2789
|
+ }
|
|
2625
|
2790
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
2626
|
2791
|
// List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
2627
|
2792
|
if (StringUtils.isNotEmpty(arbitratorId)) {
|
|
|
@@ -2638,7 +2803,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2638
|
2803
|
request.setPhone(user.getPhonenumber());
|
|
2639
|
2804
|
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
2640
|
2805
|
String name = user.getNickName();
|
|
2641
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
2806
|
+ if (templateId.equals("2033619")) {
|
|
|
2807
|
+ request.setTemplateParamSet(new String[]{name, caseNum});
|
|
|
2808
|
+ }
|
|
|
2809
|
+ if (templateId.equals("1975139")) {
|
|
|
2810
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
2811
|
+ }
|
|
|
2812
|
+
|
|
2642
|
2813
|
Boolean aBoolean = SmsUtils.sendSms(request);
|
|
2643
|
2814
|
//保存短信发送记录
|
|
2644
|
2815
|
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
|
@@ -2647,8 +2818,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2647
|
2818
|
smsSendRecord.setPhone(request.getPhone());
|
|
2648
|
2819
|
smsSendRecord.setSendTime(new Date());
|
|
2649
|
2820
|
String content = "";
|
|
2650
|
|
- if (templateId.equals("1947342")) {
|
|
2651
|
|
- content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已确定为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
|
|
|
2821
|
+ if (templateId.equals("2033619")) {
|
|
|
2822
|
+ content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,已组庭,请知晓,如非本人操作,请忽略本短信。";
|
|
2652
|
2823
|
}
|
|
2653
|
2824
|
if (templateId.equals("1975139")) {
|
|
2654
|
2825
|
content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已改为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
|
|
|
@@ -2682,7 +2853,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2682
|
2853
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|
|
2683
|
2854
|
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
2684
|
2855
|
String name = caseAffiliateselect.getName();
|
|
2685
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
2856
|
+ if (templateId.equals("2033619")) {
|
|
|
2857
|
+ request.setTemplateParamSet(new String[]{name, caseNum});
|
|
|
2858
|
+ }
|
|
|
2859
|
+ if (templateId.equals("1975139")) {
|
|
|
2860
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
2861
|
+ }
|
|
2686
|
2862
|
Boolean aBoolean = SmsUtils.sendSms(request);
|
|
2687
|
2863
|
//保存短信发送记录
|
|
2688
|
2864
|
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
|
@@ -2690,7 +2866,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2690
|
2866
|
smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum());
|
|
2691
|
2867
|
smsSendRecord.setPhone(request.getPhone());
|
|
2692
|
2868
|
smsSendRecord.setSendTime(new Date());
|
|
2693
|
|
- String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已确定为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
|
|
|
2869
|
+ String content = "";
|
|
|
2870
|
+ if (templateId.equals("2033619")) {
|
|
|
2871
|
+ content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,已组庭,请知晓,如非本人操作,请忽略本短信。";
|
|
|
2872
|
+ }
|
|
|
2873
|
+ if (templateId.equals("1975139")) {
|
|
|
2874
|
+ content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,开庭日期已改为" + hearDatestr + ",请知晓,如非本人操作,请忽略本短信。";
|
|
|
2875
|
+ }
|
|
2694
|
2876
|
smsSendRecord.setSendContent(content);
|
|
2695
|
2877
|
smsSendRecord.setCreateBy(getUsername());
|
|
2696
|
2878
|
if (aBoolean) {
|