Przeglądaj źródła

修复公章管理

hejinbo 2 lat temu
rodzic
commit
c644fb3142

+ 13
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java Wyświetl plik

84
      * @return
84
      * @return
85
      */
85
      */
86
     @GetMapping("/sealList")
86
     @GetMapping("/sealList")
87
-    public TableDataInfo getSealList(DeptIdentify deptIdentify){
87
+    public TableDataInfo getSealList( DeptIdentify deptIdentify){
88
         startPage();
88
         startPage();
89
         List<SealListVO> list = deptIdentifyService.getSealList(deptIdentify);
89
         List<SealListVO> list = deptIdentifyService.getSealList(deptIdentify);
90
         return getDataTable(list);
90
         return getDataTable(list);
97
      */
97
      */
98
     @PostMapping("/updateSealLockStatus")
98
     @PostMapping("/updateSealLockStatus")
99
     public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
99
     public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
100
-        if(sealManage.getId()==null ||sealManage.getSealStatus()==null){
100
+        if(sealManage.getId()==null ||sealManage.getIsUse()==null){
101
             return error("参数校验失败");
101
             return error("参数校验失败");
102
         }
102
         }
103
         return deptIdentifyService.updateSealLockStatus(sealManage);
103
         return deptIdentifyService.updateSealLockStatus(sealManage);
104
     }
104
     }
105
+
106
+//    /**
107
+//     * 新增模板
108
+//     * @param deptIdentify
109
+//     * @return
110
+//     */
111
+//    @PostMapping("/insert")
112
+//    public AjaxResult insertDeptIdentify(@RequestBody DeptIdentify deptIdentify){
113
+//        return deptIdentifyService.insertDeptIdentify(deptIdentify);
114
+//    }
115
+
105
 }
116
 }

+ 5
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealManage.java Wyświetl plik

32
     private Integer annexId;
32
     private Integer annexId;
33
 
33
 
34
     /**
34
     /**
35
-     * 印章状态(0禁用,1启用)
35
+     * 印章审核状态(0未通过,1通过)
36
      */
36
      */
37
     private Integer sealStatus;
37
     private Integer sealStatus;
38
+    /**
39
+     * 印章使用状态(0禁用,1启用)
40
+     */
41
+    private  Integer isUse;
38
 }
42
 }

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

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 TemplateManage 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 temName;
23
+
24
+    /**
25
+     * 模板类型(1裁决书)
26
+     */
27
+    private Integer temType;
28
+    /**
29
+     * 模板格式
30
+     */
31
+    private String temFormat;
32
+
33
+    /**
34
+     * 原模板路径
35
+     */
36
+    private String temOrigPath;
37
+    /**
38
+     * 修订后模板路径
39
+     */
40
+    private String temRevisPath;
41
+    /**
42
+     * 删除标志(0代表存在 2代表删除)
43
+     */
44
+    private Integer delFlag;
45
+}

+ 5
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/SealListVO.java Wyświetl plik

9
     /** 印章名称 */
9
     /** 印章名称 */
10
     private String sealName;
10
     private String sealName;
11
     /**
11
     /**
12
-     * 印章状态  0禁用,1启用
12
+     * 印章审核状态(0未通过,1通过)
13
      */
13
      */
14
     private Integer sealStatus;
14
     private Integer sealStatus;
15
+    /**
16
+     * 印章使用状态(0禁用,1启用)
17
+     */
18
+    private  Integer isUse;
15
     /**
19
     /**
16
      * 附件id
20
      * 附件id
17
      */
21
      */

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

119
 
119
 
120
     // 手机号正则
120
     // 手机号正则
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}$");
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}$");
122
-   // 邮箱正则
122
+    // 邮箱正则
123
     private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
123
     private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
124
 
124
 
125
 
125
 
1418
         }
1418
         }
1419
         if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1419
         if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1420
             failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1420
             failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1421
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
1421
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
1422
 
1422
 
1423
             failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1423
             failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1424
         }
