소스 검색

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

gy b 2 년 전
부모
커밋
36ad2c9ecd

+ 2
- 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java 파일 보기

@@ -3,6 +3,7 @@ package com.ruoyi;
3 3
 import org.springframework.boot.SpringApplication;
4 4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5 5
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6
+import org.springframework.scheduling.annotation.EnableScheduling;
6 7
 
7 8
 /**
8 9
  * 启动程序
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
10 11
  * @author ruoyi
11 12
  */
12 13
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
14
+@EnableScheduling
13 15
 public class RuoYiApplication
14 16
 {
15 17
     public static void main(String[] args)

+ 32
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java 파일 보기

@@ -6,7 +6,10 @@ import com.ruoyi.common.core.controller.BaseController;
6 6
 import com.ruoyi.common.core.domain.AjaxResult;
7 7
 import com.ruoyi.common.core.page.TableDataInfo;
8 8
 import com.ruoyi.common.enums.BusinessType;
9
+import com.ruoyi.common.exception.EsignDemoException;
10
+import com.ruoyi.common.utils.WxAppletNotifyUtils;
9 11
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
12
+import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
10 13
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
11 14
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
12 15
 import org.springframework.beans.factory.annotation.Autowired;
@@ -95,6 +98,26 @@ public class CaseApplicationController extends BaseController {
95 98
         return success(caseApplicationselect);
96 99
     }
97 100
 
101
+    /**
102
+     * 查询签名链接
103
+     */
104
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
105
+    @PostMapping("/selectSignUrl")
106
+    public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
107
+        SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
108
+        return success(sealSignRecordselect);
109
+    }
110
+
111
+    /**
112
+     * 查询用印链接
113
+     */
114
+    @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
115
+    @PostMapping("/selectSealUrl")
116
+    public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
117
+        SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
118
+        return success(sealUrlRecordselect);
119
+    }
120
+
98 121
     /**
99 122
      * 立案申请导入模板下载
100 123
      */
@@ -210,5 +233,14 @@ public class CaseApplicationController extends BaseController {
210 233
         String result = caseApplicationService.sendRoomNoMessage(messageVO);
211 234
         return success(result);
212 235
     }
236
+    /**
237
+     * 获取UrlScheme
238
+     */
239
+    @Anonymous
240
+    @GetMapping("/getUrlScheme")
241
+    public AjaxResult getUrlScheme() {
242
+        String schemeUrl = WxAppletNotifyUtils.jumpAppletSchemeUrl();
243
+        return success(schemeUrl);
244
+    }
213 245
 
214 246
 }

+ 72
- 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/WxAppletNotifyUtils.java 파일 보기

@@ -0,0 +1,72 @@
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 && result.containsKey("openlink")){
47
+         return    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
+}

ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/SealSignRecord.java → ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealSignRecord.java 파일 보기

@@ -1,4 +1,4 @@
1
-package com.ruoyi.common.utils.bean;
1
+package com.ruoyi.wisdomarbitrate.domain;
2 2
 
3 3
 import com.ruoyi.common.core.domain.BaseEntity;
4 4
 
