소스 검색

Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev

hejinbo 2 년 전
부모
커밋
d8c09d6dff
15개의 변경된 파일532개의 추가작업 그리고 591개의 파일을 삭제
  1. 21
    18
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java
  2. 11
    154
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/DeptIdentify.java
  3. 38
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealManage.java
  4. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SealListVO.java
  5. 5
    8
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/DeptIdentifyMapper.java
  6. 16
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealManageMapper.java
  7. 5
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java
  8. 55
    24
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  9. 108
    84
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java
  10. 137
    158
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java
  11. 30
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/ImageToBase64Converter.java
  12. 0
    37
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/MyTest.java
  13. 16
    35
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java
  14. 28
    70
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml
  15. 61
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealManageMapper.xml

+ 21
- 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java 파일 보기

1
 package com.ruoyi.web.controller.wisdomarbitrate;
1
 package com.ruoyi.web.controller.wisdomarbitrate;
2
-
3
-import com.alibaba.fastjson.JSONObject;
4
-import com.ruoyi.common.annotation.Log;
5
 import com.ruoyi.common.core.controller.BaseController;
2
 import com.ruoyi.common.core.controller.BaseController;
6
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.core.page.TableDataInfo;
4
 import com.ruoyi.common.core.page.TableDataInfo;
8
-import com.ruoyi.common.enums.BusinessType;
9
 import com.ruoyi.common.exception.EsignDemoException;
5
 import com.ruoyi.common.exception.EsignDemoException;
10
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
11
-import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
12
-import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
13
-import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
6
+import com.ruoyi.wisdomarbitrate.domain.*;
14
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
7
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
15
 import com.ruoyi.wisdomarbitrate.service.IDeptIdentifyService;
8
 import com.ruoyi.wisdomarbitrate.service.IDeptIdentifyService;
16
 import org.springframework.beans.factory.annotation.Autowired;
9
 import org.springframework.beans.factory.annotation.Autowired;
27
     private IDeptIdentifyService deptIdentifyService;
20
     private IDeptIdentifyService deptIdentifyService;
28
 
21
 
29
     /**
22
     /**
30
-     * 查询部门认证数据
23
+     * 新增机构
24
+     * @param deptIdentify
25
+     * @return
26
+     */
27
+    @PostMapping("/insert")
28
+    public AjaxResult insertDeptIdentify(@RequestBody DeptIdentify deptIdentify){
29
+        return deptIdentifyService.insertDeptIdentify(deptIdentify);
30
+    }
31
+
32
+    /**
33
+     * 查询机构信息
31
      */
34
      */
32
     @GetMapping("/list")
35
     @GetMapping("/list")
33
     public TableDataInfo list(DeptIdentify deptIdentify) {
36
     public TableDataInfo list(DeptIdentify deptIdentify) {
46
     }
49
     }
47
 
50
 
48
     /**
51
     /**
49
-     * 启用
52
+     * 机构启用/禁用
50
      */
53
      */
51
     @PostMapping("/enableDept")
54
     @PostMapping("/enableDept")
52
     public AjaxResult enableDept(@Validated @RequestBody DeptIdentify deptIdentify) {
55
     public AjaxResult enableDept(@Validated @RequestBody DeptIdentify deptIdentify) {
56
     /**
59
     /**
57
      * 上传自定义公章
60
      * 上传自定义公章
58
      *
61
      *
59
-     * @param deptIdentify
62
+     * @param
60
      * @param file
63
      * @param file
61
      * @return
64
      * @return
62
      */
65
      */
63
     @PostMapping("/sealUpload")
66
     @PostMapping("/sealUpload")
64
-    public AjaxResult sealUpload(Long id, String sealName , @RequestParam("file") MultipartFile file) {
65
-        return deptIdentifyService.sealUpload(id,sealName, file);
67
+    public AjaxResult sealUpload(Long id, @RequestParam("file") MultipartFile file) {
68
+        return deptIdentifyService.sealUpload(id, file);
66
     }
69
     }
67
 
70
 
68
     /**
71
     /**
76
     }
79
     }
77
 
80
 
78
     /**
81
     /**
79
-     * 签章图片列表查询
82
+     * 公章列表查询
80
      * @param deptIdentify
83
      * @param deptIdentify
81
      * @return
84
      * @return
82
      */
85
      */
89
 
92
 
90
     /**
93
     /**
91
      * 印章启用或者禁用
94
      * 印章启用或者禁用
92
-     * @param deptIdentify
95
+     * @param sealManage
93
      * @return
96
      * @return
94
      */
97
      */
95
     @PostMapping("/updateSealLockStatus")
98
     @PostMapping("/updateSealLockStatus")
96
-    public AjaxResult updateSealLockStatus(@Validated @RequestBody DeptIdentify deptIdentify){
97
-        if(deptIdentify.getSealId()==null ||deptIdentify.getSealStatus()==null){
99
+    public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
100
+        if(sealManage.getId()==null ||sealManage.getSealStatus()==null){
98
             return error("参数校验失败");
101
             return error("参数校验失败");
99
         }
102
         }
100
-        return deptIdentifyService.updateSealLockStatus(deptIdentify);
103
+        return deptIdentifyService.updateSealLockStatus(sealManage);
101
     }
104
     }
102
 }
105
 }

+ 11
- 154
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/DeptIdentify.java 파일 보기

2
 
2
 
3
 import com.fasterxml.jackson.annotation.JsonFormat;
3
 import com.fasterxml.jackson.annotation.JsonFormat;
4
 import com.ruoyi.common.core.domain.BaseEntity;
4
 import com.ruoyi.common.core.domain.BaseEntity;
5
-import java.util.Date;
5
+import lombok.Data;
6
 
6
 
7
+import java.util.Date;
8
+@Data
7
 public class DeptIdentify   extends BaseEntity {
9
 public class DeptIdentify   extends BaseEntity {
8
     private static final long serialVersionUID = 1L;
10
     private static final long serialVersionUID = 1L;
9
 
11
 
10
     /** ID */
12
     /** ID */
11
     private Long id;
13
     private Long id;
12
-    /** 部门ID */
13
-    private Long deptId;
14
-    /** 用户ID */
15
-    private Long userId;
16
-
14
+    /** 机构名称 */
15
+    private String identifyName;
17
     /** 认证状态 */
16
     /** 认证状态 */
18
     private Integer identifyStatus;
17
     private Integer identifyStatus;
19
-
20
     /** 认证时间 */
18
     /** 认证时间 */
21
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
19
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
22
     private Date identifyDate;
20
     private Date identifyDate;
23
     /** 是否启用 */
21
     /** 是否启用 */
24
     private Integer isUse;
22
     private Integer isUse;
25
-
26
-    /** 用户名称 */
27
-    private String nickName;
28
-    /** 手机号码 */
29
-    private String phonenumber;
30
-    /** 部门名称 */
31
-    private String deptName;
32
-    /** 印章名称 */
33
-    private String sealName;
23
+    /** 经办人姓名 */
24
+    private String operName;
25
+    /** 经办人手机号 */
26
+    private String operPhone;
34
 
27
 
35
     /** 机构账号ID */
28
     /** 机构账号ID */
36
     private String orgId;
29
     private String orgId;
37
-
38
     /** 认证授权流程ID */
30
     /** 认证授权流程ID */
39
     private String authFlowId;
31
     private String authFlowId;
40
 
32
 
41
-    public String getSealId() {
42
-        return sealId;
43
-    }
44
-
45
-    public void setSealId(String sealId) {
46
-        this.sealId = sealId;
47
-    }
48
-
49
-    /** 印章id */
50
-    private String sealId;
51
-
52
-    /**
53
-     * 附件id
54
-     */
55
-    private Integer annexId;
56
-    /**
57
-     * 印章状态  0禁用,1启用
58
-     */
59
-    private Integer sealStatus;
60
-
61
-    public Integer getAnnexId() {
62
-        return annexId;
63
-    }
64
-
65
-    public void setAnnexId(Integer annexId) {
66
-        this.annexId = annexId;
67
-    }
68
-
69
-    public String getAuthFlowId() {
70
-        return authFlowId;
71
-    }
72
-
73
-    public void setAuthFlowId(String authFlowId) {
74
-        this.authFlowId = authFlowId;
75
-    }
76
-
77
-    public String getOrgId() {
78
-        return orgId;
79
-    }
80
-
81
-    public void setOrgId(String orgId) {
82
-        this.orgId = orgId;
83
-    }
84
-
85
-    public String getSealName() {
86
-        return sealName;
87
-    }
88
-
89
-    public void setSealName(String sealName) {
90
-        this.sealName = sealName;
91
-    }
92
-
93
     /** 部门认证链接 */
33
     /** 部门认证链接 */
94
     private String identifyUrl;
34
     private String identifyUrl;
95
 
35
 
96
-    public String getIdentifyUrl() {
97
-        return identifyUrl;
98
-    }
99
-
100
-    public void setIdentifyUrl(String identifyUrl) {
101
-        this.identifyUrl = identifyUrl;
102
-    }
103
-
104
-    public String getNickName() {
105
-        return nickName;
106
-    }
107
-
108
-    public void setNickName(String nickName) {
109
-        this.nickName = nickName;
110
-    }
111
-
112
-    public String getPhonenumber() {
113
-        return phonenumber;
114
-    }
115
-
116
-    public void setPhonenumber(String phonenumber) {
117
-        this.phonenumber = phonenumber;
118
-    }
119
-
120
-    public String getDeptName() {
121
-        return deptName;
122
-    }
123
-
124
-    public void setDeptName(String deptName) {
125
-        this.deptName = deptName;
126
-    }
127
-
128
-    public Long getId() {
129
-        return id;
130
-    }
131
-
132
-    public void setId(Long id) {
133
-        this.id = id;
134
-    }
135
-
136
-    public Long getDeptId() {
137
-        return deptId;
138
-    }
139
-
140
-    public void setDeptId(Long deptId) {
141
-        this.deptId = deptId;
142
-    }
143
-
144
-    public Long getUserId() {
145
-        return userId;
146
-    }
147
-
148
-    public void setUserId(Long userId) {
149
-        this.userId = userId;
150
-    }
151
-
152
-    public Integer getIdentifyStatus() {
153
-        return identifyStatus;
154
-    }
155
-
156
-    public void setIdentifyStatus(Integer identifyStatus) {
157
-        this.identifyStatus = identifyStatus;
158
-    }
159
-
160
-    public Date getIdentifyDate() {
161
-        return identifyDate;
162
-    }
163
-
164
-    public void setIdentifyDate(Date identifyDate) {
165
-        this.identifyDate = identifyDate;
166
-    }
167
-
168
-    public Integer getIsUse() {
169
-        return isUse;
170
-    }
171
-
172
-    public void setIsUse(Integer isUse) {
173
-        this.isUse = isUse;
174
-    }
36
+    /** 机构类型(1 仲裁机构) */
37
+    private Integer identifyType;
175
 
38
 
176
-    public Integer getSealStatus() {
177
-        return sealStatus;
178
-    }
179
 
39
 
180
-    public void setSealStatus(Integer sealStatus) {
181
-        this.sealStatus = sealStatus;
182
-    }
183
 }
40
 }

