Просмотр исходного кода

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

hejinbo 2 лет назад
Родитель
Сommit
8bb2a6f327

+ 13
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java Просмотреть файл

@@ -84,7 +84,7 @@ public class DeptIdentifyController extends BaseController {
84 84
      * @return
85 85
      */
86 86
     @GetMapping("/sealList")
87
-    public TableDataInfo getSealList(DeptIdentify deptIdentify){
87
+    public TableDataInfo getSealList( DeptIdentify deptIdentify){
88 88
         startPage();
89 89
         List<SealListVO> list = deptIdentifyService.getSealList(deptIdentify);
90 90
         return getDataTable(list);
@@ -97,9 +97,20 @@ public class DeptIdentifyController extends BaseController {
97 97
      */
98 98
     @PostMapping("/updateSealLockStatus")
99 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 101
             return error("参数校验失败");
102 102
         }
103 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 Просмотреть файл

@@ -32,7 +32,11 @@ public class SealManage extends BaseEntity {
32 32
     private Integer annexId;
33 33
 
34 34
     /**
35
-     * 印章状态(0禁用,1启用)
35
+     * 印章审核状态(0未通过,1通过)
36 36
      */
37 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 Просмотреть файл

@@ -0,0 +1,45 @@
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 Просмотреть файл

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

+ 31
- 25
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

@@ -110,7 +110,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
110 110
 
111 111
     // 手机号正则
112 112
     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}$");
113
-   // 邮箱正则
113
+    // 邮箱正则
114 114
     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}$");
115 115
     // 身份证号码正则表达式
116 116
     private static final String ID_REGEX = "^(\\d{14}|\\d{17})(\\d|[Xx])$";
@@ -1456,7 +1456,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1456 1456
         }
1457 1457
         if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1458 1458
             failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1459
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
1459
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
1460 1460
 
1461 1461
             failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1462 1462
         }
@@ -1562,7 +1562,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1562 1562
         }
1563 1563
         if (StrUtil.isEmpty(caseApplication.getEmail())) {
1564 1564
             failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1565
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
1565
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
1566 1566
 
1567 1567
             failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1568 1568
         }
@@ -1725,9 +1725,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1725 1725
                     for (CaseAttach caseAttach : caseAttachList) {
1726 1726
                         if (caseAttach.getAnnexType() == 3) {
1727 1727
                             String annexPath = caseAttach.getAnnexPath();
1728
-                            String path = "/home/ruoyi/" + annexPath;
1729
-                            System.out.println("这是查询到的裁决书路径" + path);
1730
-                            //String path ="D:\\home\\仲裁裁决书模板.docx";
1728
+                            //String path = "/home/ruoyi" + annexPath;
1729
+                            // System.out.println("这是查询到的裁决书路径" + path);
1730
+                            String path = "D:\\home\\仲裁裁决书模板.docx";
1731 1731
                             //获取文件上传地址
1732 1732
                             EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
1733 1733
                             String body = response.getBody();
@@ -1774,8 +1774,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1774 1774
                                         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
1775 1775
                                             deptIdentifyselect = deptIdentifysnew.get(0);
1776 1776
                                             sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
1777
-                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperName());
1778
-                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperPhone());
1777
+                                            sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperPhone());
1778
+                                            sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperName());
1779 1779
                                         } else {
1780 1780
                                             return AjaxResult.error("没有用印时的机构名称及经办人信息");
1781 1781
                                         }
