|
|
@@ -105,10 +105,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
105
|
105
|
datas.put("resName", affiliate.getName());
|
|
106
|
106
|
datas.put("resAddress", affiliate.getResidenAffili());
|
|
107
|
107
|
String responSex = affiliate.getResponSex();
|
|
108
|
|
- if (responSex.equals("0")){
|
|
109
|
|
- datas.put("resSex","男");
|
|
110
|
|
- }else{
|
|
111
|
|
- datas.put("resSex","女");
|
|
|
108
|
+ if (responSex.equals("0")) {
|
|
|
109
|
+ datas.put("resSex", "男");
|
|
|
110
|
+ } else {
|
|
|
111
|
+ datas.put("resSex", "女");
|
|
112
|
112
|
}
|
|
113
|
113
|
Date responBirth = affiliate.getResponBirth();
|
|
114
|
114
|
if (responBirth != null) {
|
|
|
@@ -264,7 +264,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
264
|
264
|
String annexName = caseAttach.getAnnexName();
|
|
265
|
265
|
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
|
266
|
266
|
if (isImageFile) {
|
|
267
|
|
- String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
|
|
|
267
|
+ String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
|
268
|
268
|
System.out.println("路径是===========" + annexPath);
|
|
269
|
269
|
PictureRenderData pictureRenderData = WordUtil
|
|
270
|
270
|
.rebuildImageContent(100, 100, null, annexPath);
|
|
|
@@ -274,7 +274,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
274
|
274
|
String annexName = caseAttach.getAnnexName();
|
|
275
|
275
|
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
|
276
|
276
|
if (isImageFile) {
|
|
277
|
|
- String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
|
|
|
277
|
+ String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
|
278
|
278
|
System.out.println("路径是===========" + annexPath);
|
|
279
|
279
|
PictureRenderData pictureRenderData = WordUtil
|
|
280
|
280
|
.rebuildImageContent(100, 100, null, annexPath);
|
|
|
@@ -326,10 +326,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
326
|
326
|
.build();
|
|
327
|
327
|
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
|
328
|
328
|
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
|
329
|
|
- if (caseAttachList != null && caseAttachList.size()>0) {
|
|
|
329
|
+ if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
330
|
330
|
//之前已经生成过了,更新
|
|
331
|
331
|
int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
|
332
|
|
- }else {
|
|
|
332
|
+ } else {
|
|
333
|
333
|
//之前没生成过,新增
|
|
334
|
334
|
int i = caseAttachMapper.save(caseAttach);
|
|
335
|
335
|
if (i > 0) {
|
|
|
@@ -540,8 +540,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
540
|
540
|
}
|
|
541
|
541
|
}
|
|
542
|
542
|
//发送邮件
|
|
543
|
|
- sendCaseEmail(caseApplication1, appEmail, resEmail);
|
|
544
|
|
-
|
|
|
543
|
+ boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail);
|
|
545
|
544
|
SendMailRecord sendMailRecord = new SendMailRecord();
|
|
546
|
545
|
sendMailRecord.setCaseId(id);
|
|
547
|
546
|
sendMailRecord.setMailAddress(appEmail);
|
|
|
@@ -549,8 +548,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
549
|
548
|
sendMailRecord.setMailName("签署后的裁决书");
|
|
550
|
549
|
sendMailRecord.setSendTime(new Date());
|
|
551
|
550
|
sendMailRecord.setCreateBy(getUsername());
|
|
|
551
|
+ if (b) {
|
|
|
552
|
+ sendMailRecord.setSendStatus(1);
|
|
|
553
|
+ } else {
|
|
|
554
|
+ sendMailRecord.setSendStatus(0);
|
|
|
555
|
+ }
|
|
552
|
556
|
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
|
553
|
|
-
|
|
554
|
557
|
SendMailRecord sendMailRecord1 = new SendMailRecord();
|
|
555
|
558
|
sendMailRecord1.setCaseId(id);
|
|
556
|
559
|
sendMailRecord1.setMailAddress(resEmail);
|
|
|
@@ -558,6 +561,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
558
|
561
|
sendMailRecord1.setMailName("签署后的裁决书");
|
|
559
|
562
|
sendMailRecord1.setSendTime(new Date());
|
|
560
|
563
|
sendMailRecord1.setCreateBy(getUsername());
|
|
|
564
|
+ if (b) {
|
|
|
565
|
+ sendMailRecord1.setSendStatus(1);
|
|
|
566
|
+ } else {
|
|
|
567
|
+ sendMailRecord1.setSendStatus(0);
|
|
|
568
|
+ }
|
|
561
|
569
|
sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
|
562
|
570
|
|
|
563
|
571
|
// 新增日志
|
|
|
@@ -573,7 +581,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
573
|
581
|
* @param appEmail
|
|
574
|
582
|
* @param resEmail
|
|
575
|
583
|
*/
|
|
576
|
|
- private void sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
|
|
|
584
|
+ private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
|
|
577
|
585
|
List<File> fileList = new ArrayList<>();
|
|
578
|
586
|
File file = null;
|
|
579
|
587
|
|
|
|
@@ -593,14 +601,18 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
593
|
601
|
}
|
|
594
|
602
|
if (file != null) {
|
|
595
|
603
|
try {
|
|
596
|
|
- emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
597
|
|
- emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
|
604
|
+ Boolean aBoolean = emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
|
605
|
+ Boolean aBoolean1 = emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
|
606
|
+ if (aBoolean && aBoolean1){
|
|
|
607
|
+ return Boolean.TRUE;
|
|
|
608
|
+ }
|
|
598
|
609
|
} catch (Exception e) {
|
|
599
|
610
|
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
|
|
600
|
611
|
System.out.println(e.toString());
|
|
|
612
|
+ return Boolean.FALSE;
|
|
601
|
613
|
}
|
|
602
|
614
|
}
|
|
603
|
|
-
|
|
|
615
|
+ return Boolean.FALSE;
|
|
604
|
616
|
}
|
|
605
|
617
|
|
|
606
|
618
|
@Override
|
|
|
@@ -678,10 +690,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
678
|
690
|
datas.put("resName", affiliate.getName());
|
|
679
|
691
|
datas.put("resAddress", affiliate.getResidenAffili());
|
|
680
|
692
|
String responSex = affiliate.getResponSex();
|
|
681
|
|
- if (responSex.equals("0")){
|
|
682
|
|
- datas.put("resSex","男");
|
|
683
|
|
- }else{
|
|
684
|
|
- datas.put("resSex","女");
|
|
|
693
|
+ if (responSex.equals("0")) {
|
|
|
694
|
+ datas.put("resSex", "男");
|
|
|
695
|
+ } else {
|
|
|
696
|
+ datas.put("resSex", "女");
|
|
685
|
697
|
}
|
|
686
|
698
|
Date responBirth = affiliate.getResponBirth();
|
|
687
|
699
|
if (responBirth != null) {
|
|
|
@@ -838,7 +850,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
838
|
850
|
String annexName = caseAttach.getAnnexName();
|
|
839
|
851
|
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
|
840
|
852
|
if (isImageFile) {
|
|
841
|
|
- String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
|
|
|
853
|
+ String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
|
842
|
854
|
System.out.println("路径是===========" + annexPath);
|
|
843
|
855
|
PictureRenderData pictureRenderData = WordUtil
|
|
844
|
856
|
.rebuildImageContent(100, 100, null, annexPath);
|
|
|
@@ -848,7 +860,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
848
|
860
|
String annexName = caseAttach.getAnnexName();
|
|
849
|
861
|
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
|
|
850
|
862
|
if (isImageFile) {
|
|
851
|
|
- String annexPath = "/home/ruoyi"+caseAttach.getAnnexPath();
|
|
|
863
|
+ String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
|
|
852
|
864
|
System.out.println("路径是===========" + annexPath);
|
|
853
|
865
|
PictureRenderData pictureRenderData = WordUtil
|
|
854
|
866
|
.rebuildImageContent(100, 100, null, annexPath);
|