+ 38
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealManage.java 파일 보기

1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import com.ruoyi.common.core.domain.BaseEntity;
4
+import lombok.Data;
5
+
6
+@Data
7
+public class SealManage extends BaseEntity {
8
+    private static final long serialVersionUID = 1L;
9
+    /**
10
+     * ID
11
+     */
12
+    private Long id;
13
+
14
+    /**
15
+     * 机构关联id
16
+     */
17
+    private Long identifyId;
18
+
19
+    /**
20
+     * 印章名称
21
+     */
22
+    private String sealName;
23
+
24
+
25
+    /**
26
+     * 印章id
27
+     */
28
+    private String sealId;
29
+    /**
30
+     * 附件id
31
+     */
32
+    private Integer annexId;
33
+
34
+    /**
35
+     * 印章状态(0禁用,1启用)
36
+     */
37
+    private Integer sealStatus;
38
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SealListVO.java 파일 보기

21
      */
21
      */
22
     private String annexPath;
22
     private String annexPath;
23
     /**
23
     /**
24
-     * 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
24
+     * 附件类型
25
      */
25
      */
26
     private Integer annexType;
26
     private Integer annexType;
27
 }
27
 }

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

1
 package com.ruoyi.wisdomarbitrate.mapper;
1
 package com.ruoyi.wisdomarbitrate.mapper;
2
 
2
 
3
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
3
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
4
+import org.apache.ibatis.annotations.Mapper;
5
 
5
 
6
 import java.util.List;
6
 import java.util.List;
7
 
7
 
8
+@Mapper
8
 public interface DeptIdentifyMapper {
9
 public interface DeptIdentifyMapper {
9
 
10
 
10
-
11
+    /*
12
+    查询仲裁机构信息
13
+     */
11
     List<DeptIdentify> selectDeptIdentify(DeptIdentify deptIdentify);
14
     List<DeptIdentify> selectDeptIdentify(DeptIdentify deptIdentify);
12
 
15
 
13
-    List<DeptIdentify> selectDeptIdentifyBydeptid(DeptIdentify deptIdentify);
14
-
15
     int insertDeptIdentify(DeptIdentify deptIdentify);
16
     int insertDeptIdentify(DeptIdentify deptIdentify);
16
 
17
 
17
-    List<DeptIdentify> selectDeptIdentifylist(DeptIdentify deptIdentify);
18
-
19
     int updateDeptIdentify(DeptIdentify deptIdentify);
18
     int updateDeptIdentify(DeptIdentify deptIdentify);
20
 
19
 
21
-    List<DeptIdentify> selectDeptIdentifylistother(DeptIdentify deptIdentify);
22
-
23
 }
20
 }

+ 16
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealManageMapper.java 파일 보기

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.SealManage;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+import java.util.List;
7
+
8
+@Mapper
9
+public interface SealManageMapper {
10
+
11
+    List<SealManage> selectSealList(SealManage sealManage);
12
+
13
+    int insertSealManage(SealManage sealManage);
14
+
15
+    int updateSealManage(SealManage sealManage1);
16
+}

+ 5
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java 파일 보기

3
 import com.ruoyi.common.core.domain.AjaxResult;
3
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.common.exception.EsignDemoException;
4
 import com.ruoyi.common.exception.EsignDemoException;
5
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
5
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
6
+import com.ruoyi.wisdomarbitrate.domain.SealManage;
6
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
7
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
7
 import org.springframework.web.multipart.MultipartFile;
8
 import org.springframework.web.multipart.MultipartFile;
8
 
9
 
18
 
19
 
19
     AjaxResult enableDept(DeptIdentify deptIdentify);
20
     AjaxResult enableDept(DeptIdentify deptIdentify);
20
 
21
 
21
-    AjaxResult sealUpload(Long id, String sealName , MultipartFile file);
22
+    AjaxResult sealUpload(Long id,MultipartFile file);
22
 
23
 
23
 
24
 
24
     AjaxResult receiveNotify(String body);
25
     AjaxResult receiveNotify(String body);
25
 
26
 
26
     List<SealListVO> getSealList(DeptIdentify deptIdentify);
27
     List<SealListVO> getSealList(DeptIdentify deptIdentify);
27
 
28
 
28
-    AjaxResult updateSealLockStatus(DeptIdentify deptIdentify);
29
+    AjaxResult updateSealLockStatus(SealManage sealManage);
29
 
30
 
30
 
31
 
32
+    AjaxResult insertDeptIdentify(DeptIdentify deptIdentify);
33
+
31
 }
34
 }

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

114
     @Autowired
114
     @Autowired
115
     private ReservedConferenceMapper reservedConferenceMapper;
115
     private ReservedConferenceMapper reservedConferenceMapper;
116
 
116
 
117
+    @Autowired
118
+    private SealManageMapper sealManageMapper;
119
+
117
     // 手机号正则
120
     // 手机号正则
118
     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}$");
121
     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}$");
119
 
122
 
176
                     deptIds.add(sysUser.getDeptId());
179
                     deptIds.add(sysUser.getDeptId());
177
                     caseApplication.setDeptIds(deptIds);
180
                     caseApplication.setDeptIds(deptIds);
178
                 }
181
                 }
179
-                if (  role.getRoleName().equals("申请人")) {
182
+                if (role.getRoleName().equals("申请人")) {
180
                     // 查询角色有关的用户部门
183
                     // 查询角色有关的用户部门
181
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
184
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
182
                 }
185
                 }
237
                 deptIds.add(sysUser.getDeptId());
240
                 deptIds.add(sysUser.getDeptId());
238
                 caseApplication.setDeptIds(deptIds);
241
                 caseApplication.setDeptIds(deptIds);
239
             }
242
             }
240
-            if ( role.getRoleName().equals("申请人")) {
243
+            if (role.getRoleName().equals("申请人")) {
241
                 // 查询角色有关的用户部门
244
                 // 查询角色有关的用户部门
242
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
245
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
243
             }
246
             }
1685
                                 JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
1688
                                 JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
1686
                                 if (jsonObject1.getIntValue("errCode") == 0) {
1689
                                 if (jsonObject1.getIntValue("errCode") == 0) {
1687
                                     //查看文件上传状态
1690
                                     //查看文件上传状态
1688
-                                    Thread.sleep(5000);
1691
+                                    Thread.sleep(3000);
1689
                                     EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
1692
                                     EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
1690
                                     JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
1693
                                     JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
1691
                                     JSONObject data = jsonObject2.getJSONObject("data");
1694
                                     JSONObject data = jsonObject2.getJSONObject("data");
1715
                                         DeptIdentify deptIdentify = new DeptIdentify();
1718
                                         DeptIdentify deptIdentify = new DeptIdentify();
1716
                                         deptIdentify.setIsUse(1);
1719
                                         deptIdentify.setIsUse(1);
1717
                                         DeptIdentify deptIdentifyselect = new DeptIdentify();
1720
                                         DeptIdentify deptIdentifyselect = new DeptIdentify();
1718
-                                        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
1721
+                                        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
1719
                                         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
1722
                                         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
1720
                                             deptIdentifyselect = deptIdentifysnew.get(0);
1723
                                             deptIdentifyselect = deptIdentifysnew.get(0);
1721
-                                            sealSignRecord.setOrgnizeName(deptIdentifyselect.getDeptName());
1722
-                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getPhonenumber());
1723
-                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getNickName());
1724
+                                            sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
1725
+                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperName());
1726
+                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperPhone());
1724
                                         } else {
1727
                                         } else {
1725
                                             return AjaxResult.error("没有用印时的机构名称及经办人信息");
1728
                                             return AjaxResult.error("没有用印时的机构名称及经办人信息");
1726
                                         }
1729
                                         }
1780
                                                 sealIds.add(sealId);
1783
                                                 sealIds.add(sealId);
1781
                                             }
1784
                                             }
1782
                                         }*/
1785
                                         }*/
1783
-                                        EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
1784
-                                        JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1785
-                                        if (jsonObject3.getIntValue("code") == 0) {
1786
-                                            //获取签署流程ID
1787
-                                            JSONObject data1 = jsonObject3.getJSONObject("data");
1788
-                                            String signFlowId = data1.getString("signFlowId");
1789
-                                            //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1790
-                                            sealSignRecord.setCaseAppliId(caseApplication.getId());
1791
-                                            sealSignRecord.setSignFlowid(signFlowId);
1792
-                                            sealSignRecord.setSignFlowStatus(1);//待签名
1793
-                                            sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1794
-                                        } else {
1795
-                                            throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1786
+                                        String orgnizeName = sealSignRecord.getOrgnizeName(); //机构名称
1787
+                                        String orgnizeNamepsnName = sealSignRecord.getOrgnizeNamepsnName(); //机构经办人姓名
1788
+                                        String orgnizeNamePsnAccount = sealSignRecord.getOrgnizeNamePsnAccount(); //机构经办人联系方式
1789
+                                        //查询机构信息
1790
+                                        DeptIdentify deptIdentify1 = new DeptIdentify();
1791
+                                        deptIdentify1.setIdentifyName(orgnizeName);
1792
+                                        deptIdentify1.setOperName(orgnizeNamepsnName);
1793
+                                        deptIdentify1.setOperPhone(orgnizeNamePsnAccount);
1794
+                                        List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify1);
1795
+                                        if (deptIdentifies != null && deptIdentifies.size() > 0) {
1796
+                                            Long id = deptIdentifies.get(0).getId();
1797
+                                            SealManage sealManage = new SealManage();
1798
+                                            sealManage.setIdentifyId(id);
1799
+                                            List<String> sealIdList = new ArrayList<>();
1800
+                                            List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManage);
1801
+                                            if (selectSealList != null && selectSealList.size() > 0) {
1802
+                                                for (SealManage manage : selectSealList) {
1803
+                                                    Integer sealStatus = manage.getSealStatus();
1804
+                                                    if (sealStatus == 1){
1805
+                                                        sealIdList.add(manage.getSealId());
1806
+                                                    }
1807
+                                                }
1808
+                                                EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord,sealIdList);
1809
+                                                JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1810
+                                                if (jsonObject3.getIntValue("code") == 0) {
1811
+                                                    //获取签署流程ID
1812
+                                                    JSONObject data1 = jsonObject3.getJSONObject("data");
1813
+                                                    String signFlowId = data1.getString("signFlowId");
1814
+                                                    //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1815
+                                                    sealSignRecord.setCaseAppliId(caseApplication.getId());
1816
+                                                    sealSignRecord.setSignFlowid(signFlowId);
1817
+                                                    sealSignRecord.setSignFlowStatus(1);//待签名
1818
+                                                    sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1819
+                                                } else {
1820
+                                                    throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1821
+                                                }
1822
+                                            }
1823
+
1824
+
1796
                                         }
