Przeglądaj źródła

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb

# Conflicts:
#	ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
hejinbo 2 lat temu
rodzic
commit
867ce2d4ba

+ 10
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Wyświetl plik

7
 import com.ruoyi.common.core.page.TableDataInfo;
7
 import com.ruoyi.common.core.page.TableDataInfo;
8
 import com.ruoyi.common.enums.BusinessType;
8
 import com.ruoyi.common.enums.BusinessType;
9
 import com.ruoyi.common.exception.EsignDemoException;
9
 import com.ruoyi.common.exception.EsignDemoException;
10
+import com.ruoyi.common.utils.WxAppletNotifyUtils;
10
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
11
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
11
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
12
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
12
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
13
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
232
         String result = caseApplicationService.sendRoomNoMessage(messageVO);
233
         String result = caseApplicationService.sendRoomNoMessage(messageVO);
233
         return success(result);
234
         return success(result);
234
     }
235
     }
236
+    /**
237
+     * 获取UrlScheme
238
+     */
239
+    @Anonymous
240
+    @PostMapping("/getUrlScheme")
241
+    public AjaxResult getUrlScheme() {
242
+        String schemeUrl = WxAppletNotifyUtils.jumpAppletSchemeUrl();
243
+        return success(schemeUrl);
244
+    }
235
 
245
 
236
 }
246
 }

+ 72
- 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java Wyświetl plik

1
+package com.ruoyi.common.utils;
2
+
3
+/**
4
+ * @author wangqiong
5
+ * @description
6
+ * @date 2023-10-13 10:16
7
+ */
8
+import cn.hutool.core.util.StrUtil;
9
+import cn.hutool.http.HttpUtil;
10
+import cn.hutool.json.JSONObject;
11
+import cn.hutool.json.JSONUtil;
12
+import lombok.RequiredArgsConstructor;
13
+import org.springframework.stereotype.Component;
14
+
15
+
16
+/**
17
+ * @Author: Tenk
18
+ */
19
+@RequiredArgsConstructor
20
+@Component
21
+public class WxAppletNotifyUtils {
22
+
23
+    /**
24
+     * scheme 跳转微信小程序,需中转H5
25
+
26
+     */
27
+    public static String jumpAppletSchemeUrl(){
28
+
29
+         String  token= getAccessToken();
30
+
31
+        //接口地址
32
+        String url = "https://api.weixin.qq.com/wxa/generatescheme?access_token="+token;
33
+        JSONObject body = JSONUtil.createObj();
34
+        JSONObject jumpWxa = JSONUtil.createObj();
35
+        jumpWxa.putOpt("path","pages/login");
36
+        jumpWxa.putOpt("query","");
37
+        jumpWxa.putOpt("env_version","release");
38
+        body.putOpt("jump_wxa",jumpWxa);
39
+        //链接过期类型:0时间戳 1间隔天数
40
+        body.putOpt("expire_type",1);
41
+        body.putOpt("is_expire",true);
42
+        //指定失效天数,最多30
43
+        body.putOpt("expire_interval",30);
44
+        String post = HttpUtil.post(url,body.toJSONString(2));
45
+        JSONObject result = JSONUtil.parseObj(post);
46
+        if(result!=null){
47
+            result.getStr("openlink");
48
+        }
49
+        return null;
50
+    }
51
+
52
+
53
+    //凭证调用
54
+    public static String getAccessToken(){
55
+        String token;
56
+        //小程序APPID
57
+        String appid="wx91cb8459dca561b4";//自行获取
58
+        //小程序secret
59
+        String secret="190aaa3bda96a65d25318fbb0e133fc6";//自己去公众号后台获取
60
+        String httpUrl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
61
+
62
+        httpUrl= httpUrl+"&appid="+appid+"&secret="+secret;
63
+        //get请求
64
+        String result = HttpUtil.get(httpUrl);
65
+        //解析结果
66
+        JSONObject jsonObject = JSONUtil.parseObj(result);
67
+        //get AccessToken
68
+        token=jsonObject.get("access_token",String.class,false);
69
+        return token;
70
+    }
71
+
72
+}

+ 11
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealSignRecord.java Wyświetl plik

23
     private String orgnizeNamePsnAccount;