1424
         }
1524
         }
1524
         }
1525
         if (StrUtil.isEmpty(caseApplication.getEmail())) {
1525
         if (StrUtil.isEmpty(caseApplication.getEmail())) {
1526
             failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1526
             failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1527
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
1527
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
1528
 
1528
 
1529
             failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1529
             failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1530
         }
1530
         }
1687
                     for (CaseAttach caseAttach : caseAttachList) {
1687
                     for (CaseAttach caseAttach : caseAttachList) {
1688
                         if (caseAttach.getAnnexType() == 3) {
1688
                         if (caseAttach.getAnnexType() == 3) {
1689
                             String annexPath = caseAttach.getAnnexPath();
1689
                             String annexPath = caseAttach.getAnnexPath();
1690
-                            String path = "/home/ruoyi/" + annexPath;
1691
-                            System.out.println("这是查询到的裁决书路径" + path);
1692
-                            //String path ="D:\\home\\仲裁裁决书模板.docx";
1690
+                            //String path = "/home/ruoyi" + annexPath;
1691
+                            // System.out.println("这是查询到的裁决书路径" + path);
1692
+                            String path = "D:\\home\\仲裁裁决书模板.docx";
1693
                             //获取文件上传地址
1693
                             //获取文件上传地址
1694
                             EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
1694
                             EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
1695
                             String body = response.getBody();
1695
                             String body = response.getBody();
1736
                                         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
1736
                                         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
1737
                                             deptIdentifyselect = deptIdentifysnew.get(0);
1737
                                             deptIdentifyselect = deptIdentifysnew.get(0);
1738
                                             sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
1738
                                             sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
1739
-                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperName());
1740
-                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperPhone());
1739
+                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperPhone());
1740
+                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperName());
1741
                                         } else {
1741
                                         } else {
1742
                                             return AjaxResult.error("没有用印时的机构名称及经办人信息");
1742
                                             return AjaxResult.error("没有用印时的机构名称及经办人信息");
1743
                                         }
1743
                                         }
1815
                                             if (selectSealList != null && selectSealList.size() > 0) {
1815
                                             if (selectSealList != null && selectSealList.size() > 0) {
1816
                                                 for (SealManage manage : selectSealList) {
1816
                                                 for (SealManage manage : selectSealList) {
1817
                                                     Integer sealStatus = manage.getSealStatus();
1817
                                                     Integer sealStatus = manage.getSealStatus();
1818
-                                                    if (sealStatus == 1){
1818
+                                                    if (sealStatus == 1) {
1819
                                                         sealIdList.add(manage.getSealId());
1819
                                                         sealIdList.add(manage.getSealId());
1820
                                                     }
1820
                                                     }
1821
                                                 }
1821
                                                 }
1822
-                                                EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord,sealIdList);
1822
+                                                EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
1823
+
1823
                                                 JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1824
                                                 JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1824
-                                                if (jsonObject3.getIntValue("code") == 0) {
1825
-                                                    //获取签署流程ID
1826
-                                                    JSONObject data1 = jsonObject3.getJSONObject("data");
1827
-                                                    String signFlowId = data1.getString("signFlowId");
1828
-                                                    //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1829
-                                                    sealSignRecord.setCaseAppliId(caseApplication.getId());
1830
-                                                    sealSignRecord.setSignFlowid(signFlowId);
1831
-                                                    sealSignRecord.setSignFlowStatus(1);//待签名
1832
-                                                    sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1833
-                                                } else {
1834
-                                                    throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1825
+                                                if (jsonObject3 != null){
1826
+                                                    if (jsonObject3.getIntValue("code") == 0) {
1827
+                                                        //获取签署流程ID
1828
+                                                        JSONObject data1 = jsonObject3.getJSONObject("data");
1829
+                                                        String signFlowId = data1.getString("signFlowId");
1830
+                                                        //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1831
+                                                        sealSignRecord.setCaseAppliId(caseApplication.getId());
1832
+                                                        sealSignRecord.setSignFlowid(signFlowId);
1833
+                                                        sealSignRecord.setSignFlowStatus(1);//待签名
1834
+                                                        sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1835
+                                                    } else {
1836
+                                                        throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1837
+                                                    }
1835
                                                 }
1838
                                                 }
1839
+                                                  return AjaxResult.error();
1836
                                             }