1825
                                         }
1797
                                     }
1826
                                     }
1798
                                 }
1827
                                 }
2580
 
2609
 
2581
                     // 新增预约会议表
2610
                     // 新增预约会议表
2582
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2611
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2583
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2612
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
2584
                     reservedConferenceMapper.insert(conference);
2613
                     reservedConferenceMapper.insert(conference);
2585
                     return AjaxResult.success("预约会议成功");
2614
                     return AjaxResult.success("预约会议成功");
2586
 
2615
 
2608
         String roomId = generateRoomId();
2637
         String roomId = generateRoomId();
2609
         // 新增预约会议表
2638
         // 新增预约会议表
2610
         ReservedConference conference = new ReservedConference(caseId, roomId,
2639
         ReservedConference conference = new ReservedConference(caseId, roomId,
2611
-                null, null,0);
2640
+                null, null, 0);
2612
         reservedConferenceMapper.insert(conference);
2641
         reservedConferenceMapper.insert(conference);
2613
         return roomId;
2642
         return roomId;
2614
     }
2643
     }
2615
 
2644
 
2616
     /**
2645
     /**
2617
      * 获取房间号
2646
      * 获取房间号
2647
+     *
2618
      * @return
2648
      * @return
2619
      */
2649
      */
2620
     public String generateRoomId() {
2650
     public String generateRoomId() {
2621
         // 查询最大房间号
2651
         // 查询最大房间号
2622
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2652
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2623
 
2653
 
2624
-        if (null == maxRoomId || maxRoomId >999999) {
2654
+        if (null == maxRoomId || maxRoomId > 999999) {
2625
             return "000001";
2655
             return "000001";
2626
         } else {
2656
         } else {
2627
             return String.format("%06d", maxRoomId);
2657
             return String.format("%06d", maxRoomId);
2662
 
2692
 
2663
     /**
2693
     /**
2664
      * 删除房间号
2694
      * 删除房间号
2695
+     *
2665
      * @param roomId
2696
      * @param roomId
2666
      * @return
2697
      * @return
2667
      */
2698
      */
2668
     @Override
2699
     @Override
2669
     public AjaxResult deleteRoom(String roomId) {
2700
     public AjaxResult deleteRoom(String roomId) {
2670
 
2701
 
2671
-        return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
2702
+        return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
2672
     }
2703
     }
2673
 }
2704
 }
2674
 
2705
 

+ 108
- 84
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java 파일 보기

12
 import com.ruoyi.common.utils.file.FileUploadUtils;
12
 import com.ruoyi.common.utils.file.FileUploadUtils;
13
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
13
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
14
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
14
 import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
15
+import com.ruoyi.wisdomarbitrate.domain.SealManage;
15
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
16
 import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
17
 import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
17
 import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper;
18
 import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper;
19
+import com.ruoyi.wisdomarbitrate.mapper.SealManageMapper;
18
 import com.ruoyi.wisdomarbitrate.service.IDeptIdentifyService;
20
 import com.ruoyi.wisdomarbitrate.service.IDeptIdentifyService;
19
 import com.ruoyi.wisdomarbitrate.utils.SignAward;
21
 import com.ruoyi.wisdomarbitrate.utils.SignAward;
20
 import org.springframework.beans.factory.annotation.Autowired;
22
 import org.springframework.beans.factory.annotation.Autowired;
37
     private DeptIdentifyMapper deptIdentifyMapper;
39
     private DeptIdentifyMapper deptIdentifyMapper;
38
     @Autowired
40
     @Autowired
39
     private CaseAttachMapper caseAttachMapper;
41
     private CaseAttachMapper caseAttachMapper;
42
+    @Autowired
43
+    private SealManageMapper sealManageMapper;
40
 
44
 
41
 
45
 
42
     @Override
46
     @Override
43
     @Transactional
47
     @Transactional
44
     public List<DeptIdentify> selectDeptIdentify(DeptIdentify deptIdentify) {
48
     public List<DeptIdentify> selectDeptIdentify(DeptIdentify deptIdentify) {
45
-        List<DeptIdentify> deptIdentifys = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
46
-        if (deptIdentifys != null && deptIdentifys.size() > 0) {
47
-            for (int i = 0; i < deptIdentifys.size(); i++) {
48
-                DeptIdentify deptIdentifyselect = deptIdentifys.get(i);
49
-                List<DeptIdentify> deptIdentifylist = deptIdentifyMapper.selectDeptIdentifyBydeptid(deptIdentifyselect);
50
-                if (deptIdentifylist != null && deptIdentifylist.size() > 0) {
51
-                    continue;
52
-                } else {
53
-                    deptIdentifyselect.setIdentifyStatus(0);
54
-                    deptIdentifyMapper.insertDeptIdentify(deptIdentifyselect);
55
-                }
56
-            }
57
-        }
58
-
59
-        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
60
-        return deptIdentifysnew;
49
+        return deptIdentifyMapper.selectDeptIdentify(deptIdentify);
61
     }
50
     }
62
 
51
 
63
     @Override
52
     @Override
64
     @Transactional
53
     @Transactional
65
     public DeptIdentify selectDeptIndefiUrl(DeptIdentify deptIdentify) throws EsignDemoException {
54
     public DeptIdentify selectDeptIndefiUrl(DeptIdentify deptIdentify) throws EsignDemoException {
66
-        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
55
+        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
67
         DeptIdentify deptIdentifynew = new DeptIdentify();
56
         DeptIdentify deptIdentifynew = new DeptIdentify();
68
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
57
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
69
             Gson gson = new Gson();
58
             Gson gson = new Gson();
71
             EsignHttpResponse identifyUrl = SignAward.deptIdentifyUrl(deptIdentifyselect);
60
             EsignHttpResponse identifyUrl = SignAward.deptIdentifyUrl(deptIdentifyselect);
72
             JsonObject signUrlJsonObject = gson.fromJson(identifyUrl.getBody(), JsonObject.class);
61
             JsonObject signUrlJsonObject = gson.fromJson(identifyUrl.getBody(), JsonObject.class);
73
             int code = signUrlJsonObject.get("code").getAsInt();
62
             int code = signUrlJsonObject.get("code").getAsInt();
74
-            if (code == 0){
63
+            if (code == 0) {
75
                 JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
64
                 JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
76
                 String url = signUrlData.get("authUrl").getAsString();
65
                 String url = signUrlData.get("authUrl").getAsString();
77
                 //获取本次认证授权流程ID
66
                 //获取本次认证授权流程ID
88
     @Override
77
     @Override
89
     @Transactional
78
     @Transactional
90
     public AjaxResult enableDept(DeptIdentify deptIdentify) {
79
     public AjaxResult enableDept(DeptIdentify deptIdentify) {
91
-        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
80
+        //参数校验
81
+        if (deptIdentify.getId() == null) {
82
+            return AjaxResult.error("请检查参数");
83
+        }
84
+        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
92
         DeptIdentify deptIdentifyselect = deptIdentifysnew.get(0);
85
         DeptIdentify deptIdentifyselect = deptIdentifysnew.get(0);
93
-        Integer identifyStatus = deptIdentifyselect.getIdentifyStatus();
94
-        if (identifyStatus.intValue() == 0) {
95
-            return AjaxResult.error("这个认证数据未进行认证,不能启用");
96
-        } else if (identifyStatus.intValue() == 1) {
97
-            deptIdentifyselect.setIsUse(1);
98
-            deptIdentifyMapper.updateDeptIdentify(deptIdentifyselect);
99
-
100
-            DeptIdentify deptIdentifySel = new DeptIdentify();
101
-            deptIdentifySel.setId(deptIdentify.getId());
102
-            deptIdentifySel.setIdentifyStatus(1);
103
-            List<DeptIdentify> deptIdentifysother = deptIdentifyMapper.selectDeptIdentifylistother(deptIdentifySel);
104
-            if (deptIdentifysother != null && deptIdentifysother.size() > 0) {
105
-                for (int i = 0; i < deptIdentifysother.size(); i++) {
106
-                    DeptIdentify deptIdentifyother = deptIdentifysother.get(i);
107
-                    deptIdentifyother.setIsUse(0);
108
-                    deptIdentifyMapper.updateDeptIdentify(deptIdentifyother);
86
+        Integer isUse = deptIdentifyselect.getIsUse();
87
+        if (isUse == 0) { //机构为未启用状态
88
+            Integer identifyStatus = deptIdentifyselect.getIdentifyStatus();
89
+            if (identifyStatus == 0) {
90
+                return AjaxResult.error("这个认证数据未进行认证,不能启用");
91
+            } else {
92
+                deptIdentifyselect.setIsUse(1);
93
+                int i = deptIdentifyMapper.updateDeptIdentify(deptIdentifyselect);
94
+                if (i > 0) {
95
+                    return AjaxResult.success("启用成功");
109
                 }
96
                 }
110
             }
97
             }
111
-
98
+        } else { //机构为已启用状态
99
+            deptIdentifyselect.setIsUse(0);
100
+            int i = deptIdentifyMapper.updateDeptIdentify(deptIdentifyselect);
101
+            if (i > 0) {
102
+                return AjaxResult.success();
103
+            }
112
         }
104
         }
113
-        return AjaxResult.success();
114
-
105
+        return AjaxResult.error();
115
     }
106
     }
116
 
107
 
117
     @Override
108
     @Override
118
-    public AjaxResult sealUpload(Long id, String sealName , MultipartFile file) {
109
+    public AjaxResult sealUpload(Long id, MultipartFile file) {
119
         try {
110
         try {
120
             if (file.isEmpty()) {
111
             if (file.isEmpty()) {
121
                 return AjaxResult.error("请选择要上传的文件");
112
                 return AjaxResult.error("请选择要上传的文件");
125
             String fileName = FileUploadUtils.upload(filePath, file);
116
             String fileName = FileUploadUtils.upload(filePath, file);
126
             DeptIdentify deptIdentify = new DeptIdentify();
117
             DeptIdentify deptIdentify = new DeptIdentify();
127
             deptIdentify.setId(id);
118
             deptIdentify.setId(id);
128
-            List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentifyBydeptid(deptIdentify);
119
+            List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
129
             if (deptIdentifies != null && deptIdentifies.size() > 0) {
120
             if (deptIdentifies != null && deptIdentifies.size() > 0) {
130
                 for (DeptIdentify identify : deptIdentifies) {
121
                 for (DeptIdentify identify : deptIdentifies) {
131
                     //先判断企业用户是否授予资源管理权限
122
                     //先判断企业用户是否授予资源管理权限
132
                     String authFlowId = identify.getAuthFlowId();
123
                     String authFlowId = identify.getAuthFlowId();
124
+                    if (authFlowId == null) {
125
+                        return AjaxResult.error("改机构尚未认证,不能上传自定义公章");
126
+                    }
133
                     EsignHttpResponse response1 = SealUtil.queryAuthProcess(authFlowId);
127
                     EsignHttpResponse response1 = SealUtil.queryAuthProcess(authFlowId);
134
                     JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
128
                     JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
135
                     int authorizedStatus = jsonObject1.getJSONObject("data").getIntValue("authorizedStatus");
129
                     int authorizedStatus = jsonObject1.getJSONObject("data").getIntValue("authorizedStatus");
137
                         String prefix = "/profile";
131
                         String prefix = "/profile";
138
                         int startIndex = fileName.indexOf(prefix);
132
                         int startIndex = fileName.indexOf(prefix);
139
                         startIndex += prefix.length();
133
                         startIndex += prefix.length();
140
-                        //String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
134
+                        String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
141
                         //创建机构图片印章
135
                         //创建机构图片印章
142
-                        String annexPath = "D:\\develop\\2.jpg";
143
-                        identify.setSealName(sealName);
144
-                        EsignHttpResponse response = SignAward.createOrgByImage(identify, annexPath);
136
+                        // String annexPath = "D:\\develop\\2.jpg";
137
+                        String sealName = "自定义" + UUID.randomUUID() + "";  //自定义印章印章名称不能重复,所以用UUID确保唯一性
138
+                        EsignHttpResponse response = SignAward.createOrgByImage(identify, sealName, annexPath);
145
                         JSONObject jsonObject = JSONObject.parseObject(response.getBody());
139
                         JSONObject jsonObject = JSONObject.parseObject(response.getBody());
146
                         int code = jsonObject.getIntValue("code");
140
                         int code = jsonObject.getIntValue("code");
147
                         if (code == 0) {  //业务码,0表示成功,非0表示异常。
141
                         if (code == 0) {  //业务码,0表示成功,非0表示异常。
148
                             String sealId = jsonObject.getJSONObject("data").getString("sealId");
142
                             String sealId = jsonObject.getJSONObject("data").getString("sealId");
149
                             //保存到表里
143
                             //保存到表里
150
-                            DeptIdentify deptIdentify1 = new DeptIdentify();
151
-                            deptIdentify1.setDeptId(identify.getDeptId());
152
-                            deptIdentify1.setUserId(identify.getUserId());
153
-                            deptIdentify1.setIdentifyStatus(identify.getIdentifyStatus());
154
-                            deptIdentify1.setIdentifyDate(identify.getIdentifyDate());
155
-                            deptIdentify1.setIsUse(identify.getIsUse());
156
-                            deptIdentify1.setSealName(sealName);
157
-                            deptIdentify1.setOrgId(identify.getOrgId());
158
-                            deptIdentify1.setAuthFlowId(identify.getAuthFlowId());
159
-                            deptIdentify1.setSealId(sealId);
160
-                            int i = deptIdentifyMapper.insertDeptIdentify(deptIdentify1);
144
+                            SealManage sealManage = new SealManage();
145
+                            sealManage.setIdentifyId(identify.getId());
146
+                            sealManage.setSealName(sealName);
147
+                            sealManage.setSealId(sealId);
148
+                            sealManage.setSealStatus(0);  //默认为禁用
149
+                            int i = sealManageMapper.insertSealManage(sealManage);
161
                             if (i > 0) {
150
                             if (i > 0) {
162
                                 return AjaxResult.success("上传成功");
151
                                 return AjaxResult.success("上传成功");
163
                             }
152
                             }
164
                         }
153
                         }
165
-                        return AjaxResult.error("公章上传失败,请检查印章名称是否重复");
154
+                        return AjaxResult.error("公章上传失败,请检查参数");
166
                     }
155
                     }
167
                     return AjaxResult.error("企业用户未授予资源管理权限");
156
                     return AjaxResult.error("企业用户未授予资源管理权限");
168
                 }
157
                 }
233
                                 if (i1 > 0) {
222
                                 if (i1 > 0) {
234
                                     //将附件id保存到公章管理表里
223
                                     //将附件id保存到公章管理表里
235
                                     Integer annexId1 = caseAttach.getAnnexId();
224
                                     Integer annexId1 = caseAttach.getAnnexId();
236
-                                    DeptIdentify identify = new DeptIdentify();
237
-                                    identify.setSealId(sealId);
238
-                                    List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(identify);
239
-                                    if (deptIdentifies != null && deptIdentifies.size() > 0) {
240
-                                        DeptIdentify identify1 = deptIdentifies.get(0);
241
-                                        identify1.setAnnexId(annexId1);
242
-                                        identify1.setSealStatus(1);  //启用
243
-                                        deptIdentifyMapper.updateDeptIdentify(identify1);
225
+                                    SealManage sealManage = new SealManage();
226
+                                    sealManage.setSealId(sealId);
227
+                                    List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManage);
228
+                                    if (selectSealList != null && selectSealList.size() > 0) {
229
+                                        SealManage sealManage1 = selectSealList.get(0);
230
+                                        sealManage1.setAnnexId(annexId1);
231
+                                        sealManage1.setSealStatus(1);  //启用
232
+                                        sealManageMapper.updateSealManage(sealManage1);
244
                                     }
233
                                     }
245
                                 }
234
                                 }
246
                             }
235
                             }
258
 
247
 
259
     @Override
248
     @Override
260
     public List<SealListVO> getSealList(DeptIdentify deptIdentify) {
249
     public List<SealListVO> getSealList(DeptIdentify deptIdentify) {
261
-        List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentifylistother(deptIdentify);
250
+        if (deptIdentify.getId() == null) {
251
+            return null;
252
+        }
253
+        SealManage sealManage = new SealManage();
254
+        sealManage.setIdentifyId(deptIdentify.getId());
255
+        List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManage);
262
         List<SealListVO> sealListVOS = new ArrayList<>();
256
         List<SealListVO> sealListVOS = new ArrayList<>();
263
-        if (deptIdentifies != null && deptIdentifies.size() > 0) {
264
-            for (DeptIdentify identify : deptIdentifies) {
265
-                SealListVO sealListVO = new SealListVO();
266
-                sealListVO.setSealId(identify.getSealId());
267
-                sealListVO.setSealName(identify.getSealName());
268
-                sealListVO.setSealStatus(identify.getSealStatus());
269
-                Integer annexId = identify.getAnnexId();
270
-                //根据附件id查询路径
271
-                CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
272
-                String annexName = caseAttach.getAnnexName();
273
-                String prefix = "/profile";
274
-                int startIndex = annexName.indexOf(prefix);
275
-                startIndex += prefix.length();
276
-                String annexPath = "/uploadPath" + annexName.substring(startIndex);
277
-                sealListVO.setAnnexPath(annexPath);
278
-                sealListVO.setAnnexType(caseAttach.getAnnexType());
279
-                sealListVOS.add(sealListVO);
257
+        if (selectSealList != null && selectSealList.size() > 0) {
258
+            for (SealManage sealManage1 : selectSealList) {
259
+                Integer annexId = sealManage1.getAnnexId();
260
+                if (annexId != null) {   //附件id有值,证明是审核通过了的
261
+                    SealListVO sealListVO = new SealListVO();
262
+                    sealListVO.setSealId(sealManage1.getSealId());
263
+                    sealListVO.setSealName(sealManage1.getSealName());
264
+                    sealListVO.setSealStatus(sealManage1.getSealStatus());
265
+                    //根据附件id查询路径
266
+                    CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
267
+                    String annexName = caseAttach.getAnnexName();
268
+                    String prefix = "/profile";
269
+                    int startIndex = annexName.indexOf(prefix);
270
+                    startIndex += prefix.length();
271
+                    String annexPath = "/uploadPath" + annexName.substring(startIndex);
272
+                    sealListVO.setAnnexPath(annexPath);
273
+                    sealListVO.setAnnexType(caseAttach.getAnnexType());
274
+                    sealListVOS.add(sealListVO);
275
+                }
280
             }
276
             }
281
         }
277
         }
282
         return sealListVOS;
278
         return sealListVOS;
283
     }
279
     }
284
 
280
 
285
     @Override
281
     @Override
286
-    public AjaxResult updateSealLockStatus(DeptIdentify deptIdentify) {
287
-        deptIdentifyMapper.updateDeptIdentify(deptIdentify);
282
+    public AjaxResult updateSealLockStatus(SealManage sealManage) {
283
+        sealManageMapper.updateSealManage(sealManage);
288
         return AjaxResult.success();
284
         return AjaxResult.success();
289
     }
285
     }
286
+
287
+    @Override
288
+    public AjaxResult insertDeptIdentify(DeptIdentify deptIdentify) {
289
+        //参数校验
290
+        String identifyName = deptIdentify.getIdentifyName();
291
+        String operName = deptIdentify.getOperName();
292
+        String operPhone = deptIdentify.getOperPhone();
293
+        if (identifyName == null || operName == null || operPhone == null) {
294
+            AjaxResult.error("请检查参数是否完整");
295
+        }
296
+        Integer identifyType = deptIdentify.getIdentifyType();
297
+        if (identifyType == null) {
298
+            deptIdentify.setIdentifyType(1); // 设置机构默认为仲裁机构
299
+        }
300
+        //先查询看数据库里有没有相同的机构经办人
301
+        List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
302
+        if (deptIdentifies != null && deptIdentifies.size() > 0) {
303
+            //说明之前新增过
304
+            return AjaxResult.error("信息重复");
305
+        }
306
+        deptIdentify.setIdentifyStatus(0); //设置认证状态默认为未认证
307
+        deptIdentify.setIsUse(0); //设置认证状态默认为未认证
308
+        int i = deptIdentifyMapper.insertDeptIdentify(deptIdentify);//设置机构默认为未启用
309
+        if (i > 0) {
310
+            return AjaxResult.success("新增成功");
311
+        }
312
+        return AjaxResult.error();
313
+    }
290
 }
314
 }

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

4
 import com.alibaba.fastjson.JSONObject;
4
 import com.alibaba.fastjson.JSONObject;
5
 import com.google.gson.Gson;
5
 import com.google.gson.Gson;
6
 import com.google.gson.JsonArray;
6
 import com.google.gson.JsonArray;
7
+import com.google.gson.JsonElement;
7
 import com.google.gson.JsonObject;
8
 import com.google.gson.JsonObject;
8
 import com.ruoyi.common.constant.CaseApplicationConstants;
9
 import com.ruoyi.common.constant.CaseApplicationConstants;
9
 import com.ruoyi.common.constant.FileTransformation;
10
 import com.ruoyi.common.constant.FileTransformation;
11
 import com.ruoyi.common.exception.EsignDemoException;
12
 import com.ruoyi.common.exception.EsignDemoException;
12
 import com.ruoyi.common.utils.SealUtil;
13
 import com.ruoyi.common.utils.SealUtil;
13
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
14
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
14
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
15
-import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
16
-import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
17
-import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
18
-import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
19
-import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
20
-import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper;
21
-import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
15
+import com.ruoyi.wisdomarbitrate.domain.*;
16
+import com.ruoyi.wisdomarbitrate.mapper.*;
22
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.beans.factory.annotation.Autowired;
23
 import org.springframework.scheduling.annotation.Scheduled;
18
 import org.springframework.scheduling.annotation.Scheduled;
24
 import org.springframework.stereotype.Component;
19
 import org.springframework.stereotype.Component;
27
 import java.io.File;
22
 import java.io.File;
28
 import java.io.IOException;
23
 import java.io.IOException;
29
 import java.time.LocalDate;
24
 import java.time.LocalDate;
25
+import java.util.Date;
30
 import java.util.List;
26
 import java.util.List;
31
 import java.util.UUID;
27
 import java.util.UUID;
32
 
28
 
41
     private CaseAttachMapper caseAttachMapper;
37
     private CaseAttachMapper caseAttachMapper;
42
     @Autowired
38
     @Autowired
43
     private DeptIdentifyMapper deptIdentifyMapper;
39
     private DeptIdentifyMapper deptIdentifyMapper;
44
-
40
+    @Autowired
41
+    private SealManageMapper sealManageMapper;
42
+    /*
43
+    定时查询签署流程详情
44
+     */
45
     @Scheduled(cron = "0/10 * * * * ?")
45
     @Scheduled(cron = "0/10 * * * * ?")
46
     @Transactional
46
     @Transactional
47
     public void fixExecuteSelectFlowDetailUtils() {
47
     public void fixExecuteSelectFlowDetailUtils() {
171
 
171
 
172
     }
172
     }
173
 
173
 
174
-    @Scheduled(cron = "0/30 * * * * ?")
174
+    /**
175
+     * 定时查询企业认证状态
176
+     * @throws Exception
177
+     */
178
+    @Scheduled(cron = "0 0/30 * * * ?")
175
     @Transactional
179
     @Transactional
176
-    public void fixExecuteSelectDeptIndentifyUtils() throws EsignDemoException {
180
+    public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
177
         Gson gson = new Gson();
181
         Gson gson = new Gson();
178
         DeptIdentify deptIdentify = new DeptIdentify();
182
         DeptIdentify deptIdentify = new DeptIdentify();
179
         deptIdentify.setIdentifyStatus(0);
183
         deptIdentify.setIdentifyStatus(0);
180
-        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
184
+        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
181
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
185
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
182
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
186
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
183
-                EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentifysnew.get(i));
184
-
187
+                DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
188
+                EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
185
                 JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
189
                 JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
186
                 int code = identifyInfoJsonObject.get("code").getAsInt();
190
                 int code = identifyInfoJsonObject.get("code").getAsInt();
187
                 if (code == 0) {
191
                 if (code == 0) {
189
                     int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
193
                     int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
190
                     if (realnameStatus == 1) {
194
                     if (realnameStatus == 1) {
191
                         String orgId = identifyInfoData.get("orgId").getAsString();
195
                         String orgId = identifyInfoData.get("orgId").getAsString();
192
-                        System.out.println("这是orgId" + orgId + "=======================");
193
-                        EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId);
194
-                        //将orgId保存到数据库里
195
-                        DeptIdentify deptIdentifynew = deptIdentifysnew.get(i);
196
-                        deptIdentifynew.setOrgId(orgId);
197
-                        JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class);
198
-                        JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data");
199
-                        JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray();
200
-                        String sealNames = "";
201
-                        if (sealArray.size() > 0) {
202
-                            for (int j = 0; j < sealArray.size(); j++) {
203
-                                JsonObject sealObject = (JsonObject) sealArray.get(j);
204
-                                String sealName = sealObject.get("sealName").toString();
205
-                                String sealNamenew = sealName.substring(1, sealName.length() - 1);
206
-                                sealNames += sealNamenew + ",";
196
+                        //查询企业内部印章
197
+                        EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
198
+                        JsonObject jsonObject  = gson.fromJson(response.getBody(), JsonObject.class);
199
+                        int code1 = jsonObject.get("code").getAsInt();
200
+                        if (code1 == 0){
201
+                            JsonObject data = jsonObject.getAsJsonObject("data");
202
+                            JsonArray seals = data.get("seals").getAsJsonArray();
203
+                            if (seals.size() > 0) {
204
+                                for (int j = 0; j < seals.size(); j++) {
205
+                                    //保存印章信息到数据库
206
+                                    JsonObject asJsonObject = seals.get(j).getAsJsonObject();
207
+                                    SealManage sealManage = new SealManage();
208
+                                    String sealName = asJsonObject.get("sealName").toString();
209
+                                    String sealId = asJsonObject.get("sealId").toString();
210
+                                    String url = asJsonObject.get("sealImageDownloadUrl").toString();
211
+                                    LocalDate now = LocalDate.now();
212
+                                    String year = Integer.toString(now.getYear());
213
+                                    String month = String.format("%02d", now.getMonthValue());
214
+                                    String day = String.format("%02d", now.getDayOfMonth());
215
+                                    String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
216
+                                    String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
217
+                                    String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
218
+                                    String savePath = "/home/ruoyi/uploadPath/upload/";
219
+                                    // 创建日期目录
220
+                                    File saveFolder = new File(saveFolderPath);
221
+                                    if (!saveFolder.exists()) {
222
+                                        saveFolder.mkdirs();
223
+                                    }
224
+                                    String resultFilePath = saveFolderPath + "/" + fileName;
225
+                                    File resultFilePathFile = new File(resultFilePath);
226
+                                    if (!resultFilePathFile.exists()) {
227
+                                        resultFilePathFile.createNewFile();
228
+                                    }
229
+                                    boolean downLoadFile = FileTransformation.downLoadFileByUrl(url, resultFilePath);
230
+                                    if (downLoadFile) {
231
+                                        CaseAttach caseAttach = new CaseAttach();
232
+                                        caseAttach.setAnnexType(10);  //10代表印章图片
233
+                                        caseAttach.setAnnexPath(savePath);
234
+                                        caseAttach.setAnnexName(saveName);
235
+                                        int i1 = caseAttachMapper.save(caseAttach);
236
+                                        if (i1 > 0) {
237
+                                            //将印章信息保存到公章管理表里
238
+                                            Integer annexId1 = caseAttach.getAnnexId();
239
+                                            sealManage.setAnnexId(annexId1);
240
+                                            sealManage.setSealId(sealId);
241
+                                            sealManage.setSealName(sealName);
242
+                                            sealManage.setIdentifyId(deptIdentify1.getId());
243
+                                            sealManage.setSealStatus(1);
244
+                                            sealManageMapper.insertSealManage(sealManage);
245
+                                        }
246
+                                    }
247
+                                }
207
                             }
248
                             }
249
+
208
                         }
250
                         }
209
-                        String sealName = sealNames.substring(0, sealNames.length() - 1);
210
-                        deptIdentifynew.setIdentifyStatus(1);
211
-                        deptIdentifynew.setSealName(sealName);
212
-                        int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew);
251
+                        //将orgId保存到数据库里
252
+                        deptIdentify1.setOrgId(orgId);
253
+                        deptIdentify1.setIdentifyStatus(1);
254
+                        deptIdentify1.setIsUse(0);  //默认机构为未启用
255
+                        int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
213
                     }
256
                     }
214
                 }
257
                 }
215
             }
258
             }
217
     }
