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