@@ -23,6 +23,17 @@ public class SealSignRecord extends BaseEntity {
23 23
     private String orgnizeNamePsnAccount;
24 24
     /** 机构经办人名称 */
25 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 38
     private Integer signFlowStatus;
28 39
     /** 签名状态 */
@@ -30,6 +41,38 @@ public class SealSignRecord extends BaseEntity {
30 41
     /** 用印状态 */
31 42
     private Integer orgsignStatus;
32 43
 
44
+    /** 签名链接 */
45
+    private String signUrl;
46
+
47
+    public String getSignUrl() {
48
+        return signUrl;
49
+    }
50
+
51
+    public void setSignUrl(String signUrl) {
52
+        this.signUrl = signUrl;
53
+    }
54
+
55
+    public String getSealUrl() {
56
+        return sealUrl;
57
+    }
58
+
59
+    public void setSealUrl(String sealUrl) {
60
+        this.sealUrl = sealUrl;
61
+    }
62
+
63
+    /** 用印链接 */
64
+    private String sealUrl;
65
+
66
+    private Long caseAppliId;
67
+
68
+    public Long getCaseAppliId() {
69
+        return caseAppliId;
70
+    }
71
+
72
+    public void setCaseAppliId(Long caseAppliId) {
73
+        this.caseAppliId = caseAppliId;
74
+    }
75
+
33 76
     public Integer getPsnsignStatus() {
34 77
         return psnsignStatus;
35 78
     }
@@ -178,16 +221,7 @@ public class SealSignRecord extends BaseEntity {
178 221
     private double positionXorg;
179 222
     /** 印章位置y坐标 */
180 223
     private double positionYorg;
181
-    /** 案件申请id */
182
-    private Long caseAppliId;
183
-
184
-    public Long getCaseAppliId() {
185
-        return caseAppliId;
186
-    }
187 224
 
188
-    public void setCaseAppliId(Long caseAppliId) {
189
-        this.caseAppliId = caseAppliId;
190
-    }
191 225
 
192 226
     public Long getId() {
193 227
         return id;

+ 13
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java 파일 보기

@@ -1,10 +1,18 @@
1 1
 package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3
-import com.ruoyi.common.utils.bean.SealSignRecord;
4
-import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
5
-import org.apache.ibatis.annotations.Mapper;
6 3
 
7
-@Mapper
4
+
5
+import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
6
+
7
+import java.util.List;
8
+
8 9
 public interface SealSignRecordMapper {
9
-    int insertSealSignRecord(SealSignRecord SealSignRecord);
10
+    List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
11
+
12
+    List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
13
+
14
+    int updataSealSignRecord(SealSignRecord sealSignRecord);
15
+
16
+
17
+    void insertSealSignRecord(SealSignRecord sealSignRecord);
10 18
 }

+ 6
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java 파일 보기

@@ -1,6 +1,8 @@
1 1
 package com.ruoyi.wisdomarbitrate.service;
2 2
 
3
+import com.ruoyi.common.exception.EsignDemoException;
3 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
4 6
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
5 7
 
6 8
 import java.util.List;
@@ -40,4 +42,8 @@ public interface ICaseApplicationService {
40 42
     CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
41 43
 
42 44
     String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
45
+
46
+    SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
47
+
48
+    SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
43 49
 }

+ 17
- 14
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java 파일 보기

@@ -188,9 +188,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
188 188
                     if (caseAttach.getAnnexType() == 3) {
189 189
                         String annexPath = caseAttach.getAnnexPath();
190 190
                         //File file = new File("/home/ruoyi/" + annexPath);
191
-                        String path = "/home/ruoyi/" + annexPath;
192
-                        File file = new File(path);
193
-                        System.out.println("文件是:" + file);
191
+                        String path = "/home/ruoyi" + annexPath;
192
+                        System.out.println("原文件路径是:" + path);
193
+                        String newpath = path.replace("/", "\\");
194
+                        System.out.println("新文件路径是:" + newpath);
195
+                        File file = new File(newpath);
196
+                        System.out.println("新文件是:" + file);
194 197
                         fileList.add(file);
195 198
                     }
196 199
                 }
@@ -424,21 +427,21 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
424 427
         return AjaxResult.success(archivesDetailVO);
425 428
     }
426 429
 
427
-    /*public static void main(String[] args) {
430
+    public static void main(String[] args) {
428 431
         try {
429
-            List<File> fileList = new ArrayList<>();
430
-            fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
431
-            File file = fileList.get(0);
432
+//            List<File> fileList = new ArrayList<>();
433
+//            fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
434
+ //           File file = fileList.get(0);//System.out.println("这是文件"+file);
432 435
             //电子邮件送达
433
-            EmailOutUtil emailOutUtil = new EmailOutUtil();
434
-            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
435
-            if (javaMailSender != null) {
436
-                emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
437
-                        , "hjbjava@163.com", javaMailSender);
438
-            }
436
+//            EmailOutUtil emailOutUtil = new EmailOutUtil();
437
+//            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
438
+//            if (javaMailSender != null) {
439
+//                emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
440
+//                        , "hjbjava@163.com", javaMailSender);
441
+//            }
439 442
         } catch (MailSendException e) {
440 443
             e.printStackTrace();
441 444
         }
442
-    }*/
445
+    }
443 446
 
444 447
 }

+ 114
- 115
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java 파일 보기