260
     }
218
 
261
 
219
     /**
262
     /**
220
-     * 定时查询企业内部印章审核状态
221
-     *
222
-     * @throws EsignDemoException
263
+     * 定时查询印章审核状态
223
      */
264
      */
224
-    // @Scheduled(cron = "0/30 * * * * ?")
265
+    @Scheduled(cron = "0/30 * * * * ?")
225
     @Transactional
266
     @Transactional
226
     public void searchForInstitutionalSeal() {
267
     public void searchForInstitutionalSeal() {
227
         try {
268
         try {
228
-            DeptIdentify deptIdentify = new DeptIdentify();
229
-            deptIdentify.setIsUse(0);
230
-            List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
231
-            if (deptIdentifies != null && deptIdentifies.size() > 0) {
232
-                for (DeptIdentify identify : deptIdentifies) {
269
+            SealManage sealManage = new SealManage();
270
+            sealManage.setSealStatus(0);
271
+            List<SealManage> sealManageList = sealManageMapper.selectSealList(sealManage);
272
+            if (sealManageList != null && sealManageList.size() > 0) {
273
+                for (SealManage sealManage1 : sealManageList) {
233
                     //查询企业内部印章
274
                     //查询企业内部印章
234
-                    Integer annexId = identify.getAnnexId();
235
-                    if (annexId == null) {
236
-                        //说明之前没有下载过
237
-                        EsignHttpResponse response = SignAward.orgOwnSealList(identify);
238
-                        JSONObject jsonObject = JSONObject.parseObject(response.getBody());
239
-                        JSONObject data = jsonObject.getJSONObject("data");
240
-                        JSONArray seals = data.getJSONArray("seals");
241
-                        for (int i = 0; i < seals.size(); i++) {
242
-                            JSONObject seal = seals.getJSONObject(i);
243
-                            int statusDescription = seal.getIntValue("statusDescription");
244
-                            if (statusDescription == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
245
-                                //已启用证明审核通过,下载到数据库
246
-                                String sealImageDownloadUrl = seal.getString("sealImageDownloadUrl");
247
-                                LocalDate now = LocalDate.now();
248
-                                String year = Integer.toString(now.getYear());
249
-                                String month = String.format("%02d", now.getMonthValue());
250
-                                String day = String.format("%02d", now.getDayOfMonth());
251
-                                String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
252
-                                String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
253
-                                String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
254
-                                String savePath = "/home/ruoyi/uploadPath/upload/";
255
-                                // 创建日期目录
256
-                                File saveFolder = new File(saveFolderPath);
257
-                                if (!saveFolder.exists()) {
258
-                                    saveFolder.mkdirs();
259
-                                }
260
-                                String resultFilePath = saveFolderPath + "/" + fileName;
261
-                                File resultFilePathFile = new File(resultFilePath);
262
-                                if (!resultFilePathFile.exists()) {
263
-                                    resultFilePathFile.createNewFile();
264
-                                }
265
-                                boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
266
-                                if (downLoadFile) {
267
-                                    CaseAttach caseAttach = new CaseAttach();
268
-                                    caseAttach.setAnnexType(10);  //10代表印章图片
269
-                                    caseAttach.setAnnexPath(savePath);
270
-                                    caseAttach.setAnnexName(saveName);
271
-                                    int i1 = caseAttachMapper.save(caseAttach);
272
-                                    if (i1 > 0) {
273
-                                        //将附件id保存到公章管理表里
274
-                                        Integer annexId1 = caseAttach.getAnnexId();
275
-                                        identify.setAnnexId(annexId1);
276
-                                        deptIdentifyMapper.updateDeptIdentify(identify);
275
+                    Integer annexId = sealManage1.getAnnexId();
276
+                    String sealId = sealManage1.getSealId();
277
+                    DeptIdentify deptIdentify = new DeptIdentify();
278
+                    deptIdentify.setId(sealManage1.getIdentifyId());
279
+                    List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
280
+                    if (deptIdentifies != null && deptIdentifies.size() > 0) {
281
+                        DeptIdentify deptIdentify1 = deptIdentifies.get(0);
282
+                        String orgId = deptIdentify1.getOrgId();
283
+                        if (orgId == null) {
284
+                            continue;
285
+                        }
286
+                        if (annexId == null) {
287
+                            //说明之前没有下载过
288
+                            EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
289
+                            JSONObject jsonObject = JSONObject.parseObject(response.getBody());
290
+                            int code = jsonObject.getIntValue("code");
291
+                            if (code == 0) {
292
+                                JSONObject data = jsonObject.getJSONObject("data");
293
+                                int sealStatus = data.getIntValue("sealStatus");
294
+                                if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
295
+                                    //已启用证明审核通过,下载到数据库
296
+                                    String sealImageDownloadUrl = data.getString("sealImageDownloadUrl  ");
297
+                                    LocalDate now = LocalDate.now();
298
+                                    String year = Integer.toString(now.getYear());
299
+                                    String month = String.format("%02d", now.getMonthValue());
300
+                                    String day = String.format("%02d", now.getDayOfMonth());
301
+                                    String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
302
+                                    String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
303
+                                    String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
304
+                                    String savePath = "/home/ruoyi/uploadPath/upload/";
305
+                                    // 创建日期目录
306
+                                    File saveFolder = new File(saveFolderPath);
307
+                                    if (!saveFolder.exists()) {
308
+                                        saveFolder.mkdirs();
309
+                                    }
310
+                                    String resultFilePath = saveFolderPath + "/" + fileName;
311
+                                    File resultFilePathFile = new File(resultFilePath);
312
+                                    if (!resultFilePathFile.exists()) {
313
+                                        resultFilePathFile.createNewFile();
314
+                                    }
315
+                                    boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
316
+                                    if (downLoadFile) {
317
+                                        CaseAttach caseAttach = new CaseAttach();
318
+                                        caseAttach.setAnnexType(10);  //10代表印章图片
319
+                                        caseAttach.setAnnexPath(savePath);
320
+                                        caseAttach.setAnnexName(saveName);
321
+                                        int i1 = caseAttachMapper.save(caseAttach);
322
+                                        if (i1 > 0) {
323
+                                            //将附件id保存到公章管理表里
324
+                                            Integer annexId1 = caseAttach.getAnnexId();
325
+                                            sealManage1.setAnnexId(annexId1);
326
+                                            sealManageMapper.updateSealManage(sealManage1);
327
+                                        }
277
                                     }
328
                                     }
278
                                 }
329
                                 }
279
                             }
330
                             }
280
                         }
331
                         }
281
                     }
332
                     }
333
+
282
                 }
334
                 }
283
             }
335
             }
284
         } catch (EsignDemoException e) {
336
         } catch (EsignDemoException e) {
288
         }
340
         }
289
     }