@@ -1853,27 +1853,33 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1853 1853
                                             if (selectSealList != null && selectSealList.size() > 0) {
1854 1854
                                                 for (SealManage manage : selectSealList) {
1855 1855
                                                     Integer sealStatus = manage.getSealStatus();
1856
-                                                    if (sealStatus == 1){
1856
+                                                    if (sealStatus == 1) {
1857 1857
                                                         sealIdList.add(manage.getSealId());
1858 1858
                                                     }
1859 1859
                                                 }
1860
-                                                EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord,sealIdList);
1860
+                                                EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
1861
+
1861 1862
                                                 JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1862
-                                                if (jsonObject3.getIntValue("code") == 0) {
1863
-                                                    //获取签署流程ID
1864
-                                                    JSONObject data1 = jsonObject3.getJSONObject("data");
1865
-                                                    String signFlowId = data1.getString("signFlowId");
1866
-                                                    //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1867
-                                                    sealSignRecord.setCaseAppliId(caseApplication.getId());
1868
-                                                    sealSignRecord.setSignFlowid(signFlowId);
1869
-                                                    sealSignRecord.setSignFlowStatus(1);//待签名
1870
-                                                    sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1871
-                                                } else {
1872
-                                                    throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1863
+                                                if (jsonObject3 != null){
1864
+                                                    if (jsonObject3.getIntValue("code") == 0) {
1865
+                                                        //获取签署流程ID
1866
+                                                        JSONObject data1 = jsonObject3.getJSONObject("data");
1867
+                                                        String signFlowId = data1.getString("signFlowId");
1868
+                                                        //保存案件id,文件id,文件名称.流程id到签署用印记录表里
1869
+                                                        sealSignRecord.setCaseAppliId(caseApplication.getId());
1870
+                                                        sealSignRecord.setSignFlowid(signFlowId);
1871
+                                                        sealSignRecord.setSignFlowStatus(1);//待签名
1872
+                                                        sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
1873
+                                                    } else {
1874
+                                                        throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1875
+                                                    }
1873 1876
                                                 }
1877
+                                                  return AjaxResult.error();
1874 1878
                                             }
1875 1879
 
1876 1880
 
1881
+                                        } else {
1882
+                                            return AjaxResult.error();
1877 1883
                                         }
1878 1884
                                     }
1879 1885
                                 }
@@ -2663,7 +2669,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2663 2669
 
2664 2670
                     // 新增预约会议表
2665 2671
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2666
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2672
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(), 1);
2667 2673
                     reservedConferenceMapper.insert(conference);
2668 2674
                     return AjaxResult.success("预约会议成功");
2669 2675
 
@@ -2691,7 +2697,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2691 2697
         String roomId = generateRoomId();
2692 2698
         // 新增预约会议表
2693 2699
         ReservedConference conference = new ReservedConference(caseId, roomId,
2694
-                null, null,0);
2700
+                null, null, 0);
2695 2701
         reservedConferenceMapper.insert(conference);
2696 2702
         return roomId;
2697 2703
     }
@@ -2705,7 +2711,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2705 2711
         // 查询最大房间号
2706 2712
         Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2707 2713
 