1840
                                             }
1837
 
1841
 
1838
 
1842
 
1843
+                                        } else {
1844
+                                            return AjaxResult.error();
1839
                                         }
1845
                                         }
1840
                                     }
1846
                                     }
1841
                                 }
1847
                                 }
2625
 
2631
 
2626
                     // 新增预约会议表
2632
                     // 新增预约会议表
2627
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2633
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2628
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2634
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
2629
                     reservedConferenceMapper.insert(conference);
2635
                     reservedConferenceMapper.insert(conference);
2630
                     return AjaxResult.success("预约会议成功");
2636
                     return AjaxResult.success("预约会议成功");
2631
 
2637
 
2653
         String roomId = generateRoomId();
2659
         String roomId = generateRoomId();
2654
         // 新增预约会议表
2660
         // 新增预约会议表
2655
         ReservedConference conference = new ReservedConference(caseId, roomId,
2661
         ReservedConference conference = new ReservedConference(caseId, roomId,
2656
-                null, null,0);
2662
+                null, null, 0);
2657
         reservedConferenceMapper.insert(conference);
2663
         reservedConferenceMapper.insert(conference);
2658
         return roomId;
2664
         return roomId;
2659
     }
2665
     }
2667
         // 查询最大房间号
2673
         // 查询最大房间号
2668
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2674
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2669
 
2675
 
2670
-        if (null == maxRoomId || maxRoomId >999999) {
2676
+        if (null == maxRoomId || maxRoomId > 999999) {
2671
             return "000001";
2677
             return "000001";
2672
         } else {
2678
         } else {
2673
             return String.format("%06d", maxRoomId);
2679
             return String.format("%06d", maxRoomId);
2715
     @Override
2721
     @Override
2716
     public AjaxResult deleteRoom(String roomId) {
2722
     public AjaxResult deleteRoom(String roomId) {
2717
 
2723
 
2718
-        return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
2724
+        return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
2719
     }
2725
     }
2720
 }
2726
 }
2721
 
2727
 

+ 6
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java Wyświetl plik

145
                             sealManage.setIdentifyId(identify.getId());
145
                             sealManage.setIdentifyId(identify.getId());
146
                             sealManage.setSealName(sealName);
146
                             sealManage.setSealName(sealName);
147
                             sealManage.setSealId(sealId);
147
                             sealManage.setSealId(sealId);
148
-                            sealManage.setSealStatus(0);  //默认为禁用
148
+                            sealManage.setSealStatus(0);  //默认为未审核
149
+                            sealManage.setIsUse(0);  //默认为禁用
149
                             int i = sealManageMapper.insertSealManage(sealManage);
150
                             int i = sealManageMapper.insertSealManage(sealManage);