341
     }
290
 
342
 
291
-   /* public static void main(String[] args) throws Exception {
292
-        Gson gson = new Gson();
293
-        SealSignRecord sealSignRecord = new SealSignRecord();
294
-        sealSignRecord.setCaseAppliId(1350L);
295
-        sealSignRecord.setSignFlowid("24ca7172f1a242238937d952c2e7fbff");
296
-        EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
297
-        JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(), JsonObject.class);
298
-        JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
299
-        JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
300
-        Integer psnsignStatus = null;
301
-        Integer orgsignStatus = null;
302
-
303
-        for (int j = 0; j < signersArray.size(); j++) {
304
-            JsonObject signerObject = (JsonObject) signersArray.get(j);
305
-
306
-            if (!(signerObject.get("psnSigner").toString()).equals("null")) {
307
-                JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
308
-                if (psnSignerData != null) {
309
-                    psnsignStatus = signerObject.get("signStatus").getAsInt();
310
-                }
311
-            }
312
-            if (!(signerObject.get("orgSigner").toString()).equals("null")) {
313
-                JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
314
-                if (orgSignerData != null) {
315
-                    orgsignStatus = signerObject.get("signStatus").getAsInt();
316
-                }
317
-            }
318
-
319
-        }
320
-
321
-        if ((psnsignStatus.intValue() == 2) && (orgsignStatus.intValue() == 2)) {
322
-
323
-            //下载审核完成的裁决书,
324
-            String signFlowId = "24ca7172f1a242238937d952c2e7fbff";
325
-            EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
326
-            JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
327
-            JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
328
-            JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
329
-            if (filesArray != null && filesArray.size() > 0) {
330
-                JsonObject fileObject = (JsonObject) filesArray.get(0);
331
-                String fileDownloadUrl = fileObject.get("downloadUrl").toString();
332
-                System.out.println(fileDownloadUrl);
333
-                String filearbitraUrl = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
334
-                System.out.println(filearbitraUrl);
335
-                LocalDate now = LocalDate.now();
336
-                String year = Integer.toString(now.getYear());
337
-                String month = String.format("%02d", now.getMonthValue());
338
-                String day = String.format("%02d", now.getDayOfMonth());
339
-                String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
340
-                String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
341
-                String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
342
-                String savePath = "/home/ruoyi/uploadPath/upload/";
343
-
344
-                // 创建日期目录
345
-                File saveFolder = new File(saveFolderPath);
346
-                if (!saveFolder.exists()) {
347
-                    saveFolder.mkdirs();
348
-                }
349
-                String resultFilePath = saveFolderPath + "/" + fileName;
350
-                File resultFilePathFile = new File(resultFilePath);
351
-                if (!resultFilePathFile.exists()) {
352
-                    resultFilePathFile.createNewFile();
353
-                }
354
-
355
-                String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
356
-                boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
357
-                if (downLoadFile) {
358
-                    System.out.println("chenggong  ===============");
359
-                }
360
-            }
361
-        }
362
-    }*/
363
-
364
 }