23
     private String orgnizeNamePsnAccount;
24
     /** 机构经办人名称 */
24
     /** 机构经办人名称 */
25
     private String orgnizeNamepsnName;
25
     private String orgnizeNamepsnName;
26
+
27
+    String fileDownloadUrl;
28
+
29
+    public String getFileDownloadUrl() {
30
+        return fileDownloadUrl;
31
+    }
32
+
33
+    public void setFileDownloadUrl(String fileDownloadUrl) {
34
+        this.fileDownloadUrl = fileDownloadUrl;
35
+    }
36
+
26
     /** 流程状态 */
37
     /** 流程状态 */
27
     private Integer signFlowStatus;
38
     private Integer signFlowStatus;
28
     /** 签名状态 */
39
     /** 签名状态 */

+ 32
- 20
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Wyświetl plik

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

+ 33
- 66
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Wyświetl plik

6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.constant.CaseApplicationConstants;
7
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
7
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
8
 import com.ruoyi.common.exception.EsignDemoException;
8
 import com.ruoyi.common.exception.EsignDemoException;
9
+import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
9
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
10
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
10
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
11
 import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
11
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
12
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
29
         Gson gson = new Gson();
30
         Gson gson = new Gson();
30
 
31
 
31
         SealSignRecord sealSignRecordselect = new SealSignRecord();
32
         SealSignRecord sealSignRecordselect = new SealSignRecord();
32
-        sealSignRecordselect.setSignFlowStatus(1);
33
-
33
+//        sealSignRecordselect.setSignFlowStatus(1);
34
         List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
34
         List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
35
         if(sealSignRecords!=null&&sealSignRecords.size()>0){
35
         if(sealSignRecords!=null&&sealSignRecords.size()>0){
36
             for (int i = 0; i < sealSignRecords.size(); i++) {
36
             for (int i = 0; i < sealSignRecords.size(); i++) {
39
                 JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
39
                 JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
40
                 JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
40
                 JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
41
                 JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
41
                 JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
42
-
43
-                System.out.println("signFlowDetailJsonObject-----------"+signFlowDetailJsonObject.toString());
44
-
45
                 Integer psnsignStatus = null;
42
                 Integer psnsignStatus = null;
46
                 Integer orgsignStatus = null;
43
                 Integer orgsignStatus = null;
47
                 for (int j = 0; j < signersArray.size(); j++) {
44
                 for (int j = 0; j < signersArray.size(); j++) {
61
                     }
58
                     }
62
 
59
 
63
                 }
60
                 }
64
-
65
-                System.out.println("psnsignStatus-----------"+psnsignStatus);
66
-                System.out.println("orgsignStatus-----------"+orgsignStatus);
67
-
68
                 if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
61
                 if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
69
                     //更新立案申请状态为待用印
62
                     //更新立案申请状态为待用印
70
                     CaseApplication caseApplication = new CaseApplication();
63
                     CaseApplication caseApplication = new CaseApplication();
71
                     caseApplication.setId(sealSignRecord.getCaseAppliId());
64
                     caseApplication.setId(sealSignRecord.getCaseAppliId());
72
-                    caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
73
-                    caseApplicationMapper.submitCaseApplication(caseApplication);
74
 
65
 
75
-                    //修改"签署用印记录表"的状态为待用印
76
-                    sealSignRecord.setSignFlowStatus(2);
77
-                    sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
66
+                    CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
67
+                    if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){
68
+                        caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
69
+                        caseApplicationMapper.submitCaseApplication(caseApplication);
70
+
71
+                        //修改"签署用印记录表"的状态为待用印
72
+                        sealSignRecord.setSignFlowStatus(2);
73
+                        sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
74
+                    }
75
+
76
+
78
                 }
77
                 }
79
                 if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
78
                 if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
80
                     //更新立案申请状态为待送达
79
                     //更新立案申请状态为待送达
81
                     CaseApplication caseApplication = new CaseApplication();
80
                     CaseApplication caseApplication = new CaseApplication();
82
                     caseApplication.setId(sealSignRecord.getCaseAppliId());
81
                     caseApplication.setId(sealSignRecord.getCaseAppliId());
