|
|
@@ -524,6 +524,22 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
524
|
524
|
if (caseApplication1 == null) {
|
|
525
|
525
|
return AjaxResult.error("未查询到相关案件");
|
|
526
|
526
|
}
|
|
|
527
|
+ List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
|
|
|
528
|
+ if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
|
529
|
+ for (CaseAttach caseAttach : caseAttachList) {
|
|
|
530
|
+ if (caseAttach.getAnnexType() == 3) {
|
|
|
531
|
+ String annexName = caseAttach.getAnnexName();
|
|
|
532
|
+ String prefix = "/profile/upload/";
|
|
|
533
|
+ int startIndex = prefix.length();
|
|
|
534
|
+ String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
|
|
535
|
+ File file = new File(path);
|
|
|
536
|
+ if(!file.exists()){
|
|
|
537
|
+ return AjaxResult.error("未生成裁决书");
|
|
|
538
|
+ }
|
|
|
539
|
+
|
|
|
540
|
+ }
|
|
|
541
|
+ }
|
|
|
542
|
+ }
|
|
527
|
543
|
//修改案件状态
|
|
528
|
544
|
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
|
529
|
545
|
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
|
|
@@ -545,7 +561,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
545
|
561
|
}
|
|
546
|
562
|
}
|
|
547
|
563
|
//发送邮件
|
|
548
|
|
- boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail);
|
|
|
564
|
+ boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail,caseAttachList);
|
|
549
|
565
|
SendMailRecord sendMailRecord = new SendMailRecord();
|
|
550
|
566
|
sendMailRecord.setCaseId(id);
|
|
551
|
567
|
sendMailRecord.setMailAddress(appEmail);
|
|
|
@@ -575,11 +591,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
575
|
591
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
|
576
|
592
|
|
|
577
|
593
|
request.setPhone(affiliate.getContactTelphone());
|
|
578
|
|
- if(affiliate.getIdentityType() == 1) {
|
|
579
|
|
- request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
|
580
|
|
- }else {
|
|
581
|
|
- request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
|
582
|
|
- }
|
|
|
594
|
+// if(affiliate.getIdentityType() == 1) {
|
|
|
595
|
+// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
|
|
596
|
+// }else {
|
|
|
597
|
+// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
|
|
598
|
+// }
|
|
|
599
|
+ request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum()});
|
|
583
|
600
|
Boolean aBoolean = SmsUtils.sendSms(request);
|
|
584
|
601
|
|
|
585
|
602
|
// 保存短信发送记录
|
|
|
@@ -589,14 +606,16 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
589
|
606
|
smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
|
|
590
|
607
|
smsSendRecord.setPhone(request.getPhone());
|
|
591
|
608
|
smsSendRecord.setSendTime(new Date());
|
|
592
|
|
- // 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达至{3}邮箱,请知晓,如非本人操作,请忽略本短信。
|
|
593
|
|
- if(affiliate.getIdentityType() == 1) {
|
|
594
|
|
- smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
|
595
|
|
- }else {
|
|
596
|
|
- smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
|
597
|
|
- }
|
|
|
609
|
+// // 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。
|
|
|
610
|
+// if(affiliate.getIdentityType() == 1) {
|
|
|
611
|
+// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
|
|
612
|
+// }else {
|
|
|
613
|
+// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
|
|
614
|
+// }
|
|
|
615
|
+ smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。");
|
|
598
|
616
|
|
|
599
|
|
- smsSendRecord.setCreateBy(getUsername());
|
|
|
617
|
+
|
|
|
618
|
+ smsSendRecord.setCreateBy(getUsername());
|
|
600
|
619
|
if (aBoolean) {
|
|
601
|
620
|
smsSendRecord.setSendStatus(1);
|
|
602
|
621
|
} else {
|
|
|
@@ -627,11 +646,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
627
|
646
|
* @param appEmail
|
|
628
|
647
|
* @param resEmail
|
|
629
|
648
|
*/
|
|
630
|
|
- private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
|
|
|
649
|
+ private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail, List<CaseAttach> caseAttachList) {
|
|
631
|
650
|
List<File> fileList = new ArrayList<>();
|
|
632
|
651
|
File file = null;
|
|
633
|
|
-
|
|
634
|
|
- List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
|
|
635
|
652
|
if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
636
|
653
|
for (CaseAttach caseAttach : caseAttachList) {
|
|
637
|
654
|
if (caseAttach.getAnnexType() == 3) {
|
|
|
@@ -645,7 +662,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
645
|
662
|
}
|
|
646
|
663
|
}
|
|
647
|
664
|
}
|
|
648
|
|
- if (file != null) {
|
|
|
665
|
+
|
|
|
666
|
+ if (file != null && file.exists()) {
|
|
649
|
667
|
try {
|
|
650
|
668
|
Boolean aBoolean = emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
651
|
669
|
Boolean aBoolean1 = emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|