2708
-        if (null == maxRoomId || maxRoomId >999999) {
2714
+        if (null == maxRoomId || maxRoomId > 999999) {
2709 2715
             return "000001";
2710 2716
         } else {
2711 2717
             return String.format("%06d", maxRoomId);
@@ -2753,7 +2759,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2753 2759
     @Override
2754 2760
     public AjaxResult deleteRoom(String roomId) {
2755 2761
 
2756
-        return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
2762
+        return AjaxResult.success(reservedConferenceMapper.deleteByRoomId(roomId));
2757 2763
     }
2758 2764
 }
2759 2765
 

+ 6
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java Просмотреть файл

@@ -145,7 +145,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
145 145
                             sealManage.setIdentifyId(identify.getId());
146 146
                             sealManage.setSealName(sealName);
147 147
                             sealManage.setSealId(sealId);
148
-                            sealManage.setSealStatus(0);  //默认为禁用
148
+                            sealManage.setSealStatus(0);  //默认为未审核
149
+                            sealManage.setIsUse(0);  //默认为禁用
149 150
                             int i = sealManageMapper.insertSealManage(sealManage);
150 151
                             if (i > 0) {
151 152
                                 return AjaxResult.success("上传成功");
@@ -256,14 +257,14 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
256 257
         List<SealListVO> sealListVOS = new ArrayList<>();
257 258
         if (selectSealList != null && selectSealList.size() > 0) {
258 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 262
                     SealListVO sealListVO = new SealListVO();
262 263
                     sealListVO.setSealId(sealManage1.getSealId());
263 264
                     sealListVO.setSealName(sealManage1.getSealName());
264 265
                     sealListVO.setSealStatus(sealManage1.getSealStatus());
265 266
                     //根据附件id查询路径
266
-                    CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
267
+                    CaseAttach caseAttach = caseAttachMapper.queryAnnexById(sealManage1.getAnnexId());
267 268
                     String annexName = caseAttach.getAnnexName();
268 269
                     String prefix = "/profile";
269 270
                     int startIndex = annexName.indexOf(prefix);
@@ -271,6 +272,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
271 272
                     String annexPath = "/uploadPath" + annexName.substring(startIndex);
272 273
                     sealListVO.setAnnexPath(annexPath);
273 274
                     sealListVO.setAnnexType(caseAttach.getAnnexType());
275
+                    sealListVO.setIsUse(sealManage1.getIsUse());
274 276
                     sealListVOS.add(sealListVO);
275 277
                 }
276 278
             }

+ 78
- 66
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Просмотреть файл

@@ -39,10 +39,11 @@ public class FixSelectFlowDetailUtils {
39 39
     private DeptIdentifyMapper deptIdentifyMapper;
40 40
     @Autowired
41 41
     private SealManageMapper sealManageMapper;
42
+
42 43
     /*
43 44
     定时查询签署流程详情
44 45
      */
45
-    @Scheduled(cron = "0/10 * * * * ?")
46
+    //@Scheduled(cron = "0/10 * * * * ?")
46 47
     @Transactional
47 48
     public void fixExecuteSelectFlowDetailUtils() {
48 49
         Gson gson = new Gson();
@@ -173,9 +174,10 @@ public class FixSelectFlowDetailUtils {
173 174
 
174 175
     /**
175 176
      * 定时查询企业认证状态
177
+     *
176 178
      * @throws Exception
177 179
      */
178
-    @Scheduled(cron = "0 0/30 * * * ?")
180
+    //@Scheduled(cron = "*/30 * * * * *")
179 181
     @Transactional
180 182
     public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
181 183
         Gson gson = new Gson();
@@ -185,76 +187,84 @@ public class FixSelectFlowDetailUtils {
185 187
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
186 188
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
187 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,7 +303,7 @@ public class FixSelectFlowDetailUtils {
293 303
                                 int sealStatus = data.getIntValue("sealStatus");
294 304
                                 if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
295 305
                                     //已启用证明审核通过,下载到数据库
296
-                                    String sealImageDownloadUrl = data.getString("sealImageDownloadUrl  ");
306
+                                    String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
297 307
                                     LocalDate now = LocalDate.now();
298 308
                                     String year = Integer.toString(now.getYear());
299 309
                                     String month = String.format("%02d", now.getMonthValue());
@@ -323,6 +333,8 @@ public class FixSelectFlowDetailUtils {
323 333
                                             //将附件id保存到公章管理表里
324 334
                                             Integer annexId1 = caseAttach.getAnnexId();
325 335
                                             sealManage1.setAnnexId(annexId1);
336
+                                            sealManage1.setSealStatus(1);
337
+                                            sealManage1.setIsUse(1);  //默认使用状态都是未启用
326 338
                                             sealManageMapper.updateSealManage(sealManage1);
327 339
                                         }
328 340
                                     }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java Просмотреть файл

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

+ 2
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Просмотреть файл

@@ -63,7 +63,7 @@
63 63
             </if>
64 64
         </where>
65 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 67
         select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
68 68
         from case_attach
69 69
         <where>
@@ -80,7 +80,7 @@
80 80
         where annex_id = #{annexId}
81 81
     </update>
82 82
 
83
-    <update id="updateCaseAttachBycaseid" parameterType="CaseAttach">
83
+    <update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
84 84
         update case_attach
85 85
         <set>
86 86
             <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>

+ 3
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml Просмотреть файл

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

+ 9
- 5
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealManageMapper.xml Просмотреть файл

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