83
-                    caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
84
-                    caseApplicationMapper.submitCaseApplication(caseApplication);
85
-
86
-                    //修改"签署用印记录表"的状态为签署完成
87
-                    sealSignRecord.setSignFlowStatus(3);
88
-                    sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
89
 
82
 
90
-                    //下载审核完成的裁决书,
91
-//                  SaaSAPIFileUtils.fileDownloadUrl();
83
+                    CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
84
+                    if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
85
+                        caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
86
+                        caseApplicationMapper.submitCaseApplication(caseApplication);
87
+
88
+                        //下载审核完成的裁决书,
89
+                        String signFlowId = sealSignRecord.getSignFlowid();
90
+                        EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
91
+                        JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
92
+                        JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
93
+                        JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
94
+                        if(filesArray!=null&&filesArray.size()>0){
95
+                            JsonObject fileObject = (JsonObject)filesArray.get(0);
96
+                            String fileDownloadUrl = fileObject.get("downloadUrl").toString();
97
+                            //修改"签署用印记录表"的状态为签署完成
98
+                            sealSignRecord.setSignFlowStatus(3);
99
+                            sealSignRecord.setFileDownloadUrl(fileDownloadUrl);
100
+                            sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
92
 
101
 
93
-
94
-                    
102
+                        }
103
+                    }
95
                 }
104
                 }
96
             }
105
             }
97
 
106
 
98
         }
107
         }
99
 
108
 
100
-//        Gson gson = new Gson();
101
-//
102
-//        SealSignRecord sealSignRecord = new SealSignRecord();
103
-//        sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
104
-//        EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
105
-//        JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
106
-//        JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
107
-//        JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
108
-//        for (int i = 0; i < signersArray.size(); i++) {
109
-//            JsonObject signerObject = (JsonObject)signersArray.get(i);
110
-//            Integer psnsignStatus ;
111
-//            Integer orgsignStatus ;
112
-//            if(!(signerObject.get("psnSigner").toString()).equals("null")){
113
-//                JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
114
-//                if(psnSignerData!=null){
115
-//                    psnsignStatus = signerObject.get("signStatus").getAsInt();
116
-//                    sealSignRecord.setPsnsignStatus(psnsignStatus);
117
-//
118
-//                    if(psnsignStatus.intValue()==2){
119
-//                        //更新立案申请状态为待用印
120
-//                        CaseApplication caseApplication = new CaseApplication();
121
-//                        caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
122
-//                        caseApplicationMapper.submitCaseApplication(caseApplication);
123
-//
124
-//
125
-//
126
-//                    }
127
-//
128
-//
129
-//
130
-//                }
131
-//            }
132
-//            if(!(signerObject.get("orgSigner").toString()).equals("null")){
133
-//                JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
134
-//                if(orgSignerData!=null){
135
-//                    orgsignStatus = signerObject.get("signStatus").getAsInt();
136
-//                    sealSignRecord.setOrgsignStatus(orgsignStatus);
137
-//                }
138
-//
139
-//            }
140
-//
141
-//        }
142
 
109
 
143
 
110
 
144
     }
111
     }

+ 0
- 61
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java Wyświetl plik

27
 
27
 
28
         SealSignRecord sealSignRecord = new SealSignRecord();
28
         SealSignRecord sealSignRecord = new SealSignRecord();
29
 
29
 
30
-        sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
31
-        sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
32
-        sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
33
-
34
-
35
-        sealSignRecord.setPensonAccount("18209231185");
36
-        sealSignRecord.setPensonName("秦桃则");
37
-        sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
38
-        sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
39
-        sealSignRecord.setOrgnizeNamepsnName("韩超勃");
40
-        sealSignRecord.setPositionPagepsn("2");
41
-
42
-        sealSignRecord.setPositionXpsn(279+20);
43
-        sealSignRecord.setPositionYpsn(216.336-20);
44
-
45
-        sealSignRecord.setPositionPageorg("2");
46
-
47
-        sealSignRecord.setPositionXorg(342+30);
48
-        sealSignRecord.setPositionYorg(185.136);
49
-
50
-
51
-
52
 
30
 
53
         /* 发起签署*/
31
         /* 发起签署*/
54
 //        EsignHttpResponse createByFile = createByFile(sealSignRecord);
