|
|
@@ -8,6 +8,7 @@ import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
8
|
8
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
9
|
9
|
import com.ruoyi.common.core.redis.RedisCache;
|
|
10
|
10
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
11
|
+import com.ruoyi.common.utils.SmsUtils;
|
|
11
|
12
|
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
|
12
|
13
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
13
|
14
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
|
@@ -66,6 +67,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
66
|
67
|
private RedisCache redisCache;
|
|
67
|
68
|
@Autowired
|
|
68
|
69
|
private SendMailRecordMapper sendMailRecordMapper;
|
|
|
70
|
+ @Autowired
|
|
|
71
|
+ private SmsRecordMapper smsRecordMapper;
|
|
69
|
72
|
|
|
70
|
73
|
@Override
|
|
71
|
74
|
@Transactional
|
|
|
@@ -565,6 +568,47 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|
565
|
568
|
sendMailRecord1.setCreateBy(getUsername());
|
|
566
|
569
|
if (b) {
|
|
567
|
570
|
sendMailRecord1.setSendStatus(1);
|
|
|
571
|
+ // 发送短信
|
|
|
572
|
+ if(CollectionUtil.isNotEmpty(caseAffiliates)) {
|
|
|
573
|
+ SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
|
574
|
+ request.setTemplateId("1990362");
|
|
|
575
|
+ for (CaseAffiliate affiliate : caseAffiliates) {
|
|
|
576
|
+
|
|
|
577
|
+ 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
|
+ }
|
|
|
583
|
+ Boolean aBoolean = SmsUtils.sendSms(request);
|
|
|
584
|
+
|
|
|
585
|
+ // 保存短信发送记录
|
|
|
586
|
+ SmsSendRecord smsSendRecord = new SmsSendRecord();
|
|
|
587
|
+ smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
|
|
|
588
|
+
|
|
|
589
|
+ smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
|
|
|
590
|
+ smsSendRecord.setPhone(request.getPhone());
|
|
|
591
|
+ 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
|
+ }
|
|
|
598
|
+
|
|
|
599
|
+ smsSendRecord.setCreateBy(getUsername());
|
|
|
600
|
+ if (aBoolean) {
|
|
|
601
|
+ smsSendRecord.setSendStatus(1);
|
|
|
602
|
+ } else {
|
|
|
603
|
+ smsSendRecord.setSendStatus(0);
|
|
|
604
|
+ }
|
|
|
605
|
+ smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
|
|
606
|
+
|
|
|
607
|
+
|
|
|
608
|
+ }
|
|
|
609
|
+
|
|
|
610
|
+ }
|
|
|
611
|
+
|
|
568
|
612
|
} else {
|
|
569
|
613
|
sendMailRecord1.setSendStatus(0);
|
|
570
|
614
|
}
|