343
 }
365
 
344
 
366
 
345
 

+ 30
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/ImageToBase64Converter.java 파일 보기

1
+package com.ruoyi.wisdomarbitrate.utils;
2
+
3
+import java.io.BufferedInputStream;
4
+import java.io.FileOutputStream;
5
+import java.io.IOException;
6
+import java.io.InputStream;
7
+import java.net.URL;
8
+import java.nio.file.Files;
9
+import java.nio.file.Path;
10
+import java.nio.file.Paths;
11
+import java.util.Base64;
12
+
13
+public class ImageToBase64Converter {
14
+    public static String imageToBase64(String imagePath) throws Exception {
15
+        Path path = Paths.get(imagePath);
16
+        byte[] imageBytes = Files.readAllBytes(path);
17
+        String base64Image = Base64.getEncoder().encodeToString(imageBytes);
18
+        return base64Image;
19
+    }
20
+
21
+    public static void main(String[] args) {
22
+        String imagePath = "D:\\develop\\2.jpg";
23
+        try {
24
+            String base64Image = imageToBase64(imagePath);
25
+            System.out.println(base64Image);
26
+        } catch (Exception e) {
27
+            e.printStackTrace();
28
+        }
29
+    }
30
+}

+ 0
- 37
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/MyTest.java 파일 보기