@@ -716,121 +716,120 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
716 716
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
717 717
         Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
718 718
         if(agreeOrNotCheck.intValue()==1){//同意审核
719
-            //TODO 取消一下注释
720
-//            try {
721
-//                //获取当前案件的裁决书
722
-//                CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
723
-//                List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList();
724
-//                if (caseAttachList != null && caseAttachList.size() > 0) {
725
-//                    for (CaseAttach caseAttach : caseAttachList) {
726
-//                        if (caseAttach.getAnnexType() == 3) {
727
-//                            String annexPath = caseAttach.getAnnexPath();
728
-//                            String path = "/home/ruoyi/" + annexPath;
729
-////                            String path ="D:\\home\\仲裁裁决书模板.docx";
730
-//                            //获取文件上传地址
731
-//                            EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
732
-//                            String body = response.getBody();
733
-//                            if (body != null){
734
-//                                JSONObject jsonObject = JSONObject.parseObject(body);
735
-//                                String fileId = jsonObject.getJSONObject("data").getString("fileId");
736
-//                                String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl");
737
-//                                //上传文件流
738
-//                                EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path);
739
-//                                JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
740
-//                                if (jsonObject1.getIntValue("errCode")==0){
741
-//                                    //查看文件上传状态
742
-//                                    Thread.sleep(5000);
743
-//                                    EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
744
-//                                    JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
745
-//                                    JSONObject data = jsonObject2.getJSONObject("data");
746
-//                                    int fileStatus =data.getIntValue("fileStatus");
747
-//                                    if (fileStatus == 2 || fileStatus == 5){
748
-//                                        String fileName = data.getString("fileName");
749
-//                                        //上传成功,获取文件签名印章位置
750
-//                                        SealSignRecord sealSignRecord = new SealSignRecord();
751
-//                                        sealSignRecord.setFileid(fileId);
752
-//                                        EsignHttpResponse positions = SignAward.getPositions(sealSignRecord);
753
-//                                        Gson gson = new Gson();
754
-//                                        JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
755
-//                                        JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
756
-//                                        String keywordPositions = positionsData.get("keywordPositions").getAsString();
757
-//                                        //发起签署
758
-//                                        sealSignRecord.setFilename(fileName);
759
-//                                        String arbitratorId = caseApplication2.getArbitratorId();
760
-//                                        if (arbitratorId!=null){
761
-//                                            SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
762
-//                                            if (sysUser == null){
763
-//                                                return rows;
764
-//                                            }
765
-//                                            sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
766
-//                                            sealSignRecord.setPensonName(sysUser.getNickName());
767
-//                                        }
768
-//                                        sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
769
-//                                        sealSignRecord.setOrgnizeNamePsnAccount("秦桃则");
770
-//                                        sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
771
-//                                        sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
772
-//                                        sealSignRecord.setOrgnizeNamepsnName("韩超勃");
773
-//                                        //解析文件签名印章位置
774
-//                                        JSONArray jsonArray = JSONArray.parseArray(keywordPositions);
775
-//                                        for (int i = 0; i < jsonArray.size(); i++) {
776
-//                                            JSONObject jsonObject3 = jsonArray.getJSONObject(i);
777
-//                                            String keyword = jsonObject3.getString("keyword");
778
-//                                            if (keyword.equals("仲裁员")){
779
-//                                                //签名
780
-//                                                JSONArray positionsArray = jsonObject3.getJSONArray("positions");
781
-//                                                // 遍历 positionsArray 中的每个元素
782
-//                                                for (int j = 0; j < positionsArray.size(); j++){
783
-//                                                    JSONObject positionObj = positionsArray.getJSONObject(j);
784
-//                                                    int pageNum = positionObj.getIntValue("pageNum");
785
-//                                                    sealSignRecord.setPositionPagepsn(String.valueOf(pageNum));
786
-//                                                    JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
787
-//                                                    JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
788
-//                                                    double positionX = coordinateObj.getDoubleValue("positionX");
789
-//                                                    double positionY = coordinateObj.getDoubleValue("positionY");
790
-//                                                    sealSignRecord.setPositionXpsn(positionX);
791
-//                                                    sealSignRecord.setPositionYpsn(positionY);
792
-//                                                }
793
-//                                            }else {
794
-//                                                //用印
795
-//                                                JSONArray positionsArray = jsonObject3.getJSONArray("positions");
796
-//                                                // 遍历 positionsArray 中的每个元素
797
-//                                                for (int j = 0; j < positionsArray.size(); j++) {
798
-//                                                    JSONObject positionObj = positionsArray.getJSONObject(j);
799
-//                                                    int pageNum = positionObj.getIntValue("pageNum");
800
-//                                                    sealSignRecord.setPositionPageorg(String.valueOf(pageNum));
801
-//                                                    JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
802
-//                                                    JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
803
-//                                                    double positionX = coordinateObj.getDoubleValue("positionX");
804
-//                                                    double positionY = coordinateObj.getDoubleValue("positionY");
805
-//                                                    sealSignRecord.setPositionXorg(positionX);
806
-//                                                    sealSignRecord.setPositionYorg(positionY);
807
-//                                                }
808
-//                                            }
809
-//                                        }
810
-//                                        EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
811
-//                                        JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
812
-//                                        if (jsonObject1.getIntValue("code")==0){
813
-//                                            //获取签署流程ID
814
-//                                            JSONObject data1 = jsonObject3.getJSONObject("data");
815
-//                                            String signFlowId = data1.getString("signFlowId");
816
-//                                            //保存案件id,文件id,文件名称.流程id到签署用印记录表里
817
-//                                            sealSignRecord.setCaseAppliId(caseApplication.getId());
818
-//                                            sealSignRecord.setSignFlowid(signFlowId);
819
-//                                            sealSignRecord.setSignFlowStatus(1);//待签名
820
-//                                            sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
821
-//                                        }
822
-//                                    }
823
-//                                }
824
-//                            }
825
-//                            break;
826
-//                        }
827
-//                    }
828
-//                }
829
-//            } catch (EsignDemoException e) {
830
-//                e.printStackTrace();
831
-//            } catch (InterruptedException e) {
832
-//                e.printStackTrace();
833
-//            }
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
+            }
834 833
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
835 834
             // 新增日志