32
 //        EsignHttpResponse createByFile = createByFile(sealSignRecord);
159
         double positionXorg = sealSignRecord.getPositionXorg();
137
         double positionXorg = sealSignRecord.getPositionXorg();
160
         double positionYorg = sealSignRecord.getPositionYorg();
138
         double positionYorg = sealSignRecord.getPositionYorg();
161
 
139
 
162
-
163
         String jsonParm = "{\n" +
140
         String jsonParm = "{\n" +
164
                 "    \"docs\": [\n" +
141
                 "    \"docs\": [\n" +
165
                 "        {\n" +
142
                 "        {\n" +
166
-
167
-//                "            \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
168
                 "            \"fileId\": \"" + fileId +  "\",\n" +
143
                 "            \"fileId\": \"" + fileId +  "\",\n" +
169
-
170
-//                "            \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
171
                 "            \"fileName\": \"" + fileName +  "\"\n" +
144
                 "            \"fileName\": \"" + fileName +  "\"\n" +
172
 
145
 
173
                 "        }\n" +
146
                 "        }\n" +
194
                 "          {\n" +
167
                 "          {\n" +
195
 
168
 
196
                 "            \"psnSignerInfo\": {\n" +
169
                 "            \"psnSignerInfo\": {\n" +
197
-
198
-//                "                \"psnAccount\": \"18209231185\",\n" +
199
                 "                \"psnAccount\": \"" + psnAccount +  "\",\n" +
170
                 "                \"psnAccount\": \"" + psnAccount +  "\",\n" +
200
 
171
 
201
                 "                \"psnInfo\": {\n" +
172
                 "                \"psnInfo\": {\n" +
202
-
203
-//                "                            \"psnName\": \"秦桃则\"\n" +
204
                 "                            \"psnName\": \"" + psnName +  "\"\n" +
173
                 "                            \"psnName\": \"" + psnName +  "\"\n" +
205
                 "                        }\n" +
174
                 "                        }\n" +
206
 
175
 
207
-
208
                 "            },\n" +
176
                 "            },\n" +
209
-
210
-
211
                 "            \"signFields\": [\n" +
177
                 "            \"signFields\": [\n" +
212
                 "                {\n" +
178
                 "                {\n" +
213
 
179
 
214
-//                "                    \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
215
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
180
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
216
 
181
 
217
                 "                    \"normalSignFieldConfig\": {\n" +
182
                 "                    \"normalSignFieldConfig\": {\n" +
219
                 "                        \"freeMode\": false,\n" +
184
                 "                        \"freeMode\": false,\n" +
220
                 "                        \"movableSignField\": false,\n" +
185
                 "                        \"movableSignField\": false,\n" +
221
                 "                        \"signFieldPosition\": {\n" +
186
                 "                        \"signFieldPosition\": {\n" +
222
-
223
-//                "                            \"positionPage\": \"2\",\n" +
224
                 "                            \"positionPage\": \"" + positionPagepsn +  "\",\n" +
187
                 "                            \"positionPage\": \"" + positionPagepsn +  "\",\n" +
225
-
226
-//                "                            \"positionX\": 310.0,\n" +
227
                 "                            \"positionX\": " + positionXpsn +  ",\n" +
188
                 "                            \"positionX\": " + positionXpsn +  ",\n" +
228
-
229
-//                "                            \"positionY\": 247.536\n" +
230
                 "                            \"positionY\": " + positionYpsn +  "\n" +
189
                 "                            \"positionY\": " + positionYpsn +  "\n" +
231
-
232
                 "                        },\n" +
190
                 "                        },\n" +
233
                 "                        \"signFieldStyle\": 1\n" +
191
                 "                        \"signFieldStyle\": 1\n" +
234
                 "                    },\n" +
192
                 "                    },\n" +
241
 
199
 
242
                 "        {\n" +
200
                 "        {\n" +
243
                 "            \"orgSignerInfo\": {\n" +
201
                 "            \"orgSignerInfo\": {\n" +
244
-
245
-//                "                \"orgName\": \"西安云美电子科技有限公司\",\n" +
246
                 "                \"orgName\": \"" + orgName +  "\",\n" +
202
                 "                \"orgName\": \"" + orgName +  "\",\n" +
