|
|
@@ -4,12 +4,17 @@ 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
|
+import com.google.gson.Gson;
|
|
|
8
|
+import com.google.gson.JsonArray;
|
|
|
9
|
+import com.google.gson.JsonObject;
|
|
7
|
10
|
import com.ruoyi.common.annotation.DataScope;
|
|
8
|
11
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
|
12
|
+import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
9
|
13
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
10
|
|
-import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
14
|
+import com.ruoyi.common.exception.EsignDemoException;
|
|
11
|
15
|
import com.ruoyi.common.exception.ServiceException;
|
|
12
|
|
-import com.ruoyi.system.mapper.SysUserMapper;
|
|
|
16
|
+import com.ruoyi.common.utils.SignAward;
|
|
|
17
|
+import com.ruoyi.common.utils.bean.SealSignRecord;
|
|
13
|
18
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
14
|
19
|
import com.ruoyi.common.utils.DateUtils;
|
|
15
|
20
|
import com.ruoyi.common.utils.SmsUtils;
|
|
|
@@ -41,7 +46,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
41
|
46
|
private CaseAffiliateMapper caseAffiliateMapper;
|
|
42
|
47
|
|
|
43
|
48
|
@Autowired
|
|
44
|
|
- private SysUserMapper sysUserMapper;
|
|
|
49
|
+ private ArbitratorMapper arbitratorMapper;
|
|
45
|
50
|
@Autowired
|
|
46
|
51
|
private ArbitrateRecordMapper arbitrateRecordMapper;
|
|
47
|
52
|
|
|
|
@@ -89,7 +94,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
89
|
94
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
90
|
95
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
91
|
96
|
// 将组织机构id设为申请人名称
|
|
92
|
|
- if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
|
97
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
93
|
98
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
94
|
99
|
} else {
|
|
95
|
100
|
// 如果不存在则新增
|
|
|
@@ -172,7 +177,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
172
|
177
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
173
|
178
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
174
|
179
|
// 将组织机构id设为申请人名称
|
|
175
|
|
- if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
|
180
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
176
|
181
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
177
|
182
|
} else {
|
|
178
|
183
|
// 如果不存在则新增
|
|
|
@@ -656,7 +661,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
656
|
661
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
657
|
662
|
}else {
|
|
658
|
663
|
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
659
|
|
- // 仲裁员信息
|
|
660
|
664
|
if(arbitrators!=null&&arbitrators.size()>0){
|
|
661
|
665
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
662
|
666
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
|
@@ -807,32 +811,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
807
|
811
|
String hearDatestr = dateFormat.format(hearDate);
|
|
808
|
812
|
|
|
809
|
813
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
810
|
|
-// List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
|
814
|
+ List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
811
|
815
|
if(StringUtils.isNotEmpty(arbitratorId)){
|
|
812
|
816
|
String[] idStrList = arbitratorId.split(",");
|
|
813
|
817
|
List<Long> idList = new ArrayList<>();
|
|
814
|
818
|
for(int i = 0;i < idStrList.length;i ++ ){
|
|
815
|
819
|
idList.add(Long.parseLong(idStrList[i]));
|
|
816
|
820
|
}
|
|
817
|
|
-//
|
|
818
|
|
-
|
|
819
|
|
- // 查询仲裁员电话号
|
|
820
|
|
- List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
821
|
|
- if(CollectionUtil.isNotEmpty(userList)) {
|
|
822
|
|
- for (SysUser user : userList) {
|
|
823
|
|
-
|
|
824
|
|
-
|
|
825
|
|
- //给仲裁员发送短信通知
|
|
826
|
|
- request.setPhone(user.getPhonenumber());
|
|
827
|
|
- // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
828
|
|
- String name = user.getNickName();
|
|
829
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
830
|
|
- SmsUtils.sendSms(request);
|
|
831
|
|
-
|
|
832
|
|
- }
|
|
833
|
|
- }
|
|
834
|
|
-
|
|
835
|
|
-
|
|
|
821
|
+ Arbitrator arbitrator = new Arbitrator();
|
|
|
822
|
+ arbitrator.setIdList(idList);
|
|
|
823
|
+ arbitratorList = arbitratorMapper.selectArbitratorList(arbitrator);
|
|
|
824
|
+ if(arbitratorList!=null) {
|
|
|
825
|
+ for (int i = 0; i < arbitratorList.size(); i++) {
|
|
|
826
|
+ Arbitrator arbitratorselect = arbitratorList.get(i);
|
|
|
827
|
+ //给仲裁员发送短信通知
|
|
|
828
|
+ request.setPhone(arbitratorselect.getTelephone());
|
|
|
829
|
+ // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
830
|
+ String name = arbitratorselect.getArbitratorName();
|
|
|
831
|
+ request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
|
832
|
+ SmsUtils.sendSms(request);
|
|
|
833
|
+ }
|
|
|
834
|
+ }
|
|
836
|
835
|
}
|
|
837
|
836
|
|
|
838
|
837
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
@@ -854,9 +853,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
854
|
853
|
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
855
|
854
|
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
856
|
855
|
}
|
|
857
|
|
-
|
|
|
856
|
+ caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
858
|
857
|
}
|
|
859
|
|
- caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
860
|
858
|
//给申请人、被申请人发送短信通知
|
|
861
|
859
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|
|
862
|
860
|
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
|
@@ -993,4 +991,66 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
993
|
991
|
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
|
994
|
992
|
}
|
|
995
|
993
|
|
|
|
994
|
+ @Transactional
|
|
|
995
|
+ public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
|
|
996
|
+
|
|
|
997
|
+ Gson gson = new Gson();
|
|
|
998
|
+
|
|
|
999
|
+
|
|
|
1000
|
+
|
|
|
1001
|
+ SealSignRecord sealSignRecord = new SealSignRecord();
|
|
|
1002
|
+ sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
|
1003
|
+ EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
|
1004
|
+ JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
|
1005
|
+ JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
|
1006
|
+ JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
|
1007
|
+ for (int i = 0; i < signersArray.size(); i++) {
|
|
|
1008
|
+ JsonObject signerObject = (JsonObject)signersArray.get(i);
|
|
|
1009
|
+ Integer psnsignStatus ;
|
|
|
1010
|
+ Integer orgsignStatus ;
|
|
|
1011
|
+ if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
|
1012
|
+ JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
|
1013
|
+ if(psnSignerData!=null){
|
|
|
1014
|
+ psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1015
|
+ sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
|
1016
|
+
|
|
|
1017
|
+ if(psnsignStatus.intValue()==2){
|
|
|
1018
|
+ //更新立案申请状态为待用印
|
|
|
1019
|
+ CaseApplication caseApplication = new CaseApplication();
|
|
|
1020
|
+ caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
|
1021
|
+ caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1022
|
+
|
|
|
1023
|
+ //修改"签署用印记录表"的状态为待用印
|
|
|
1024
|
+
|
|
|
1025
|
+ }
|
|
|
1026
|
+ }
|
|
|
1027
|
+ }
|
|
|
1028
|
+ if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
|
1029
|
+ JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
|
1030
|
+ if(orgSignerData!=null){
|
|
|
1031
|
+ orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1032
|
+ sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
|
1033
|
+ //更新立案申请状态为待送达
|
|
|
1034
|
+ CaseApplication caseApplication = new CaseApplication();
|
|
|
1035
|
+ caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
|
1036
|
+ caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1037
|
+
|
|
|
1038
|
+ //修改"签署用印记录表"的状态为签署完成
|
|
|
1039
|
+
|
|
|
1040
|
+ //下载审核完成的裁决书,
|
|
|
1041
|
+// SaaSAPIFileUtils.fileDownloadUrl();
|
|
|
1042
|
+
|
|
|
1043
|
+ }
|
|
|
1044
|
+
|
|
|
1045
|
+ }
|
|
|
1046
|
+
|
|
|
1047
|
+ }
|
|
|
1048
|
+
|
|
|
1049
|
+ }
|
|
|
1050
|
+
|
|
|
1051
|
+
|
|
|
1052
|
+
|
|
|
1053
|
+
|
|
|
1054
|
+
|
|
|
1055
|
+
|
|
996
|
1056
|
}
|