836 835
             CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");

+ 76
- 33
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java 파일 보기

@@ -6,65 +6,108 @@ import com.google.gson.JsonObject;
6 6
 import com.ruoyi.common.constant.CaseApplicationConstants;
7 7
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
8 8
 import com.ruoyi.common.exception.EsignDemoException;
9
-import com.ruoyi.common.utils.SignAward;
10
-import com.ruoyi.common.utils.bean.SealSignRecord;
9
+import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
11 10
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
11
+import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
12 12
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
13
+import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
13 14
 import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.scheduling.annotation.Scheduled;
16
+import org.springframework.stereotype.Component;
14 17
 
18
+import java.util.List;
19
+
20
+@Component
15 21
 public class FixSelectFlowDetailUtils {
16 22
 
17 23
     @Autowired
18 24
     private CaseApplicationMapper caseApplicationMapper;
25
+    @Autowired
26
+    private SealSignRecordMapper sealSignRecordMapper;
19 27
 
20
-
28
+    @Scheduled(cron = "0/3 * * * * ?")
21 29
     public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
22
-
23 30
         Gson gson = new Gson();
24 31
 
32
+        SealSignRecord sealSignRecordselect = new SealSignRecord();
33
+//        sealSignRecordselect.setSignFlowStatus(1);
34
+        List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
35
+        if(sealSignRecords!=null&&sealSignRecords.size()>0){
36
+            for (int i = 0; i < sealSignRecords.size(); i++) {
37
+                SealSignRecord sealSignRecord = sealSignRecords.get(i);
38
+                EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
39
+                JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
40
+                JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
41
+                JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
42
+                Integer psnsignStatus = null;
43
+                Integer orgsignStatus = null;
44
+                for (int j = 0; j < signersArray.size(); j++) {
45
+                    JsonObject signerObject = (JsonObject)signersArray.get(j);
46
+
47
+                    if(!(signerObject.get("psnSigner").toString()).equals("null")){
48
+                        JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
49
+                        if(psnSignerData!=null){
50
+                            psnsignStatus = signerObject.get("signStatus").getAsInt();
51
+                        }
52
+                    }
53
+                    if(!(signerObject.get("orgSigner").toString()).equals("null")){
54
+                        JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
55
+                        if(orgSignerData!=null){
56
+                            orgsignStatus = signerObject.get("signStatus").getAsInt();
57
+                        }
58
+                    }
25 59
 
60
+                }
61
+                if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
62
+                    //更新立案申请状态为待用印
63
+                    CaseApplication caseApplication = new CaseApplication();
64
+                    caseApplication.setId(sealSignRecord.getCaseAppliId());
26 65
 
27
-        SealSignRecord sealSignRecord = new SealSignRecord();
28
-        sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
29
-        EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
30
-        JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
31
-        JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
32
-        JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
33
-        for (int i = 0; i < signersArray.size(); i++) {
34
-            JsonObject signerObject = (JsonObject)signersArray.get(i);
35
-            Integer psnsignStatus ;
36
-            Integer orgsignStatus ;
37
-            if(!(signerObject.get("psnSigner").toString()).equals("null")){
38
-                JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
39
-                if(psnSignerData!=null){
40
-                    psnsignStatus = signerObject.get("signStatus").getAsInt();
41
-                    sealSignRecord.setPsnsignStatus(psnsignStatus);
42
-
43
-                    if(psnsignStatus.intValue()==2){
44
-                        //更新立案申请状态为待用印
45
-                        CaseApplication caseApplication = new CaseApplication();
66
+                    CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
67
+                    if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){
46 68
                         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
47 69
                         caseApplicationMapper.submitCaseApplication(caseApplication);
48 70
 
49
-
50
-
71
+                        //修改"签署用印记录表"的状态为待用印
72
+                        sealSignRecord.setSignFlowStatus(2);
73
+                        sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
51 74
                     }
52 75
 
53 76
 
54
-
55
-                }
56
-            }
57
-            if(!(signerObject.get("orgSigner").toString()).equals("null")){
58
-                JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
59
-                if(orgSignerData!=null){
60
-                    orgsignStatus = signerObject.get("signStatus").getAsInt();
61
-                    sealSignRecord.setOrgsignStatus(orgsignStatus);
62 77
                 }
78
+                if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
79
+                    //更新立案申请状态为待送达
80
+                    CaseApplication caseApplication = new CaseApplication();
81
+                    caseApplication.setId(sealSignRecord.getCaseAppliId());
82
+
83
+                    CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
84
+                    if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
85
+                        caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
86
+                        caseApplicationMapper.submitCaseApplication(caseApplication);
63 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);
101
+
102
+                        }
103
+                    }
104
+                }
64 105
             }