1
-package com.ruoyi.wisdomarbitrate.utils;
2
-
3
-import java.io.BufferedInputStream;
4
-import java.io.FileOutputStream;
5
-import java.io.IOException;
6
-import java.io.InputStream;
7
-import java.net.URL;
8
-
9
-public class MyTest {
10
-    public static void download(String fileUrl, String saveFilePath) throws IOException {
11
-        URL url = new URL(fileUrl);
12
-        InputStream inputStream = url.openStream();
13
-        BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
14
-        FileOutputStream fileOutputStream = new FileOutputStream(saveFilePath);
15
-
16
-        byte[] buffer = new byte[1024];
17
-        int bytesRead = 0;
18
-        while ((bytesRead = bufferedInputStream.read(buffer, 0, buffer.length)) != -1) {
19
-            fileOutputStream.write(buffer, 0, bytesRead);
20
-        }
21
-
22
-        fileOutputStream.close();
23
-        bufferedInputStream.close();
24
-        inputStream.close();
25
-    }
26
-
27
-    public static void main(String[] args) {
28
-        String fileUrl = "https://esignoss.esign.cn/1111563786/0e16cc53-fe2e-403b-b901-587778a8ea92/3ed8f1b0bd2640e895fcfbaffdec0a1e.pdf?Expires=1698742492&OSSAccessKeyId=LTAI4G23YViiKnxTC28ygQzF&Signature=K%2Bb5k7DqNmaxeu%2Fct5qis4qor7s%3D";
29
-        String saveFilePath = "D:\\home\\example.pdf";
30
-        try {
31
-            download(fileUrl, saveFilePath);
32
-            System.out.println("File downloaded successfully.");
33
-        } catch (IOException e) {
34
-            e.printStackTrace();
35
-        }
36
-    }
37
-}

+ 16
- 35
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java 파일 보기

18
 import java.util.Date;
18
 import java.util.Date;
19
 import java.util.List;
19
 import java.util.List;
20
 import java.util.Map;
20
 import java.util.Map;
21
+import java.util.UUID;
21
 
22
 
22
 public class SignAward {
23
 public class SignAward {
23
 
24
 
119
 
120
 
120
 //        System.out.println(signFlowDetailJsonObject);
121
 //        System.out.println(signFlowDetailJsonObject);
121
 
122
 
122
-        DeptIdentify deptIdentify = new DeptIdentify();
123
-        deptIdentify.setOrgId("db279dd50d844e6fa64770d9a6edc7dd");
124
-        EsignHttpResponse orgByImage = createOrgByImage(deptIdentify, "D:\\develop\\2.jpg");
125
-        System.out.println("这是结果===============" + orgByImage);
123
+
126
     }
124
     }
127
 
125
 
128
 
126
 
150
      * @return
148
      * @return
151
      * @throws EsignDemoException
149
      * @throws EsignDemoException
152
      */
150
      */
