|
|
@@ -4,26 +4,14 @@ 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;
|
|
10
|
7
|
import com.google.gson.Gson;
|
|
11
|
|
-import com.google.gson.JsonArray;
|
|
12
|
8
|
import com.google.gson.JsonObject;
|
|
13
|
9
|
import com.ruoyi.common.annotation.DataScope;
|
|
14
|
10
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
15
|
11
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
16
|
12
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
17
|
|
-
|
|
18
|
|
-import com.ruoyi.common.core.domain.entity.SysUser;
|
|
19
|
|
-
|
|
20
|
13
|
import com.ruoyi.common.exception.EsignDemoException;
|
|
21
|
14
|
import com.ruoyi.common.exception.ServiceException;
|
|
22
|
|
-import com.ruoyi.common.utils.SignAward;
|
|
23
|
|
-import com.ruoyi.common.utils.bean.SealSignRecord;
|
|
24
|
|
-
|
|
25
|
|
-import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
|
26
|
|
-import com.ruoyi.system.mapper.SysUserMapper;
|
|
27
|
15
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
|
28
|
16
|
import com.ruoyi.common.utils.DateUtils;
|
|
29
|
17
|
import com.ruoyi.common.utils.SmsUtils;
|
|
|
@@ -34,11 +22,10 @@ import com.ruoyi.wisdomarbitrate.domain.*;
|
|
34
|
22
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
|
35
|
23
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
|
36
|
24
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
|
|
25
|
+import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
|
37
|
26
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
38
|
27
|
import org.springframework.stereotype.Service;
|
|
39
|
28
|
import org.springframework.transaction.annotation.Transactional;
|
|
40
|
|
-
|
|
41
|
|
-import java.io.File;
|
|
42
|
29
|
import java.math.BigDecimal;
|
|
43
|
30
|
import java.text.SimpleDateFormat;
|
|
44
|
31
|
import java.util.*;
|
|
|
@@ -65,13 +52,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
65
|
52
|
private CaseAttachMapper caseAttachMapper;
|
|
66
|
53
|
@Autowired
|
|
67
|
54
|
private SysDeptMapper sysDeptMapper;
|
|
68
|
|
- @Autowired
|
|
69
|
|
- private ICaseApplicationService caseApplicationService;
|
|
70
|
|
- @Autowired
|
|
71
|
|
- private SysUserMapper sysUserMapper;
|
|
|
55
|
+
|
|
72
|
56
|
@Autowired
|
|
73
|
57
|
private SealSignRecordMapper sealSignRecordMapper;
|
|
74
|
|
-
|
|
75
|
58
|
// 手机号正则
|
|
76
|
59
|
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
|
77
|
60
|
|
|
|
@@ -112,7 +95,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
112
|
95
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
113
|
96
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
114
|
97
|
// 将组织机构id设为申请人名称
|
|
115
|
|
- if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
|
98
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
116
|
99
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
117
|
100
|
} else {
|
|
118
|
101
|
// 如果不存在则新增
|
|
|
@@ -195,7 +178,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
195
|
178
|
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
|
196
|
179
|
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
|
197
|
180
|
// 将组织机构id设为申请人名称
|
|
198
|
|
- if (deptMap.containsKey(caseAffiliate.getName())) {
|
|
|
181
|
+ if (deptMap.containsKey(caseApplication.getName())) {
|
|
199
|
182
|
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
|
200
|
183
|
} else {
|
|
201
|
184
|
// 如果不存在则新增
|
|
|
@@ -679,7 +662,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
679
|
662
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
680
|
663
|
}else {
|
|
681
|
664
|
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
682
|
|
- // 仲裁员信息
|
|
683
|
665
|
if(arbitrators!=null&&arbitrators.size()>0){
|
|
684
|
666
|
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
685
|
667
|
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
|
@@ -716,123 +698,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
716
|
698
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
|
717
|
699
|
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
|
718
|
700
|
if(agreeOrNotCheck.intValue()==1){//同意审核
|
|
719
|
|
- try {
|
|
720
|
|
- //获取当前案件的裁决书
|
|
721
|
|
- CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
|
722
|
|
- List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList();
|
|
723
|
|
- if (caseAttachList != null && caseAttachList.size() > 0) {
|
|
724
|
|
- for (CaseAttach caseAttach : caseAttachList) {
|
|
725
|
|
- if (caseAttach.getAnnexType() == 3) {
|
|
726
|
|
- String annexPath = caseAttach.getAnnexPath();
|
|
727
|
|
- //String path = "/home/ruoyi/" + annexPath;
|
|
728
|
|
- String path ="D:\\home\\仲裁裁决书模板.docx";
|
|
729
|
|
- //获取文件上传地址
|
|
730
|
|
- EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
|
731
|
|
- String body = response.getBody();
|
|
732
|
|
- if (body != null){
|
|
733
|
|
- JSONObject jsonObject = JSONObject.parseObject(body);
|
|
734
|
|
- String fileId = jsonObject.getJSONObject("data").getString("fileId");
|
|
735
|
|
- String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl");
|
|
736
|
|
- //上传文件流
|
|
737
|
|
- EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path);
|
|
738
|
|
- JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
|
|
739
|
|
- if (jsonObject1.getIntValue("errCode")==0){
|
|
740
|
|
- //查看文件上传状态
|
|
741
|
|
- Thread.sleep(5000);
|
|
742
|
|
- EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
|
|
743
|
|
- JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
|
|
744
|
|
- JSONObject data = jsonObject2.getJSONObject("data");
|
|
745
|
|
- int fileStatus =data.getIntValue("fileStatus");
|
|
746
|
|
- if (fileStatus == 2 || fileStatus == 5){
|
|
747
|
|
- String fileName = data.getString("fileName");
|
|
748
|
|
- //上传成功,获取文件签名印章位置
|
|
749
|
|
- SealSignRecord sealSignRecord = new SealSignRecord();
|
|
750
|
|
- sealSignRecord.setFileid(fileId);
|
|
751
|
|
- EsignHttpResponse positions = SignAward.getPositions(sealSignRecord);
|
|
752
|
|
- Gson gson = new Gson();
|
|
753
|
|
- JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
|
754
|
|
- JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
|
755
|
|
- String keywordPositions = positionsData.get("keywordPositions").getAsString();
|
|
756
|
|
- //发起签署
|
|
757
|
|
- sealSignRecord.setFilename(fileName);
|
|
758
|
|
- String arbitratorId = caseApplication2.getArbitratorId();
|
|
759
|
|
- if (arbitratorId!=null){
|
|
760
|
|
- SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
|
|
761
|
|
- if (sysUser == null){
|
|
762
|
|
- return rows;
|
|
763
|
|
- }
|
|
764
|
|
- sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
|
|
765
|
|
- sealSignRecord.setPensonName(sysUser.getNickName());
|
|
766
|
|
- }
|
|
767
|
|
- sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
768
|
|
- sealSignRecord.setOrgnizeNamePsnAccount("秦桃则");
|
|
769
|
|
- sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
770
|
|
- sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
|
771
|
|
- sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
|
772
|
|
- //解析文件签名印章位置
|
|
773
|
|
- JSONArray jsonArray = JSONArray.parseArray(keywordPositions);
|
|
774
|
|
- for (int i = 0; i < jsonArray.size(); i++) {
|
|
775
|
|
- JSONObject jsonObject3 = jsonArray.getJSONObject(i);
|
|
776
|
|
- String keyword = jsonObject3.getString("keyword");
|
|
777
|
|
- if (keyword.equals("仲裁员")){
|
|
778
|
|
- //签名
|
|
779
|
|
- JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
|
780
|
|
- // 遍历 positionsArray 中的每个元素
|
|
781
|
|
- for (int j = 0; j < positionsArray.size(); j++){
|
|
782
|
|
- JSONObject positionObj = positionsArray.getJSONObject(j);
|
|
783
|
|
- int pageNum = positionObj.getIntValue("pageNum");
|
|
784
|
|
- sealSignRecord.setPositionPagepsn(String.valueOf(pageNum));
|
|
785
|
|
- JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
|
|
786
|
|
- JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
787
|
|
- double positionX = coordinateObj.getDoubleValue("positionX");
|
|
788
|
|
- double positionY = coordinateObj.getDoubleValue("positionY");
|
|
789
|
|
- sealSignRecord.setPositionXpsn(positionX);
|
|
790
|
|
- sealSignRecord.setPositionYpsn(positionY);
|
|
791
|
|
- }
|
|
792
|
|
- }else {
|
|
793
|
|
- //用印
|
|
794
|
|
- JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
|
795
|
|
- // 遍历 positionsArray 中的每个元素
|
|
796
|
|
- for (int j = 0; j < positionsArray.size(); j++) {
|
|
797
|
|
- JSONObject positionObj = positionsArray.getJSONObject(j);
|
|
798
|
|
- int pageNum = positionObj.getIntValue("pageNum");
|
|
799
|
|
- sealSignRecord.setPositionPageorg(String.valueOf(pageNum));
|
|
800
|
|
- JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
|
|
801
|
|
- JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
|
|
802
|
|
- double positionX = coordinateObj.getDoubleValue("positionX");
|
|
803
|
|
- double positionY = coordinateObj.getDoubleValue("positionY");
|
|
804
|
|
- sealSignRecord.setPositionXorg(positionX);
|
|
805
|
|
- sealSignRecord.setPositionYorg(positionY);
|
|
806
|
|
- }
|
|
807
|
|
- }
|
|
808
|
|
- }
|
|
809
|
|
- EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
|
|
810
|
|
- JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
|
811
|
|
- if (jsonObject1.getIntValue("code")==0){
|
|
812
|
|
- //获取签署流程ID
|
|
813
|
|
- JSONObject data1 = jsonObject3.getJSONObject("data");
|
|
814
|
|
- String signFlowId = data1.getString("signFlowId");
|
|
815
|
|
- //保存案件id,文件id,文件名称.流程id到签署用印记录表里
|
|
816
|
|
- sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
817
|
|
- sealSignRecord.setSignFlowid(signFlowId);
|
|
818
|
|
- sealSignRecord.setSignFlowStatus(1);//待签名
|
|
819
|
|
- sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
|
820
|
|
- }
|
|
821
|
|
- }
|
|
822
|
|
- }
|
|
823
|
|
- }
|
|
824
|
|
- break;
|
|
825
|
|
- }
|
|
826
|
|
- }
|
|
827
|
|
- }
|
|
828
|
|
- } catch (EsignDemoException e) {
|
|
829
|
|
- e.printStackTrace();
|
|
830
|
|
- } catch (InterruptedException e) {
|
|
831
|
|
- e.printStackTrace();
|
|
832
|
|
- }
|
|
833
|
701
|
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
|
|
834
|
702
|
// 新增日志
|
|
835
|
703
|
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
|
|
|
704
|
+
|
|
836
|
705
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
837
|
706
|
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
|
|
838
|
707
|
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
|
|
@@ -926,6 +795,43 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
926
|
795
|
return "短信发送成功";
|
|
927
|
796
|
}
|
|
928
|
797
|
|
|
|
798
|
+ @Override
|
|
|
799
|
+ public SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException {
|
|
|
800
|
+ SealSignRecord sealSignRecord = new SealSignRecord();
|
|
|
801
|
+ sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
|
802
|
+ Gson gson = new Gson();
|
|
|
803
|
+ List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
|
|
804
|
+ SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
|
|
805
|
+ if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
806
|
+ SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
|
|
807
|
+ EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecordselect);
|
|
|
808
|
+ JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
|
|
809
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
810
|
+ String url = signUrlData.get("url").getAsString();
|
|
|
811
|
+ sealSignRecordReslt.setSignUrl(url);
|
|
|
812
|
+ }
|
|
|
813
|
+
|
|
|
814
|
+ return sealSignRecordReslt;
|
|
|
815
|
+ }
|
|
|
816
|
+
|
|
|
817
|
+ @Override
|
|
|
818
|
+ public SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException {
|
|
|
819
|
+ SealSignRecord sealSignRecord = new SealSignRecord();
|
|
|
820
|
+ sealSignRecord.setCaseAppliId(caseApplication.getId());
|
|
|
821
|
+ Gson gson = new Gson();
|
|
|
822
|
+ List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
|
|
|
823
|
+ SealSignRecord sealSignRecordReslt = new SealSignRecord();
|
|
|
824
|
+ if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
825
|
+ SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
|
|
|
826
|
+ EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecordselect);
|
|
|
827
|
+ JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
|
|
828
|
+ JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
|
|
829
|
+ String url = signUrlData.get("url").getAsString();
|
|
|
830
|
+ sealSignRecordReslt.setSealUrl(url);
|
|
|
831
|
+ }
|
|
|
832
|
+ return sealSignRecordReslt;
|
|
|
833
|
+ }
|
|
|
834
|
+
|
|
929
|
835
|
@Override
|
|
930
|
836
|
@Transactional
|
|
931
|
837
|
public int pendTralSure(CaseApplication caseApplication) {
|
|
|
@@ -943,32 +849,27 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
943
|
849
|
String hearDatestr = dateFormat.format(hearDate);
|
|
944
|
850
|
|
|
945
|
851
|
String arbitratorId = caseApplicationselect.getArbitratorId();
|
|
946
|
|
-// List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
|
852
|
+ List<Arbitrator> arbitratorList = new ArrayList<>();
|
|
947
|
853
|
if(StringUtils.isNotEmpty(arbitratorId)){
|
|
948
|
854
|
String[] idStrList = arbitratorId.split(",");
|
|
949
|
855
|
List<Long> idList = new ArrayList<>();
|
|
950
|
856
|
for(int i = 0;i < idStrList.length;i ++ ){
|
|
951
|
857
|
idList.add(Long.parseLong(idStrList[i]));
|
|
952
|
858
|
}
|
|
953
|
|
-//
|
|
954
|
|
-
|
|
955
|
|
- // 查询仲裁员电话号
|
|
956
|
|
- List<SysUser> userList= sysUserMapper.selectUserListByIds(idList);
|
|
957
|
|
- if(CollectionUtil.isNotEmpty(userList)) {
|
|
958
|
|
- for (SysUser user : userList) {
|
|
959
|
|
-
|
|
960
|
|
-
|
|
961
|
|
- //给仲裁员发送短信通知
|
|
962
|
|
- request.setPhone(user.getPhonenumber());
|
|
963
|
|
- // 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
|
|
964
|
|
- String name = user.getNickName();
|
|
965
|
|
- request.setTemplateParamSet(new String[]{name, caseNum, hearDatestr});
|
|
966
|
|
- SmsUtils.sendSms(request);
|
|
967
|
|
-
|
|
968
|
|
- }
|
|
969
|
|
- }
|
|
970
|
|
-
|
|
971
|
|
-
|
|
|
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
|
+ }
|
|
972
|
873
|
}
|
|
973
|
874
|
|
|
974
|
875
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
|
|
@@ -990,7 +891,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
990
|
891
|
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
|
|
991
|
892
|
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
|
|
992
|
893
|
}
|
|
993
|
|
-
|
|
|
894
|
+ caseAffiliateselect.setName(caseAffiliateselect.getName());;
|
|
994
|
895
|
}
|
|
995
|
896
|
//给申请人、被申请人发送短信通知
|
|
996
|
897
|
request.setPhone(caseAffiliateselect.getContactTelphone());
|
|
|
@@ -1128,62 +1029,75 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1128
|
1029
|
caseApplicationNew.setFeePayable(caseApplicationinsertDiffer.getFeePayable());
|
|
1129
|
1030
|
}
|
|
1130
|
1031
|
|
|
1131
|
|
- @Transactional
|
|
1132
|
|
- public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
|
1133
|
|
-
|
|
1134
|
|
- Gson gson = new Gson();
|
|
1135
|
|
-
|
|
1136
|
|
-
|
|
1137
|
|
-
|
|
1138
|
|
- SealSignRecord sealSignRecord = new SealSignRecord();
|
|
1139
|
|
- sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
|
1140
|
|
- EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
1141
|
|
- JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
1142
|
|
- JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
1143
|
|
- JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
1144
|
|
- for (int i = 0; i < signersArray.size(); i++) {
|
|
1145
|
|
- JsonObject signerObject = (JsonObject)signersArray.get(i);
|
|
1146
|
|
- Integer psnsignStatus ;
|
|
1147
|
|
- Integer orgsignStatus ;
|
|
1148
|
|
- if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
1149
|
|
- JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
1150
|
|
- if(psnSignerData!=null){
|
|
1151
|
|
- psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
1152
|
|
- sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
1153
|
|
-
|
|
1154
|
|
- if(psnsignStatus.intValue()==2){
|
|
1155
|
|
- //更新立案申请状态为待用印
|
|
1156
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
1157
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
1158
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1159
|
|
-
|
|
1160
|
|
- //修改"签署用印记录表"的状态为待用印
|
|
1161
|
|
-
|
|
1162
|
|
- }
|
|
1163
|
|
- }
|
|
1164
|
|
- }
|
|
1165
|
|
- if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
1166
|
|
- JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
1167
|
|
- if(orgSignerData!=null){
|
|
1168
|
|
- orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
1169
|
|
- sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
1170
|
|
- //更新立案申请状态为待送达
|
|
1171
|
|
- CaseApplication caseApplication = new CaseApplication();
|
|
1172
|
|
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
1173
|
|
- caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
1174
|
|
-
|
|
1175
|
|
- //修改"签署用印记录表"的状态为签署完成
|
|
1176
|
|
-
|
|
1177
|
|
- //下载审核完成的裁决书,
|
|
1178
|
|
-// SaaSAPIFileUtils.fileDownloadUrl();
|
|
1179
|
|
-
|
|
1180
|
|
- }
|
|
|
1032
|
+// @Transactional
|
|
|
1033
|
+// public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
|
|
1034
|
+//
|
|
|
1035
|
+// Gson gson = new Gson();
|
|
|
1036
|
+//
|
|
|
1037
|
+// SealSignRecord sealSignRecordselect = new SealSignRecord();
|
|
|
1038
|
+// sealSignRecordselect.setSignFlowStatus(1);
|
|
|
1039
|
+//
|
|
|
1040
|
+// List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecordselect);
|
|
|
1041
|
+// if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
|
|
1042
|
+// for (int i = 0; i < sealSignRecords.size(); i++) {
|
|
|
1043
|
+// SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
|
|
1044
|
+// EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
|
|
1045
|
+// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
|
|
1046
|
+// JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
|
|
1047
|
+// JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
|
|
1048
|
+// for (int j = 0; j < signersArray.size(); j++) {
|
|
|
1049
|
+// JsonObject signerObject = (JsonObject)signersArray.get(j);
|
|
|
1050
|
+// Integer psnsignStatus ;
|
|
|
1051
|
+// Integer orgsignStatus ;
|
|
|
1052
|
+// if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
|
|
1053
|
+// JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
|
|
1054
|
+// if(psnSignerData!=null){
|
|
|
1055
|
+// psnsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1056
|
+// sealSignRecord.setPsnsignStatus(psnsignStatus);
|
|
|
1057
|
+//
|
|
|
1058
|
+// if(psnsignStatus.intValue()==2){
|
|
|
1059
|
+// //更新立案申请状态为待用印
|
|
|
1060
|
+// CaseApplication caseApplication = new CaseApplication();
|
|
|
1061
|
+// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
|
1062
|
+// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1063
|
+//
|
|
|
1064
|
+// //修改"签署用印记录表"的状态为待用印
|
|
|
1065
|
+// sealSignRecord.setSignFlowStatus(2);
|
|
|
1066
|
+// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
1067
|
+//
|
|
|
1068
|
+// }
|
|
|
1069
|
+// }
|
|
|
1070
|
+// }
|
|
|
1071
|
+// if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
|
|
1072
|
+// JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
|
|
1073
|
+// if(orgSignerData!=null){
|
|
|
1074
|
+// orgsignStatus = signerObject.get("signStatus").getAsInt();
|
|
|
1075
|
+// sealSignRecord.setOrgsignStatus(orgsignStatus);
|
|
|
1076
|
+// //更新立案申请状态为待送达
|
|
|
1077
|
+// CaseApplication caseApplication = new CaseApplication();
|
|
|
1078
|
+// caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
|
|
1079
|
+// caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
|
1080
|
+//
|
|
|
1081
|
+// //修改"签署用印记录表"的状态为签署完成
|
|
|
1082
|
+// sealSignRecord.setSignFlowStatus(3);
|
|
|
1083
|
+// sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
|
|
1084
|
+//
|
|
|
1085
|
+// //下载审核完成的裁决书,
|
|
|
1086
|
+//// SaaSAPIFileUtils.fileDownloadUrl();
|
|
|
1087
|
+//
|
|
|
1088
|
+// }
|
|
|
1089
|
+//
|
|
|
1090
|
+// }
|
|
|
1091
|
+//
|
|
|
1092
|
+// }
|
|
|
1093
|
+//
|
|
|
1094
|
+// }
|
|
|
1095
|
+//
|
|
|
1096
|
+// }
|
|
1181
|
1097
|
|
|
1182
|
|
- }
|
|
1183
|
1098
|
|
|
1184
|
|
- }
|
|
1185
|
1099
|
|
|
1186
|
|
- }
|
|
|
1100
|
+// }
|
|
1187
|
1101
|
|
|
1188
|
1102
|
|
|
1189
|
1103
|
|