65 106
 
66 107
         }
67 108
 
109
+
110
+
68 111
     }
69 112
 
70 113
 

ruoyi-common/src/main/java/com/ruoyi/common/utils/SignAward.java → ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java 파일 보기

@@ -1,4 +1,4 @@
1
-package com.ruoyi.common.utils;
1
+package com.ruoyi.wisdomarbitrate.utils;
2 2
 
3 3
 import com.google.gson.Gson;
4 4
 import com.google.gson.JsonArray;
@@ -6,9 +6,10 @@ import com.google.gson.JsonObject;
6 6
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
7 7
 import com.ruoyi.common.enums.EsignRequestType;
8 8
 import com.ruoyi.common.exception.EsignDemoException;
9
-import com.ruoyi.common.utils.bean.SealSignRecord;
9
+import com.ruoyi.common.utils.EsignApplicaConfig;
10
+import com.ruoyi.common.utils.EsignHttpHelper;
11
+import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
10 12
 
11
-import java.util.HashMap;
12 13
 import java.util.Map;
13 14
 
14 15
 public class SignAward {
@@ -26,28 +27,6 @@ public class SignAward {
26 27
 
27 28
         SealSignRecord sealSignRecord = new SealSignRecord();
28 29
 
29
-        sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
30
-        sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
31
-        sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
32
-
33
-
34
-        sealSignRecord.setPensonAccount("18209231185");
35
-        sealSignRecord.setPensonName("秦桃则");
36
-        sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
37
-        sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
38
-        sealSignRecord.setOrgnizeNamepsnName("韩超勃");
39
-        sealSignRecord.setPositionPagepsn("2");
40
-
41
-        sealSignRecord.setPositionXpsn(279+20);
42
-        sealSignRecord.setPositionYpsn(216.336-20);
43
-
44
-        sealSignRecord.setPositionPageorg("2");
45
-
46
-        sealSignRecord.setPositionXorg(342+30);
47
-        sealSignRecord.setPositionYorg(185.136);
48
-
49
-
50
-
51 30
 
52 31
         /* 发起签署*/
53 32
 //        EsignHttpResponse createByFile = createByFile(sealSignRecord);
@@ -106,8 +85,8 @@ public class SignAward {
106 85
                 }
107 86
 
108 87
             }
109
-
110 88
         }