150
                             if (i > 0) {
151
                             if (i > 0) {
151
                                 return AjaxResult.success("上传成功");
152
                                 return AjaxResult.success("上传成功");
256
         List<SealListVO> sealListVOS = new ArrayList<>();
257
         List<SealListVO> sealListVOS = new ArrayList<>();
257
         if (selectSealList != null && selectSealList.size() > 0) {
258
         if (selectSealList != null && selectSealList.size() > 0) {
258
             for (SealManage sealManage1 : selectSealList) {
259
             for (SealManage sealManage1 : selectSealList) {
259
-                Integer annexId = sealManage1.getAnnexId();
260
-                if (annexId != null) {   //附件id有值,证明是审核通过了的
260
+                Integer sealStatus = sealManage1.getSealStatus();
261
+                if (sealStatus == 1) {   //审核状态为启用
261
                     SealListVO sealListVO = new SealListVO();
262
                     SealListVO sealListVO = new SealListVO();
262
                     sealListVO.setSealId(sealManage1.getSealId());
263
                     sealListVO.setSealId(sealManage1.getSealId());
263
                     sealListVO.setSealName(sealManage1.getSealName());
264
                     sealListVO.setSealName(sealManage1.getSealName());
264
                     sealListVO.setSealStatus(sealManage1.getSealStatus());
265
                     sealListVO.setSealStatus(sealManage1.getSealStatus());
265
                     //根据附件id查询路径
266
                     //根据附件id查询路径
266
-                    CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
267
+                    CaseAttach caseAttach = caseAttachMapper.queryAnnexById(sealManage1.getAnnexId());
267
                     String annexName = caseAttach.getAnnexName();
268
                     String annexName = caseAttach.getAnnexName();
268
                     String prefix = "/profile";
269
                     String prefix = "/profile";
269
                     int startIndex = annexName.indexOf(prefix);
270
                     int startIndex = annexName.indexOf(prefix);
271
                     String annexPath = "/uploadPath" + annexName.substring(startIndex);
272
                     String annexPath = "/uploadPath" + annexName.substring(startIndex);
272
                     sealListVO.setAnnexPath(annexPath);
273
                     sealListVO.setAnnexPath(annexPath);
273
                     sealListVO.setAnnexType(caseAttach.getAnnexType());
274
                     sealListVO.setAnnexType(caseAttach.getAnnexType());
275
+                    sealListVO.setIsUse(sealManage1.getIsUse());
274
                     sealListVOS.add(sealListVO);
276
                     sealListVOS.add(sealListVO);
275
                 }
277
                 }
276
             }
278
             }

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

39
     private DeptIdentifyMapper deptIdentifyMapper;
39
     private DeptIdentifyMapper deptIdentifyMapper;
40
     @Autowired
40
     @Autowired
41
     private SealManageMapper sealManageMapper;
41
     private SealManageMapper sealManageMapper;
42
+
42
     /*
43
     /*
43
     定时查询签署流程详情
44
     定时查询签署流程详情
44
      */
45
      */
45
-    @Scheduled(cron = "0/10 * * * * ?")
46
+    //@Scheduled(cron = "0/10 * * * * ?")
46
     @Transactional
47
     @Transactional
47
     public void fixExecuteSelectFlowDetailUtils() {
48
     public void fixExecuteSelectFlowDetailUtils() {
48
         Gson gson = new Gson();
49
         Gson gson = new Gson();
173
 
174
 
174
     /**
175
     /**
175
      * 定时查询企业认证状态
176
      * 定时查询企业认证状态
177
+     *
176
      * @throws Exception
178
      * @throws Exception
177
      */
179
      */
178
-    @Scheduled(cron = "0 0/30 * * * ?")
180
+    //@Scheduled(cron = "*/30 * * * * *")
179
     @Transactional
181
     @Transactional
180
     public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
182
     public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
181
         Gson gson = new Gson();
183
         Gson gson = new Gson();
185
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
187
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
186
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
188
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
187
                 DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
189
                 DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
188
-                EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
189
-                JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
190
-                int code = identifyInfoJsonObject.get("code").getAsInt();
191
-                if (code == 0) {
192
-                    JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
193
-                    int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
194
-                    if (realnameStatus == 1) {
195
-                        String orgId = identifyInfoData.get("orgId").getAsString();
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);
190
+                String authFlowId = deptIdentify1.getAuthFlowId();
191
+                if (authFlowId != null) {
192
+                    EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
193
+                    JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
194
+                    int code = identifyInfoJsonObject.get("code").getAsInt();
195
+                    if (code == 0) {
196
+                        JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
197
+                        int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
198
+                        if (realnameStatus == 1) {
199
+                            String orgId = identifyInfoData.get("orgId").getAsString();
200
+                            //查询企业内部印章
201
+                            EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
202
+                            JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
203
+                            int code1 = jsonObject.get("code").getAsInt();
204
+                            if (code1 == 0) {
205
+                                JsonObject data = jsonObject.getAsJsonObject("data");
206
+                                JsonArray seals = data.get("seals").getAsJsonArray();
207
+                                if (seals.size() > 0) {
208
+                                    for (int j = 0; j < seals.size(); j++) {
209
+                                        //保存印章信息到数据库
210
+                                        JsonObject asJsonObject = seals.get(j).getAsJsonObject();
211
+                                        SealManage sealManage = new SealManage();
212
+                                        String sealName = asJsonObject.get("sealName").toString();
213
+                                        String sealId = asJsonObject.get("sealId").toString();
214
+                                        String url = asJsonObject.get("sealImageDownloadUrl").toString();
215
+                                        LocalDate now = LocalDate.now();
216
+                                        String year = Integer.toString(now.getYear());
217
+                                        String month = String.format("%02d", now.getMonthValue());
218
+                                        String day = String.format("%02d", now.getDayOfMonth());
219
+                                        String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
220
+                                        String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
221
+                                        String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
222
+                                        String savePath = "/home/ruoyi/uploadPath/upload/";
223
+                                        // 创建日期目录
224
+                                        File saveFolder = new File(saveFolderPath);
225
+                                        if (!saveFolder.exists()) {
226
+                                            saveFolder.mkdirs();
227
+                                        }
228
+                                        String resultFilePath = saveFolderPath + "/" + fileName;
229
+                                        File resultFilePathFile = new File(resultFilePath);
230
+                                        if (!resultFilePathFile.exists()) {
231
+                                            resultFilePathFile.createNewFile();
232
+                                        }
233
+                                        String fileDownloadUrlnew = url.substring(1, url.length() - 1);
234
+                                        boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
235
+                                        if (downLoadFile) {
236
+                                            CaseAttach caseAttach = new CaseAttach();
237
+                                            caseAttach.setAnnexType(10);  //10代表印章图片
238
+                                            caseAttach.setAnnexPath(savePath);
239
+                                            caseAttach.setAnnexName(saveName);
240
+                                            int i1 = caseAttachMapper.save(caseAttach);
241
+                                            if (i1 > 0) {
242
+                                                //将印章信息保存到公章管理表里
243
+                                                String sealName1 = sealName.substring(1, sealName.length() - 1);
244
+                                                String sealId1 = sealId.substring(1, sealId.length() - 1);
245
+                                                Integer annexId1 = caseAttach.getAnnexId();
246
+                                                sealManage.setAnnexId(annexId1);
247
+                                                sealManage.setSealId(sealId1);
248
+                                                sealManage.setSealName(sealName1);
249
+                                                sealManage.setIdentifyId(deptIdentify1.getId());
250
+                                                sealManage.setSealStatus(1);
251
+                                                sealManage.setIsUse(1);
252
+                                                sealManageMapper.insertSealManage(sealManage);
253
+                                            }
245
                                         }
254
                                         }
246
                                     }
255
                                     }
247
                                 }
256
                                 }
248
-                            }
249
 
257
 
258
+                            }
259
+                            //将orgId保存到数据库里
260
+                            deptIdentify1.setOrgId(orgId);
261
+                            deptIdentify1.setIdentifyStatus(1);
262
+                            deptIdentify1.setIsUse(0);  //默认机构为未启用
263
+                            int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
250
                         }
264
                         }
251
-                        //将orgId保存到数据库里
252
-                        deptIdentify1.setOrgId(orgId);
253
-                        deptIdentify1.setIdentifyStatus(1);
254
-                        deptIdentify1.setIsUse(0);  //默认机构为未启用
255
-                        int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
256
                     }
265
                     }
257
                 }
266
                 }