153
-    public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
151
+    public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord ,List<String> sealIdList) throws EsignDemoException {
154
         String apiaddr = "/v3/sign-flow/create-by-file";
152
         String apiaddr = "/v3/sign-flow/create-by-file";
155
 
153
 
156
         String fileId = sealSignRecord.getFileid();
154
         String fileId = sealSignRecord.getFileid();
248
                 "                        \"autoSign\": false,\n" +
246
                 "                        \"autoSign\": false,\n" +
249
                 "                        \"freeMode\": false,\n" +
247
                 "                        \"freeMode\": false,\n" +
250
 
248
 
251
-                "                        \"availableSealIds\": [\n" +
249
+             /*       "                        \"availableSealIds\": [\n" +
252
                 "                               \"" + availableSealId + "\"\n" +
250
                 "                               \"" + availableSealId + "\"\n" +
253
-                "                           ],\n" +
254
-
251
+                "                           ],\n" +*/
252
+                "                               \"availableSealIds\": " + new Gson().toJson(sealIdList) + "\n" +
255
 
253
 
256
                 "                        \"signFieldPosition\": {\n" +
254
                 "                        \"signFieldPosition\": {\n" +
257
                 "                            \"positionPage\": \"" + positionPageorg + "\",\n" +
255
                 "                            \"positionPage\": \"" + positionPageorg + "\",\n" +
343
      */
341
      */
344
     public static EsignHttpResponse deptIdentifyUrl(DeptIdentify deptIdentify) throws EsignDemoException {
342
     public static EsignHttpResponse deptIdentifyUrl(DeptIdentify deptIdentify) throws EsignDemoException {
345
         String apiaddr = "/v3/org-auth-url";
343
         String apiaddr = "/v3/org-auth-url";
346
-        String nickName = deptIdentify.getNickName();
347
-        String phonenumber = deptIdentify.getPhonenumber();
348
-        String deptName = deptIdentify.getDeptName();
344
+        String psnName = deptIdentify.getOperName();
345
+        String phonenumber = deptIdentify.getOperPhone();
346
+        String orgName = deptIdentify.getIdentifyName();
349
         String jsonParm = "{\n" +
347
         String jsonParm = "{\n" +
350
                 "    \"orgAuthConfig\": {\n" +
348
                 "    \"orgAuthConfig\": {\n" +
351
-                "        \"orgName\": \"" + deptName + " \",\n" +
349
+                "        \"orgName\": \"" + orgName + " \",\n" +
352
                 "        \"transactorInfo\": {\n" +
350
                 "        \"transactorInfo\": {\n" +
353
                 "            \"psnAccount\": \"" + phonenumber + "\",\n" +
351
                 "            \"psnAccount\": \"" + phonenumber + "\",\n" +
354
                 "            \"psnInfo\": {\n" +
352
                 "            \"psnInfo\": {\n" +
355
-                "                \"psnName\": \"" + nickName + "\",\n" +
353
+                "                \"psnName\": \"" + psnName + "\",\n" +
356
                 "                 \"psnMobile\": \"" + phonenumber + "\"\n" +
354
                 "                 \"psnMobile\": \"" + phonenumber + "\"\n" +
357
                 "            }\n" +
355
                 "            }\n" +
358
                 "        }\n" +
356
                 "        }\n" +
381
      * 查询企业认证状态
379
      * 查询企业认证状态
382
      */
380
      */
383
     public static EsignHttpResponse getDeptIdentifyInfo(DeptIdentify deptIdentify) throws EsignDemoException {
381
     public static EsignHttpResponse getDeptIdentifyInfo(DeptIdentify deptIdentify) throws EsignDemoException {
384
-        String apiaddr = "/v3/organizations/identity-info?orgName=" + deptIdentify.getDeptName();
382
+        String apiaddr = "/v3/organizations/identity-info?orgName=" + deptIdentify.getIdentifyName();
385
 
383
 
386
         String jsonParm = "{}";
384
         String jsonParm = "{}";
387
         //请求方法
385
         //请求方法
392
         return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
390
         return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
393
     }
391
     }
394
 
392
 
393
+
395
     /**
394
     /**
396
-     * 查询企业认证印章信息
395
+     * 查询企业内部印章
397
      */
396
      */
398
     public static EsignHttpResponse deptIdentifySealList(String orgId) throws EsignDemoException {
397
     public static EsignHttpResponse deptIdentifySealList(String orgId) throws EsignDemoException {
399
         int pageNum = 1;
398
         int pageNum = 1;
437
      *
436
      *
438
      * @return
437
      * @return
439
      */
438
      */
440
-    public static EsignHttpResponse createOrgByImage(DeptIdentify deptIdentify, String filePath) throws EsignDemoException {
439
+    public static EsignHttpResponse createOrgByImage(DeptIdentify deptIdentify,String sealName, String filePath) throws EsignDemoException {
441
         String apiaddr = "/v3/seals/org-seals/create-by-image";
440
         String apiaddr = "/v3/seals/org-seals/create-by-image";
442
         String orgId = deptIdentify.getOrgId();
441
         String orgId = deptIdentify.getOrgId();
443
         //上传印章图片
442
         //上传印章图片
452
         if (errCode == 0) {  //业务码,0表示成功,非0表示异常。
451
         if (errCode == 0) {  //业务码,0表示成功,非0表示异常。
453
             //获取步骤一里面的fileKey
452
             //获取步骤一里面的fileKey
454
             String sealImageFileKey = jsonObject1.getJSONObject("data").getString("fileKey");
453
             String sealImageFileKey = jsonObject1.getJSONObject("data").getString("fileKey");
455
-            String sealName = deptIdentify.getSealName();
454
+
456
             //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
455
             //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
457
             String jsonParm = "{\n" +
456
             String jsonParm = "{\n" +
458
                     "  \"orgId\": \"" + orgId + "\",\n" +
457
                     "  \"orgId\": \"" + orgId + "\",\n" +
473
         return null;
472
         return null;
474
     }
473
     }
475
 
474
 
476
-    /**
477
-     * 查询企业内部印章
478
-     */
479
 
475
 
480
-    public static EsignHttpResponse orgOwnSealList(DeptIdentify deptIdentify) throws EsignDemoException {
481
-        String orgId = deptIdentify.getOrgId();
482
-        int pageNum = 1;
483
-        int pageSize = 20;
484
 
476
 
485
-        String apiaddr = "/v3/seals/org-own-seal-list?orgId=" + orgId + "&pageNum=" + pageNum + "&pageSize=" + pageSize;
486
-
487
-        //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
488
-        String jsonParm = null;
489
-        //请求方法
490
-        EsignRequestType requestType = EsignRequestType.GET;
491
-        //生成签名鉴权方式的的header
492
-        Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
493
-        //发起接口请求
494
-        return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
495
-    }
496
 
477
 
497
     /**
478
     /**
498
      * 查询指定印章详情(机构)
479
      * 查询指定印章详情(机构)

+ 28
- 70
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml 파일 보기

5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper">
6
     <resultMap type="DeptIdentify" id="DeptIdentifyResult">
6
     <resultMap type="DeptIdentify" id="DeptIdentifyResult">
7
         <id     property="id"       column="id"      />
7
         <id     property="id"       column="id"      />
8
-        <result property="deptId"       column="dept_id"      />
9
-        <result property="userId"     column="user_id"    />
10
         <result property="identifyStatus"     column="identify_status"    />
8
         <result property="identifyStatus"     column="identify_status"    />
11
         <result property="identifyDate"        column="identify_date"        />
9
         <result property="identifyDate"        column="identify_date"        />
12
         <result property="isUse"  column="is_use"  />
10
         <result property="isUse"  column="is_use"  />
13
-        <result property="nickName"          column="nick_name"          />
14
-        <result property="phonenumber"       column="phonenumber"       />
15
-        <result property="deptName"     column="dept_name"     />
16
-        <result property="sealName"     column="seal_name"     />
17
         <result property="orgId"     column="org_id"     />
11
         <result property="orgId"     column="org_id"     />
18
         <result property="authFlowId"     column="auth_flow_id"     />
12
         <result property="authFlowId"     column="auth_flow_id"     />
19
-        <result property="sealId"     column="seal_id"     />
20
-        <result property="sealStatus"     column="seal_status"     />
13
+        <result property="identifyName"     column="identify_name"     />
14
+        <result property="operName"     column="oper_name"     />
15
+        <result property="operPhone"     column="oper_phone"     />
21
 
16
 
22
     </resultMap>
17
     </resultMap>
23
 
18
 
24
 
19
 
25
     <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
20
     <select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
26
-        SELECT  ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
27
-        FROM  (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
28
-        FROM sys_user_post up left join sys_user  u on u.user_id  = up.user_id
29
-            left join  sys_post  sp on up.post_id  = sp.post_id
30
-        where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
31
-        WHERE d.dept_type  = 1
32
-    </select>
33
-
34
-    <select id="selectDeptIdentifyBydeptid" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
35
-        SELECT d.*
36
-        from dept_identify d
21
+        SELECT  id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
22
+                oper_name,oper_phone,identify_type
23
+        FROM  dept_identify
37
         <where>
24
         <where>
38
-            <if test="deptId != null">
39
-                AND d.dept_id = #{deptId}
25
+            <if test="id != null">
26
+                AND id = #{id}
40
             </if>
27
             </if>
41
-            <if test="userId != null">
42
-                AND d.user_id = #{userId}
28
+            <if test="identifyStatus != null">
29
+                AND identify_status = #{identifyStatus}
43
             </if>
30
             </if>
44
-            <if test="id != null">
45
-                AND d.id = #{id}
31
+            <if test="isUse != null">
32
+                AND is_use = #{isUse}
33
+            </if>
34
+            <if test="identifyName != null  and identifyName != ''">
35
+                AND identify_name = #{identifyName}
46
             </if>
36
             </if>
37
+            <if test="operName != null  and operName != ''">
38
+                AND oper_name = #{operName}
39
+            </if>
40
+            <if test="operPhone != null  and operPhone != ''">
41
+                AND oper_phone = #{operPhone}
42
+            </if>
43
+            AND identify_type = 1
47
         </where>
44
         </where>
48
     </select>
45
     </select>
49
 
46
 
47
+
50
     <insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
48
     <insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
51
         insert into dept_identify(
49
         insert into dept_identify(
52
         <if test="deptId != null">dept_id,</if>
50
         <if test="deptId != null">dept_id,</if>
54
         <if test="identifyStatus != null">identify_status,</if>
52
         <if test="identifyStatus != null">identify_status,</if>
55
         <if test="identifyDate != null">identify_date,</if>
53
         <if test="identifyDate != null">identify_date,</if>
56
         <if test="isUse != null">is_use,</if>
54
         <if test="isUse != null">is_use,</if>
57
-        <if test="sealName != null and sealName != ''">seal_name,</if>
58
         <if test="orgId != null and orgId != ''">org_id,</if>
55
         <if test="orgId != null and orgId != ''">org_id,</if>
59
-        <if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
60
-        <if test="sealId != null and sealId != ''">seal_id</if>
56
+        <if test="authFlowId != null and authFlowId != ''">auth_flow_id</if>
61
         )values(
57
         )values(
62
         <if test="deptId != null">#{deptId},</if>
58
         <if test="deptId != null">#{deptId},</if>
63
         <if test="userId != null">#{userId},</if>
59
         <if test="userId != null">#{userId},</if>
64
         <if test="identifyStatus != null">#{identifyStatus},</if>
60
         <if test="identifyStatus != null">#{identifyStatus},</if>
65
         <if test="identifyDate != null">#{identifyDate},</if>
61
         <if test="identifyDate != null">#{identifyDate},</if>
66
         <if test="isUse != null">#{isUse},</if>
62
         <if test="isUse != null">#{isUse},</if>
67
-        <if test="sealName != null and sealName != ''">#{sealName},</if>
68
         <if test="orgId != null and orgId != ''">#{orgId},</if>
63
         <if test="orgId != null and orgId != ''">#{orgId},</if>
69
-        <if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
70
-        <if test="sealId != null and sealId != ''">#{sealId}</if>
64
+        <if test="authFlowId != null and authFlowId != '' ">#{authFlowId}</if>
71
         )
65
         )
72
     </insert>
66
     </insert>
73
 
67
 
74
-    <select id="selectDeptIdentifylist" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
75
-        SELECT  d.id ,d.dept_id ,d.user_id, d.identify_status ,d.identify_date ,d.is_use , d.seal_name,
76
-               d.org_id , d.seal_id ,sd.dept_name , u.nick_name ,u.phonenumber
77
-        from dept_identify d left join sys_dept sd on d.dept_id  = sd.dept_id
78
-        left join sys_user u on u.user_id  = d.user_id
79
-        <where>
80
-            <if test="identifyStatus != null">
81
-                AND d.identify_status = #{identifyStatus}
82
-            </if>
83
-            <if test="isUse != null">
84
-                AND d.is_use = #{isUse}
85
-            </if>
86
-            <if test="id != null">
87
-                AND d.id = #{id}
88
-            </if>
89
-        </where>
90
-    </select>
91
 
68
 
92
-    <select id="selectDeptIdentifylistother" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
93
-        SELECT d.id ,d.dept_id ,d.user_id,d.identify_status ,d.is_use ,d.seal_name ,d.seal_id ,d.annex_id
94
-        from dept_identify d
95
-        <where>
96
-            <if test="identifyStatus != null">
97
-                AND d.identify_status = #{identifyStatus}
98
-            </if>
99
-            <if test="id != null">
100
-                AND d.id = #{id}
101
-            </if>
102
-            <if test="sealStatus != null">
103
-                AND d.seal_status = #{sealStatus}
104
-            </if>
105
-            <if test="deptId != null">
106
-                AND d.dept_id = #{deptId}
107
-            </if>
108
-        </where>
109
-    </select>
69
+
70
+
110
 
71
 
111
 
72
 
112
     <update id="updateDeptIdentify" parameterType="DeptIdentify">
73
     <update id="updateDeptIdentify" parameterType="DeptIdentify">
115
             <if test="identifyDate != null">identify_date = #{identifyDate},</if>
76
             <if test="identifyDate != null">identify_date = #{identifyDate},</if>
116
             <if test="isUse != null">is_use = #{isUse},</if>
77
             <if test="isUse != null">is_use = #{isUse},</if>
117
             <if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
78
             <if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
118
-            <if test="sealName != null  and sealName != ''">seal_name = #{sealName},</if>
119
             <if test="orgId != null  and orgId != ''">org_id = #{orgId},</if>
79
             <if test="orgId != null  and orgId != ''">org_id = #{orgId},</if>
120
-            <if test="sealId != null  and sealId != ''">seal_id = #{sealId},</if>
121
-            <if test="sealStatus != null ">seal_status = #{sealStatus},</if>
122
-            <if test="authFlowId != null  and authFlowId != '' ">auth_flow_id = #{authFlowId},</if>
80
+            <if test="authFlowId != null  and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
123
         </set>
81
         </set>
124
         <where>
82
         <where>
125
             <if test="id != null">
83
             <if test="id != null">

+ 61
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealManageMapper.xml 파일 보기

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealManageMapper">
6
+    <resultMap type="SealManage" id="SealManageResult">
7
+        <id     property="id"       column="id"      />
8
+        <result property="identifyId"     column="identify_id"    />
9
+        <result property="sealName"        column="seal_name"        />
10
+        <result property="sealId"  column="seal_id"  />
11
+        <result property="annexId"     column="annex_id"     />
12
+        <result property="sealStatus"     column="seal_status"     />
13
+    </resultMap>
14
+
15
+    <select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
16
+        SELECT  id, identify_id ,seal_name , seal_id,annex_id,seal_status
17
+        FROM  seal_manage
18
+        <where>
19
+            <if test="identifyId != null">
20
+                AND identify_id = #{identifyId}
21
+            </if>
22
+            <if test="sealStatus != null">
23
+                AND seal_status = #{sealStatus}
24
+            </if>
25
+        </where>
26
+    </select>
27
+
28
+
29
+    <insert id="insertSealManage" parameterType="SealManage" useGeneratedKeys="true" keyProperty="id">
30
+        insert into seal_manage(
31
+        <if test="identifyId != null">identify_id,</if>
32
+        <if test="sealName != null and sealName != ''">seal_name,</if>
33
+        <if test="sealId != null and sealId != ''">seal_id,</if>
34
+        <if test="annexId != null">annex_id,</if>
35
+        <if test="sealStatus != null">seal_status</if>
36
+        )values(
37
+        <if test="identifyId != null">#{identifyId},</if>
38
+        <if test="sealName != null and sealName != ''">#{sealName},</if>
39
+        <if test="sealId != null and sealId != ''">#{sealId},</if>
40
+        <if test="annexId != null">#{annexId},</if>
41
+        <if test="sealStatus != null">#{sealStatus}</if>
42
+        )
43
+    </insert>
44
+
45
+    <update id="updateSealManage" parameterType="SealManage">
46
+        update dept_identify
47
+        <set>
48
+            <if test="identifyId != null">identify_id = #{identifyId},</if>
49
+            <if test="sealName != null">seal_name = #{sealName},</if>
50
+            <if test="sealId != null ">seal_id = #{sealId},</if>
51
+            <if test="annexId != null ">annex_id = #{annexId},</if>
52
+            <if test="sealStatus != null   ">seal_status = #{sealStatus}</if>
53
+        </set>
54
+        <where>
55
+            <if test="id != null">
56
+                AND id = #{id}
57
+            </if>
58
+
59
+        </where>
60
+    </update>
61
+</mapper>