89
+
111 90
         System.out.println(signFlowDetailJsonObject);
112 91
 
113 92
 
@@ -158,15 +137,10 @@ public class SignAward {
158 137
         double positionXorg = sealSignRecord.getPositionXorg();
159 138
         double positionYorg = sealSignRecord.getPositionYorg();
160 139
 
161
-
162 140
         String jsonParm = "{\n" +
163 141
                 "    \"docs\": [\n" +
164 142
                 "        {\n" +
165
-
166
-//                "            \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
167 143
                 "            \"fileId\": \"" + fileId +  "\",\n" +
168
-
169
-//                "            \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
170 144
                 "            \"fileName\": \"" + fileName +  "\"\n" +
171 145
 
172 146
                 "        }\n" +
@@ -193,24 +167,16 @@ public class SignAward {
193 167
                 "          {\n" +
194 168
 
195 169
                 "            \"psnSignerInfo\": {\n" +
196
-
197
-//                "                \"psnAccount\": \"18209231185\",\n" +
198 170
                 "                \"psnAccount\": \"" + psnAccount +  "\",\n" +
199 171
 
200 172
                 "                \"psnInfo\": {\n" +
201
-
202
-//                "                            \"psnName\": \"秦桃则\"\n" +
203 173
                 "                            \"psnName\": \"" + psnName +  "\"\n" +
204 174
                 "                        }\n" +
205 175
 
206
-
207 176
                 "            },\n" +
208
-
209
-
210 177
                 "            \"signFields\": [\n" +
211 178
                 "                {\n" +
212 179
 
213
-//                "                    \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
214 180
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
215 181
 
216 182
                 "                    \"normalSignFieldConfig\": {\n" +
@@ -218,16 +184,9 @@ public class SignAward {
218 184
                 "                        \"freeMode\": false,\n" +
219 185
                 "                        \"movableSignField\": false,\n" +
220 186
                 "                        \"signFieldPosition\": {\n" +
221
-
222
-//                "                            \"positionPage\": \"2\",\n" +
223 187
                 "                            \"positionPage\": \"" + positionPagepsn +  "\",\n" +
224
-
225
-//                "                            \"positionX\": 310.0,\n" +
226 188
                 "                            \"positionX\": " + positionXpsn +  ",\n" +
227
-
228
-//                "                            \"positionY\": 247.536\n" +
229 189
                 "                            \"positionY\": " + positionYpsn +  "\n" +
230
-
231 190
                 "                        },\n" +
232 191
                 "                        \"signFieldStyle\": 1\n" +
233 192
                 "                    },\n" +
@@ -240,19 +199,12 @@ public class SignAward {
240 199
 
241 200
                 "        {\n" +
242 201
                 "            \"orgSignerInfo\": {\n" +
243
-
244
-//                "                \"orgName\": \"西安云美电子科技有限公司\",\n" +
245 202
                 "                \"orgName\": \"" + orgName +  "\",\n" +
246
-
247 203
                 "                \"transactorInfo\": {\n" +
248
-
249
-
250
-//                "                \"psnAccount\": \"17691338406\",\n" +
251 204
                 "                \"psnAccount\": \"" + orgNamePsnAccount +  "\",\n" +
252 205
 
253 206
                 "                \"psnInfo\": {\n" +
254 207
 
255
-//                "                            \"psnName\": \"韩超勃\"\n" +
256 208
                 "                            \"psnName\": \"" + orgNamepsnName +  "\"\n" +
257 209
                 "                        }\n" +
258 210
 
@@ -261,8 +213,6 @@ public class SignAward {
261 213
 
262 214
                 "            \"signFields\": [\n" +
263 215
                 "                {\n" +
264
-
265
-//                "                    \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
266 216
                 "                    \"fileId\": \"" + fileId +  "\",\n" +
267 217
 
268 218
                 "                    \"normalSignFieldConfig\": {\n" +
@@ -271,13 +221,8 @@ public class SignAward {
271 221
 
272 222
                 "                        \"signFieldPosition\": {\n" +
273 223
 
274
-//                "                            \"positionPage\": \"2\",\n" +
275 224
                 "                            \"positionPage\": \"" + positionPageorg +  "\",\n" +
276
-
277
-//                "                            \"positionX\": 340.0,\n" +
278 225
                 "                            \"positionX\": " + positionXorg +  ",\n" +
279
-
280
-//                "                            \"positionY\": 340.736\n" +
281 226
                 "                            \"positionY\": " + positionYorg +  "\n" +
282 227
                 "                        },\n" +
283 228
                 "                        \"signFieldStyle\": 1\n" +
@@ -312,7 +257,6 @@ public class SignAward {
312 257
         String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
313 258
         String jsonParm = "{\n" +
314 259
                 "    \"operator\": {\n" +
315
-//                "        \"psnAccount\":\"18209231185\"\n" +
316 260
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
317 261
                 "    }\n" +
318 262
                 "}";
@@ -337,15 +281,11 @@ public class SignAward {
337 281
         String orgName = sealSignRecord.getOrgnizeName();
338 282
 
339 283
         String jsonParm = "{\n" +
340
-//                "    \"needLogin\": true,\n" +
341 284
                 "    \"operator\": {\n" +
342 285
 
343
-//                "        \"psnAccount\":\"17691338406\"\n" +
344 286
                 "        \"psnAccount\": \"" + psnAccount +  "\"\n" +
345 287
                 "    },\n" +
346 288
                 "    \"organization\": {\n" +
347
-
348
-//                "        \"orgName\": \"西安云美电子科技有限公司\"\n" +
349 289
                 "        \"orgName\": \"" + orgName +  "\"\n" +
350 290
 
351 291
                 "    }\n" +

+ 45
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml 파일 보기

@@ -3,9 +3,10 @@
3 3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
6
+
6 7
     <insert id="insertSealSignRecord"  useGeneratedKeys="true" keyProperty="id">
7 8
         INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
8
-        ,penson_name,orgnize_name,org_name_psn_acc,org_name_psn_name,position_page_psn
9
+        ,penson_name,orgnize_name,orgn_name_psn_acc,orgn_name_psn_name,position_pagepsn
9 10
         ,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
10 11
         ,sign_flow_status)
11 12
         VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
@@ -13,4 +14,47 @@
13 14
         ,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
14 15
     </insert>
15 16
 
17
+
18
+    <resultMap type="SealSignRecord" id="SealSignRecordResult">
19
+        <id     property="id"       column="id"      />
20
+        <result property="caseAppliId"       column="case_appli_id"      />
21
+        <result property="fileid"     column="file_id"    />
22
+        <result property="signFlowid"     column="sign_flow_id"    />
23
+        <result property="signFlowStatus"        column="sign_flow_status"        />
24
+
25
+        <result property="pensonAccount"        column="penson_account"        />
26
+        <result property="orgnizeName"        column="orgnize_name"        />
27
+        <result property="orgnizeNamePsnAccount"        column="orgn_name_psn_acc"        />
28
+
29
+    </resultMap>
30
+
31
+    <select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
32
+        SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
33
+        from seal_sign_record s
34
+        <where>
35
+            <if test="signFlowStatus != null ">
36
+                AND s.sign_flow_status  = #{signFlowStatus}
37
+            </if>
38
+            <if test="caseAppliId != null ">
39
+                AND s.case_appli_id  = #{caseAppliId}
40
+            </if>
41
+        </where>
42
+    </select>
43
+
44
+    <select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
45
+        SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id
46
+        from seal_sign_record s
47
+        where s.sign_flow_status  in (1,2)
48
+    </select>
49
+
50
+    <update id="updataSealSignRecord" parameterType="SealSignRecord">
51
+        update seal_sign_record
52
+        <set>
53
+            <if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
54
+            <if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
55
+        </set>
56
+        where id = #{id}
57
+    </update>
58
+
59
+
16 60
 </mapper>