267
+
258
             }
268
             }
259
         }
269
         }
260
     }
270
     }
293
                                 int sealStatus = data.getIntValue("sealStatus");
303
                                 int sealStatus = data.getIntValue("sealStatus");
294
                                 if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
304
                                 if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
295
                                     //已启用证明审核通过,下载到数据库
305
                                     //已启用证明审核通过,下载到数据库
296
-                                    String sealImageDownloadUrl = data.getString("sealImageDownloadUrl  ");
306
+                                    String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
297
                                     LocalDate now = LocalDate.now();
307
                                     LocalDate now = LocalDate.now();
298
                                     String year = Integer.toString(now.getYear());
308
                                     String year = Integer.toString(now.getYear());
299
                                     String month = String.format("%02d", now.getMonthValue());
309
                                     String month = String.format("%02d", now.getMonthValue());
323
                                             //将附件id保存到公章管理表里
333
                                             //将附件id保存到公章管理表里
324
                                             Integer annexId1 = caseAttach.getAnnexId();
334
                                             Integer annexId1 = caseAttach.getAnnexId();
325
                                             sealManage1.setAnnexId(annexId1);
335
                                             sealManage1.setAnnexId(annexId1);
336
+                                            sealManage1.setSealStatus(1);
337
+                                            sealManage1.setIsUse(1);  //默认使用状态都是未启用
326
                                             sealManageMapper.updateSealManage(sealManage1);
