|
|
@@ -4,14 +4,22 @@ 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
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
9
|
+import com.alibaba.fastjson.JSONObject;
|
|
7
|
10
|
import com.google.gson.Gson;
|
|
|
11
|
+import com.google.gson.JsonArray;
|
|
8
|
12
|
import com.google.gson.JsonObject;
|
|
9
|
13
|
import com.ruoyi.common.annotation.DataScope;
|
|
10
|
14
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
11
|
15
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
12
|
16
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
17
|
+
|
|
|
18
|
+
|
|
|
19
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
13
|
20
|
import com.ruoyi.common.exception.EsignDemoException;
|
|
14
|
21
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
22
|
+import com.ruoyi.system.mapper.SysUserMapper;
|
|
15
|
23
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
16
|
24
|
import com.ruoyi.common.utils.DateUtils;
|
|
17
|
25
|
import com.ruoyi.common.utils.SmsUtils;
|
|
|
@@ -26,6 +34,8 @@ import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
|
26
|
34
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
27
|
35
|
import org.springframework.stereotype.Service;
|
|
28
|
36
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
37
|
+
|
|
|
38
|
+import java.io.File;
|
|
29
|
39
|
import java.math.BigDecimal;
|
|
30
|
40
|
import java.text.SimpleDateFormat;
|
|
31
|
41
|
import java.util.*;
|
|
|
@@ -52,7 +62,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
52
|
62
|
private CaseAttachMapper caseAttachMapper;
|
|
53
|
63
|
@Autowired
|
|
54
|
64
|
private SysDeptMapper sysDeptMapper;
|
|
55
|
|
-
|
|
|
65
|
+ @Autowired
|
|
|
66
|
+ private ICaseApplicationService caseApplicationService;
|
|
|
67
|
+ @Autowired
|
|
|
68
|
+ private SysUserMapper sysUserMapper;
|
|
56
|
69
|
@Autowired
|
|
57
|
70
|
private SealSignRecordMapper sealSignRecordMapper;
|
|
58
|
71
|
// 手机号正则
|
|
|
@@ -95,7 +108,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
95
|
108
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
96
|
109
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
97
|
110
|
// 将组织机构id设为申请人名称
|
|
98
|
|
- if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
111
|
+ if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
99
|
112
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
100
|
113
|
} else {
|
|
101
|
114
|
// 如果不存在则新增
|
|
|
@@ -178,7 +191,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
178
|
191
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
179
|
192
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
180
|
193
|
// 将组织机构id设为申请人名称
|
|
181
|
|
- if (deptMap.containsKey(caseApplication.getName())) {
|
|
|
194
|
+ if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
182
|
195
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
183
|
196
|
} else {
|
|
184
|
197
|
// 如果不存在则新增
|
|
|
@@ -662,6 +675,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
662
|
675
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
663
|
676
|
}else {
|
|
664
|
677
|
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
|
678
|
+ // 仲裁员信息
|
|
665
|
679
|
if(arbitrators!=null&&arbitrators.size()>0){
|
|
666
|
680
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
667
|
681
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
|
@@ -849,27 +863,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
849
|
863
|
String hearDatestr = dateFormat.format(hearDate);
|
|
850
|
864
|
|
|
851
|
865
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
852
|
|
- List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
|
866
|
+// List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
853
|
867
|
if(StringUtils.isNotEmpty(arbitratorId)){
|
|
854
|
868
|
String[] idStrList = arbitratorId.split(",");
|
|
855
|
869
|
List<Long> idList = new ArrayList<>();
|
|
856
|
870
|
for(int i = 0;i < idStrList.length;i ++ ){
|
|
857
|
871
|
idList.add(Long.parseLong(idStrList[i]));
|
|
858
|
872
|
}
|
|
859
|
|
- Arbitrator arbitrator = new Arbitrator();
|
|
860
|
|
- arbitrator.setIdList(idList);
|
|
861
|
|
- arbitratorList = arbitratorMapper.selectArbitratorList(arbitrator);
|
|
862
|
|
- if(arbitratorList!=null) {
|
|
863
|
|
- for (int i = 0; i < arbitratorList.size(); i++) {
|
|
864
|
|
- Arbitrator arbitratorselect = arbitratorList.get(i);
|
|
865
|
|
- //给仲裁员发送短信通知
|
|
866
|
|
- request.setPhone(arbitratorselect.getTelephone());
|
|
867
|
|
- // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
868
|
|
- String name = arbitratorselect.getArbitratorName();
|
|
869
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
870
|
|
- SmsUtils.sendSms(request);
|
|
871
|
|
- }
|
|
872
|
|
- }
|
|
|
873
|
+ // 查询仲裁员电话号
|
|
|
874
|
+ List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
|
875
|
+ if(CollectionUtil.isNotEmpty(userList)) {
|
|
|
876
|
+ for (SysUser user : userList) {
|
|
|
877
|
+ //给仲裁员发送短信通知
|
|
|
878
|
+ request.setPhone(user.getPhonenumber());
|
|
|
879
|
+ // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
880
|
+ String name = user.getNickName();
|
|
|
881
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
882
|
+ SmsUtils.sendSms(request);
|
|
|
883
|
+
|
|
|
884
|
+ }
|
|
|
885
|
+ }
|
|
|
886
|
+
|
|
873
|
887
|
}
|
|
874
|
888
|
|
|
875
|
889
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
@@ -891,7 +905,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
891
|
905
|
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
892
|
906
|
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
893
|
907
|
}
|
|
894
|
|
- caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
|
908
|
+
|
|
895
|
909
|
}
|
|
896
|
910
|
//给申请人、被申请人发送短信通知
|
|
897
|
911
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|