247
-
248
                 "                \"transactorInfo\": {\n" +
203
                 "                \"transactorInfo\": {\n" +
249
-
250
-
251
-//                "                \"psnAccount\": \"17691338406\",\n" +
252
                 "                \"psnAccount\": \"" + orgNamePsnAccount +  "\",\n" +
204
                 "                \"psnAccount\": \"" + orgNamePsnAccount +  "\",\n" +
253
 
205
 
254
                 "                \"psnInfo\": {\n" +
206
                 "                \"psnInfo\": {\n" +
255
 
207
 
256
-//                "                            \"psnName\": \"韩超勃\"\n" +
257
                 "                            \"psnName\": \"" + orgNamepsnName +  "\"\n" +
208
                 "                            \"psnName\": \"" + orgNamepsnName +  "\"\n" +
258
                 "                        }\n" +
209
                 "                        }\n" +
259
 
210
 
262
 
213
 
263
                 "            \"signFields\": [\n" +
214
                 "            \"signFields\": [\n" +
264
                 "                {\n" +
215
                 "                {\n" +
265
-
266
-//                "                    \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
267
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
216
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
268
 
217
 
269
                 "                    \"normalSignFieldConfig\": {\n" +
218
                 "                    \"normalSignFieldConfig\": {\n" +
272
 
221
 
273
                 "                        \"signFieldPosition\": {\n" +
222
                 "                        \"signFieldPosition\": {\n" +
274
 
223
 
275
-//                "                            \"positionPage\": \"2\",\n" +
276
                 "                            \"positionPage\": \"" + positionPageorg +  "\",\n" +
224
                 "                            \"positionPage\": \"" + positionPageorg +  "\",\n" +
277
-
278
-//                "                            \"positionX\": 340.0,\n" +
279
                 "                            \"positionX\": " + positionXorg +  ",\n" +
225
                 "                            \"positionX\": " + positionXorg +  ",\n" +
280
-
281
-//                "                            \"positionY\": 340.736\n" +
282
                 "                            \"positionY\": " + positionYorg +  "\n" +
226
                 "                            \"positionY\": " + positionYorg +  "\n" +
283
                 "                        },\n" +
227
                 "                        },\n" +
284
                 "                        \"signFieldStyle\": 1\n" +
228
                 "                        \"signFieldStyle\": 1\n" +
313
         String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
257
         String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
314
         String jsonParm = "{\n" +
258
         String jsonParm = "{\n" +
315
                 "    \"operator\": {\n" +
259
                 "    \"operator\": {\n" +
316
-//                "        \"psnAccount\":\"18209231185\"\n" +
317
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
260
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
318
                 "    }\n" +
261
                 "    }\n" +
319
                 "}";
262
                 "}";
338
         String orgName = sealSignRecord.getOrgnizeName();
281
         String orgName = sealSignRecord.getOrgnizeName();
339
 
282
 
340
         String jsonParm = "{\n" +
283
         String jsonParm = "{\n" +
341
-//                "    \"needLogin\": true,\n" +
342
                 "    \"operator\": {\n" +
284
                 "    \"operator\": {\n" +
343
 
285
 
344
-//                "        \"psnAccount\":\"17691338406\"\n" +
345
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
286
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
346
                 "    },\n" +
287
                 "    },\n" +
347
                 "    \"organization\": {\n" +
288
                 "    \"organization\": {\n" +
348
-
349
-//                "        \"orgName\": \"西安云美电子科技有限公司\"\n" +
350
                 "        \"orgName\": \"" + orgName +  "\"\n" +
289
                 "        \"orgName\": \"" + orgName +  "\"\n" +
351
 
290
 
352
                 "    }\n" +
291
                 "    }\n" +

+ 2
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml Wyświetl plik

50
     <update id="updataSealSignRecord" parameterType="SealSignRecord">
50
     <update id="updataSealSignRecord" parameterType="SealSignRecord">
51
         update seal_sign_record
51
         update seal_sign_record
52
         <set>
52
         <set>
53
-            <if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus}</if>
53
+            <if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
54
+            <if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
54
         </set>
55
         </set>
55
         where id = #{id}
56
         where id = #{id}
56
     </update>
57
     </update>