338
                                             sealManageMapper.updateSealManage(sealManage1);
327
                                         }
339
                                         }
328
                                     }
340
                                     }

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

249
              /*       "                        \"availableSealIds\": [\n" +
249
              /*       "                        \"availableSealIds\": [\n" +
250
                 "                               \"" + availableSealId + "\"\n" +
250
                 "                               \"" + availableSealId + "\"\n" +
251
                 "                           ],\n" +*/
251
                 "                           ],\n" +*/
252
-                "                               \"availableSealIds\": " + new Gson().toJson(sealIdList) + "\n" +
252
+                "                               \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
253
 
253
 
254
                 "                        \"signFieldPosition\": {\n" +
254
                 "                        \"signFieldPosition\": {\n" +
255
                 "                            \"positionPage\": \"" + positionPageorg + "\",\n" +
255
                 "                            \"positionPage\": \"" + positionPageorg + "\",\n" +

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

63
             </if>
63
             </if>
64
         </where>
64
         </where>
65
     </select>
65
     </select>
66
-    <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach">
66
+    <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
67
         select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
67
         select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
68
         from case_attach
68
         from case_attach
69
         <where>
69
         <where>
80
         where annex_id = #{annexId}
80
         where annex_id = #{annexId}
81
     </update>
81
     </update>
82
 
82
 
83
-    <update id="updateCaseAttachBycaseid" parameterType="CaseAttach">
83
+    <update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
84
         update case_attach
84
         update case_attach
85
         <set>
85
         <set>
86
             <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
86
             <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>

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

55
         <if test="orgId != null and orgId != ''">org_id,</if>
55
         <if test="orgId != null and orgId != ''">org_id,</if>
56
         <if test="operName != null and operName != ''">oper_name,</if>
56
         <if test="operName != null and operName != ''">oper_name,</if>
57
         <if test="operPhone != null and operPhone != ''">oper_phone,</if>
57
         <if test="operPhone != null and operPhone != ''">oper_phone,</if>
58
-        <if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
59
         <if test="identifyType != null">identify_type</if>
58
         <if test="identifyType != null">identify_type</if>
59
+        <if test="authFlowId != null and authFlowId != ''">auth_flow_id</if>
60
+
60
         )values(
61
         )values(
61
         <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
62
         <if test="identifyName != null and identifyName != ''">#{identifyName},</if>
62
         <if test="identifyStatus != null">#{identifyStatus},</if>
63
         <if test="identifyStatus != null">#{identifyStatus},</if>
65
         <if test="orgId != null and orgId != ''">#{orgId},</if>
66
         <if test="orgId != null and orgId != ''">#{orgId},</if>
66
         <if test="operName != null and operName != ''">#{operName},</if>
67
         <if test="operName != null and operName != ''">#{operName},</if>
67
         <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
68
         <if test="operPhone != null and operPhone != ''">#{operPhone},</if>
68
-        <if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
69
         <if test="identifyType != null ">#{identifyType}</if>
69
         <if test="identifyType != null ">#{identifyType}</if>
70
+        <if test="authFlowId != null and authFlowId != '' ">#{authFlowId}</if>
70
         )
