|
|
@@ -4,19 +4,29 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
|
4
|
4
|
import cn.hutool.core.collection.CollectionUtil;
|
|
5
|
5
|
import cn.hutool.core.util.StrUtil;
|
|
6
|
6
|
|
|
|
7
|
+
|
|
|
8
|
+
|
|
7
|
9
|
import com.alibaba.fastjson.JSONArray;
|
|
8
|
10
|
import com.alibaba.fastjson.JSONObject;
|
|
9
|
11
|
import com.google.gson.Gson;
|
|
|
12
|
+import com.google.gson.JsonArray;
|
|
10
|
13
|
import com.google.gson.JsonObject;
|
|
11
|
14
|
import com.ruoyi.common.annotation.DataScope;
|
|
12
|
15
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
13
|
16
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
14
|
17
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
15
|
18
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
19
|
+
|
|
16
|
20
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
17
|
21
|
import com.ruoyi.common.exception.EsignDemoException;
|
|
18
|
22
|
import com.ruoyi.common.exception.ServiceException;
|
|
19
|
23
|
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
|
|
24
|
+
|
|
|
25
|
+
|
|
|
26
|
+
|
|
|
27
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
28
|
+import com.ruoyi.common.exception.EsignDemoException;
|
|
|
29
|
+import com.ruoyi.common.exception.ServiceException;
|
|
20
|
30
|
import com.ruoyi.system.mapper.SysUserMapper;
|
|
21
|
31
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
22
|
32
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
@@ -32,6 +42,8 @@ import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
|
32
|
42
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
33
|
43
|
import org.springframework.stereotype.Service;
|
|
34
|
44
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
45
|
+
|
|
|
46
|
+import java.io.File;
|
|
35
|
47
|
import java.math.BigDecimal;
|
|
36
|
48
|
import java.text.SimpleDateFormat;
|
|
37
|
49
|
import java.util.*;
|
|
|
@@ -61,7 +73,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
61
|
73
|
private SysDeptMapper sysDeptMapper;
|
|
62
|
74
|
@Autowired
|
|
63
|
75
|
private SysUserMapper sysUserMapper;
|
|
64
|
|
-
|
|
65
|
76
|
@Autowired
|
|
66
|
77
|
private SealSignRecordMapper sealSignRecordMapper;
|
|
67
|
78
|
// 手机号正则
|
|
|
@@ -104,7 +115,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
104
|
115
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
105
|
116
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
106
|
117
|
// 将组织机构id设为申请人名称
|
|
107
|
|
- if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
118
|
+ if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
108
|
119
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
109
|
120
|
} else {
|
|
110
|
121
|
// 如果不存在则新增
|
|
|
@@ -187,7 +198,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
187
|
198
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
188
|
199
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
189
|
200
|
// 将组织机构id设为申请人名称
|
|
190
|
|
- if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
201
|
+ if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
191
|
202
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
192
|
203
|
} else {
|
|
193
|
204
|
// 如果不存在则新增
|
|
|
@@ -671,6 +682,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
671
|
682
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
672
|
683
|
}else {
|
|
673
|
684
|
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
|
685
|
+ // 仲裁员信息
|
|
674
|
686
|
if(arbitrators!=null&&arbitrators.size()>0){
|
|
675
|
687
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
676
|
688
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
|
@@ -910,7 +922,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
910
|
922
|
|
|
911
|
923
|
//发送短信通知
|
|
912
|
924
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
913
|
|
- request.setTemplateId("1948332");
|
|
|
925
|
+ request.setTemplateId("1952136");
|
|
914
|
926
|
// 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
|
|
915
|
927
|
request.setPhone(caseAffiliate.getContactTelphone());
|
|
916
|
928
|
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
|
|
|
@@ -973,27 +985,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
973
|
985
|
String hearDatestr = dateFormat.format(hearDate);
|
|
974
|
986
|
|
|
975
|
987
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
976
|
|
- List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
|
988
|
+// List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
977
|
989
|
if(StringUtils.isNotEmpty(arbitratorId)){
|
|
978
|
990
|
String[] idStrList = arbitratorId.split(",");
|
|
979
|
991
|
List<Long> idList = new ArrayList<>();
|
|
980
|
992
|
for(int i = 0;i < idStrList.length;i ++ ){
|
|
981
|
993
|
idList.add(Long.parseLong(idStrList[i]));
|
|
982
|
994
|
}
|
|
983
|
|
- Arbitrator arbitrator = new Arbitrator();
|
|
984
|
|
- arbitrator.setIdList(idList);
|
|
985
|
|
- arbitratorList = arbitratorMapper.selectArbitratorList(arbitrator);
|
|
986
|
|
- if(arbitratorList!=null) {
|
|
987
|
|
- for (int i = 0; i < arbitratorList.size(); i++) {
|
|
988
|
|
- Arbitrator arbitratorselect = arbitratorList.get(i);
|
|
989
|
|
- //给仲裁员发送短信通知
|
|
990
|
|
- request.setPhone(arbitratorselect.getTelephone());
|
|
991
|
|
- // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
992
|
|
- String name = arbitratorselect.getArbitratorName();
|
|
993
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
994
|
|
- SmsUtils.sendSms(request);
|
|
995
|
|
- }
|
|
996
|
|
- }
|
|
|
995
|
+ // 查询仲裁员电话号
|
|
|
996
|
+ List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
|
997
|
+ if(CollectionUtil.isNotEmpty(userList)) {
|
|
|
998
|
+ for (SysUser user : userList) {
|
|
|
999
|
+ //给仲裁员发送短信通知
|
|
|
1000
|
+ request.setPhone(user.getPhonenumber());
|
|
|
1001
|
+ // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
1002
|
+ String name = user.getNickName();
|
|
|
1003
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
1004
|
+ SmsUtils.sendSms(request);
|
|
|
1005
|
+
|
|
|
1006
|
+ }
|
|
|
1007
|
+ }
|
|
|
1008
|
+
|
|
997
|
1009
|
}
|
|
998
|
1010
|
|
|
999
|
1011
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
@@ -1015,7 +1027,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1015
|
1027
|
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
1016
|
1028
|
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
1017
|
1029
|
}
|
|
1018
|
|
- caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
|
1030
|
+
|
|
1019
|
1031
|
}
|
|
1020
|
1032
|
//给申请人、被申请人发送短信通知
|
|
1021
|
1033
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|