71
         )
71
     </insert>
72
     </insert>
72
 
73
 

+ 9
- 5
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealManageMapper.xml Wyświetl plik

10
         <result property="sealId"  column="seal_id"  />
10
         <result property="sealId"  column="seal_id"  />
11
         <result property="annexId"     column="annex_id"     />
11
         <result property="annexId"     column="annex_id"     />
12
         <result property="sealStatus"     column="seal_status"     />
12
         <result property="sealStatus"     column="seal_status"     />
13
+        <result property="isUse"     column="is_use"     />
13
     </resultMap>
14
     </resultMap>
14
 
15
 
15
     <select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
16
     <select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
16
-        SELECT  id, identify_id ,seal_name , seal_id,annex_id,seal_status
17
+        SELECT  id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
17
         FROM  seal_manage
18
         FROM  seal_manage
18
         <where>
19
         <where>
19
             <if test="identifyId != null">
20
             <if test="identifyId != null">
32
         <if test="sealName != null and sealName != ''">seal_name,</if>
33
         <if test="sealName != null and sealName != ''">seal_name,</if>
33
         <if test="sealId != null and sealId != ''">seal_id,</if>
34
         <if test="sealId != null and sealId != ''">seal_id,</if>
34
         <if test="annexId != null">annex_id,</if>
35
         <if test="annexId != null">annex_id,</if>
35
-        <if test="sealStatus != null">seal_status</if>
36
+        <if test="sealStatus != null">seal_status,</if>
37
+        <if test="isUse != null">is_use</if>
36
         )values(
38
         )values(
37
         <if test="identifyId != null">#{identifyId},</if>
39
         <if test="identifyId != null">#{identifyId},</if>
38
         <if test="sealName != null and sealName != ''">#{sealName},</if>
40
         <if test="sealName != null and sealName != ''">#{sealName},</if>
39
         <if test="sealId != null and sealId != ''">#{sealId},</if>
41
         <if test="sealId != null and sealId != ''">#{sealId},</if>
40
         <if test="annexId != null">#{annexId},</if>
42
         <if test="annexId != null">#{annexId},</if>
41
-        <if test="sealStatus != null">#{sealStatus}</if>
43
+        <if test="sealStatus != null">#{sealStatus},</if>
44
+        <if test="isUse != null">#{isUse}</if>
42
         )
45
         )
43
     </insert>
46
     </insert>
44
 
47
 
45
     <update id="updateSealManage" parameterType="SealManage">
48
     <update id="updateSealManage" parameterType="SealManage">
46
-        update dept_identify
49
+        update seal_manage
47
         <set>
50
         <set>
48
             <if test="identifyId != null">identify_id = #{identifyId},</if>
51
             <if test="identifyId != null">identify_id = #{identifyId},</if>
49
             <if test="sealName != null">seal_name = #{sealName},</if>
52
             <if test="sealName != null">seal_name = #{sealName},</if>
50
             <if test="sealId != null ">seal_id = #{sealId},</if>
53
             <if test="sealId != null ">seal_id = #{sealId},</if>
51
             <if test="annexId != null ">annex_id = #{annexId},</if>
54
             <if test="annexId != null ">annex_id = #{annexId},</if>
52
-            <if test="sealStatus != null   ">seal_status = #{sealStatus}</if>
55
+            <if test="sealStatus != null   ">seal_status = #{sealStatus},</if>
56
+            <if test="isUse != null   ">is_use = #{isUse}</if>
53
         </set>
57
         </set>
54
         <where>
58
         <where>
55
             <if test="id != null">
59
             <if test="id != null">