Quellcode durchsuchen

压缩包导入

hejinbo vor 2 Jahren
Ursprung
Commit
e3cd2495cf

+ 13
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Datei anzeigen

429
 
429
 
430
         return  success(caseApplicationService.reserveConferenceList(caseId));
430
         return  success(caseApplicationService.reserveConferenceList(caseId));
431
     }
431
     }
432
+
433
+    /**
434
+     * 案件压缩包导入
435
+     * @param file
436
+     * @return
437
+     * @throws IOException
438
+     */
439
+    @PostMapping("/uploadCaseZipFile")
440
+    public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file) throws IOException {
441
+        return caseApplicationService.uploadCaseZipFile(file);
442
+    }
443
+
444
+
432
 }
445
 }

+ 2
- 0
ruoyi-system/pom.xml Datei anzeigen

22
             <groupId>com.ruoyi</groupId>
22
             <groupId>com.ruoyi</groupId>
23
             <artifactId>ruoyi-common</artifactId>
23
             <artifactId>ruoyi-common</artifactId>
24
         </dependency>
24
         </dependency>
25
+
25
         <dependency>
26
         <dependency>
26
             <groupId>com.ruoyi</groupId>
27
             <groupId>com.ruoyi</groupId>
27
             <artifactId>pay</artifactId>
28
             <artifactId>pay</artifactId>
32
             <artifactId>tls-sig-api-v2</artifactId>
33
             <artifactId>tls-sig-api-v2</artifactId>
33
             <version>1.2</version>
34
             <version>1.2</version>
34
         </dependency>
35
         </dependency>
36
+
35
     </dependencies>
37
     </dependencies>
36
 
38
 
37
 </project>
39
 </project>

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Datei anzeigen

112
 
112
 
113
     AjaxResult deleteRoom(  String roomId);
113
     AjaxResult deleteRoom(  String roomId);
114
 
114
 
115
+    AjaxResult uploadCaseZipFile(MultipartFile file);
116
+
115
 }
117
 }

+ 101
- 33
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Datei anzeigen

4
 import cn.hutool.core.collection.CollectionUtil;
4
 import cn.hutool.core.collection.CollectionUtil;
5
 import cn.hutool.core.util.IdcardUtil;
5
 import cn.hutool.core.util.IdcardUtil;
6
 import cn.hutool.core.util.StrUtil;
6
 import cn.hutool.core.util.StrUtil;
7
+import cn.hutool.core.util.ZipUtil;
7
 import com.alibaba.fastjson.JSON;
8
 import com.alibaba.fastjson.JSON;
8
 import com.alibaba.fastjson.JSONArray;
9
 import com.alibaba.fastjson.JSONArray;
9
 import com.alibaba.fastjson.JSONObject;
10
 import com.alibaba.fastjson.JSONObject;
11
 import com.google.gson.JsonArray;
12
 import com.google.gson.JsonArray;
12
 import com.google.gson.JsonObject;
13
 import com.google.gson.JsonObject;
13
 import com.ruoyi.common.annotation.DataScope;
14
 import com.ruoyi.common.annotation.DataScope;
15
+import com.ruoyi.common.config.RuoYiConfig;
14
 import com.ruoyi.common.constant.CaseApplicationConstants;
16
 import com.ruoyi.common.constant.CaseApplicationConstants;
15
 import com.ruoyi.common.core.domain.AjaxResult;
17
 import com.ruoyi.common.core.domain.AjaxResult;
16
 import com.ruoyi.common.core.domain.entity.*;
18
 import com.ruoyi.common.core.domain.entity.*;
19
 import com.ruoyi.common.exception.EsignDemoException;
21
 import com.ruoyi.common.exception.EsignDemoException;
20
 import com.ruoyi.common.exception.ServiceException;
22
 import com.ruoyi.common.exception.ServiceException;
21
 import com.ruoyi.common.utils.*;
23
 import com.ruoyi.common.utils.*;
24
+import com.ruoyi.common.utils.file.FileUploadUtils;
22
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
25
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
23
 import com.ruoyi.common.core.domain.entity.SysUser;
26
 import com.ruoyi.common.core.domain.entity.SysUser;
24
 import com.ruoyi.common.utils.thread.ThreadPoolUtil;
27
 import com.ruoyi.common.utils.thread.ThreadPoolUtil;
49
 import org.springframework.stereotype.Service;
52
 import org.springframework.stereotype.Service;
50
 import org.springframework.transaction.annotation.Transactional;
53
 import org.springframework.transaction.annotation.Transactional;
51
 import org.springframework.web.multipart.MultipartFile;
54
 import org.springframework.web.multipart.MultipartFile;
55
+
52
 import java.io.*;
56
 import java.io.*;
53
 import java.math.BigDecimal;
57
 import java.math.BigDecimal;
54
 import java.math.RoundingMode;
58
 import java.math.RoundingMode;
61
 import java.util.*;
65
 import java.util.*;
62
 import java.util.regex.Pattern;
66
 import java.util.regex.Pattern;
63
 import java.util.stream.Collectors;
67
 import java.util.stream.Collectors;
68
+import java.util.zip.ZipEntry;
69
+import java.util.zip.ZipInputStream;
64
 
70
 
65
 import static com.ruoyi.common.core.domain.AjaxResult.success;
71
 import static com.ruoyi.common.core.domain.AjaxResult.success;
66
 import static com.ruoyi.common.utils.PageUtils.startPage;
72
 import static com.ruoyi.common.utils.PageUtils.startPage;
157
             }
163
             }
158
 
164
 
159
             for (SysRole role : roles) {
165
             for (SysRole role : roles) {
160
-                if(StrUtil.isEmpty(role.getRoleName())){
166
+                if (StrUtil.isEmpty(role.getRoleName())) {
161
                     continue;
167
                     continue;
162
                 }
168
                 }
163
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
169
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
188
                     caseApplication.setDeptIds(deptIds);
194
                     caseApplication.setDeptIds(deptIds);
189
                 }
195
                 }
190
                 if ("申请人".equals(role.getRoleName())) {
196
                 if ("申请人".equals(role.getRoleName())) {
191
-                //    caseApplication.setIsOtherRole(1);
197
+                    //    caseApplication.setIsOtherRole(1);
192
                     // 查询有关的用户部门
198
                     // 查询有关的用户部门
193
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
199
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
194
                 }
200
                 }
200
                 if ("代理人".equals(role.getRoleName())) {
206
                 if ("代理人".equals(role.getRoleName())) {
201
                     caseApplication.setIsOtherRole(1);
207
                     caseApplication.setIsOtherRole(1);
202
                     // 查询角色有关的用户部门
208
                     // 查询角色有关的用户部门
203
-                        // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
209
+                    // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
204
                     List<Long> agentDeptIds = new ArrayList<>();
210
                     List<Long> agentDeptIds = new ArrayList<>();
205
                     agentDeptIds.add(sysUser.getDeptId());
211
                     agentDeptIds.add(sysUser.getDeptId());
206
                     caseApplication.setAgentDeptIds(agentDeptIds);
212
                     caseApplication.setAgentDeptIds(agentDeptIds);
233
         CaseApplication caseApplication = new CaseApplication();
239
         CaseApplication caseApplication = new CaseApplication();
234
         List<Integer> caseStatusList = new ArrayList<>();
240
         List<Integer> caseStatusList = new ArrayList<>();
235
         for (SysRole role : roles) {
241
         for (SysRole role : roles) {
236
-            if(StrUtil.isEmpty(role.getRoleName())){
242
+            if (StrUtil.isEmpty(role.getRoleName())) {
237
                 continue;
243
                 continue;
238
             }
244
             }
239
             // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
245
             // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
264
                 caseApplication.setDeptIds(deptIds);
270
                 caseApplication.setDeptIds(deptIds);
265
             }
271
             }
266
             if ("申请人".equals(role.getRoleName())) {
272
             if ("申请人".equals(role.getRoleName())) {
267
-              //  caseApplication.setIsOtherRole(1);
273
+                //  caseApplication.setIsOtherRole(1);
268
                 // 查询角色有关的用户部门
274
                 // 查询角色有关的用户部门
269
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
275
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
270
             }
276
             }
286
 
292
 
287
         // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
293
         // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
288
         ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
294
         ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
289
-        if(toDoCount==null){
295
+        if (toDoCount == null) {
290
             return new ToDoCount();
296
             return new ToDoCount();
291
         }
297
         }
292
         return toDoCount;
298
         return toDoCount;
360
             return AjaxResult.error("请选择要上传的文件");
366
             return AjaxResult.error("请选择要上传的文件");
361
         }
367
         }
362
         String targetPath = "/home/ruoyi/uploadPath/upload/unzipFile";
368
         String targetPath = "/home/ruoyi/uploadPath/upload/unzipFile";
363
-//        String targetPath =  "F:\\testZip\\uploadPath\\upload\\upload1\\unzipFile";
369
+        // String targetPath = "D:\\home\\unzip\\";
364
         File zipFile = null;
370
         File zipFile = null;
365
         InputStream ins = null;
371
         InputStream ins = null;
366
         try {
372
         try {
540
                 }
546
                 }
541
             }
547
             }
542
         }
548
         }
543
-
544
         return success();
549
         return success();
545
 
550
 
546
     }
551
     }
878
 
883
 
879
     /**
884
     /**
880
      * 新增案件
885
      * 新增案件
886
+     *
881
      * @param caseApplication
887
      * @param caseApplication
882
      * @return
888
      * @return
883
      */
889
      */
898
         caseApplication.setVersion(1);
904
         caseApplication.setVersion(1);
899
         // 新增立案信息
905
         // 新增立案信息
900
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
906
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
901
-        if(rows==0){
907
+        if (rows == 0) {
902
             return rows;
908
             return rows;
903
         }
909
         }
904
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
910
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
1010
         caseApplication.setFeePayable(feePayable);
1016
         caseApplication.setFeePayable(feePayable);
1011
         caseApplication.setUpdateBy(getUsername());
1017
         caseApplication.setUpdateBy(getUsername());
1012
         // 立案申请状态直接修改主表信息
1018
         // 立案申请状态直接修改主表信息
1013
-        if(caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1019
+        if (caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1014
 
1020
 
1015
             caseApplicationMapper.updataCaseApplication(caseApplication);
1021
             caseApplicationMapper.updataCaseApplication(caseApplication);
1016
             // 修改记录表状态为同意提交修改的内容
1022
             // 修改记录表状态为同意提交修改的内容
1017
             caseApplication.setUpdateSubmitStatus(0);
1023
             caseApplication.setUpdateSubmitStatus(0);
1018
-        }else {
1024
+        } else {
1019
             // 修改记录表状态为已提交修改的内容
1025
             // 修改记录表状态为已提交修改的内容
1020
             caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
1026
             caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
1021
         }
1027
         }
1064
 
1070
 
1065
                 }
1071
                 }
1066
                 // 立案申请状态直接修改主表信息
1072
                 // 立案申请状态直接修改主表信息
1067
-                if(caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1073
+                if (caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1068
 
1074
 
1069
                     caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
1075
                     caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
1070
                 }
1076
                 }
1084
         if (maxVersion == null) {
1090
         if (maxVersion == null) {
1085
             maxVersion = 1;
1091
             maxVersion = 1;
1086
         }
1092
         }
1087
-        caseApplication.setVersion(maxVersion+1);
1093
+        caseApplication.setVersion(maxVersion + 1);
1088
         // 将修改提交状态改为未提交
1094
         // 将修改提交状态改为未提交
1089
-       // caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
1095
+        // caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
1090
         // 修改案件表的版本号
1096
         // 修改案件表的版本号
1091
-     //   caseApplicationMapper.updateVersionById(caseApplication.getId(),caseApplication.getVersion());
1097
+        //   caseApplicationMapper.updateVersionById(caseApplication.getId(),caseApplication.getVersion());
1092
 
1098
 
1093
         // 异步新增案件日志
1099
         // 异步新增案件日志
1094
         ThreadPoolUtil.execute(() -> {
1100
         ThreadPoolUtil.execute(() -> {
1307
         StringBuilder failureMsg = new StringBuilder();
1313
         StringBuilder failureMsg = new StringBuilder();
1308
         StringBuilder successMsg = new StringBuilder();
1314
         StringBuilder successMsg = new StringBuilder();
1309
         int successNum = 0;
1315
         int successNum = 0;
1310
-        List<CaseAffiliate> caseAffiliateLogList=new ArrayList<>();
1316
+        List<CaseAffiliate> caseAffiliateLogList = new ArrayList<>();
1311
         if (caseApplicationList != null && caseApplicationList.size() > 0) {
1317
         if (caseApplicationList != null && caseApplicationList.size() > 0) {
1312
             // 1,查询所有的组织机构,组装成map
1318
             // 1,查询所有的组织机构,组装成map
1313
             List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
1319
             List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
1374
                         caseApplicationItera.setCreateBy(getUsername());
1380
                         caseApplicationItera.setCreateBy(getUsername());
1375
                         caseApplicationItera.setImportFlag(1);
1381
                         caseApplicationItera.setImportFlag(1);
1376
                         int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
1382
                         int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
1377
-                        if(rows==0){
1383
+                        if (rows == 0) {
1378
                             continue;
1384
                             continue;
1379
                         }
1385
                         }
1380
                         // 新增日志
1386
                         // 新增日志
1394
                         caseApplicationItera.setVersion(1);
1400
                         caseApplicationItera.setVersion(1);
1395
 
1401
 
1396
                         int insertRow = caseApplicationLogMapper.insert(caseApplicationItera);
1402
                         int insertRow = caseApplicationLogMapper.insert(caseApplicationItera);
1397
-                        if(insertRow>0){
1403
+                        if (insertRow > 0) {
1398
                             caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId()));
1404
                             caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId()));
1399
                             caseAffiliateLogList.addAll(caseAffiliates);
1405
                             caseAffiliateLogList.addAll(caseAffiliates);
1400
                         }
1406
                         }
1408
             }
1414
             }
1409
             // 异步新增案件日志
1415
             // 异步新增案件日志
1410
             ThreadPoolUtil.execute(() -> {
1416
             ThreadPoolUtil.execute(() -> {
1411
-                if ( CollectionUtil.isNotEmpty(caseAffiliateLogList)) {
1417
+                if (CollectionUtil.isNotEmpty(caseAffiliateLogList)) {
1412
                     // 插入案件日志人员相关表
1418
                     // 插入案件日志人员相关表
1413
                     caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliateLogList);
1419
                     caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliateLogList);
1414
                 }
1420
                 }
1457
         }
1463
         }
1458
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
1464
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
1459
             failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
1465
             failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
1460
-        } else if (! IdcardUtil.isValidCard((caseApplication.getDebtorIdentityNumAgent()))) {
1466
+        } else if (!IdcardUtil.isValidCard((caseApplication.getDebtorIdentityNumAgent()))) {
1461
             failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
1467
             failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
1462
         }
1468
         }
1463
         String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
1469
         String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
1487
         }
1493
         }
1488
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
1494
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
1489
             failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
1495
             failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
1490
-        } else if (! IdcardUtil.isValidCard(caseApplication.getDebtorIdentityNum())) {
1496
+        } else if (!IdcardUtil.isValidCard(caseApplication.getDebtorIdentityNum())) {
1491
             failureMsg.append("【被申请人主体信息-身份证号】不合法;");
1497
             failureMsg.append("【被申请人主体信息-身份证号】不合法;");
1492
         }
1498
         }
1493
         String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
1499
         String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
1524
         }
1530
         }
1525
         if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1531
         if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
1526
             failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1532
             failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
1527
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()){
1533
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
1528
 
1534
 
1529
             failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1535
             failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
1530
         }
1536
         }
1630
         }
1636
         }
1631
         if (StrUtil.isEmpty(caseApplication.getEmail())) {
1637
         if (StrUtil.isEmpty(caseApplication.getEmail())) {
1632
             failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1638
             failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
1633
-        } else if(!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()){
1639
+        } else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
1634
 
1640
 
1635
             failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1641
             failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
1636
         }
1642
         }
1928
                                                 EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
1934
                                                 EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
1929
 
1935
 
1930
                                                 JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1936
                                                 JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
1931
-                                                if (jsonObject3 != null){
1937
+                                                if (jsonObject3 != null) {
1932
                                                     if (jsonObject3.getIntValue("code") == 0) {
1938
                                                     if (jsonObject3.getIntValue("code") == 0) {
1933
                                                         //获取签署流程ID
1939
                                                         //获取签署流程ID
1934
                                                         JSONObject data1 = jsonObject3.getJSONObject("data");
1940
                                                         JSONObject data1 = jsonObject3.getJSONObject("data");
1941
                                                     } else {
1947
                                                     } else {
1942
                                                         throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1948
                                                         throw new ServiceException("发起签署流程失败,请检查参数是否有误");
1943
                                                     }
1949
                                                     }
1944
-                                                }else {
1950
+                                                } else {
1945
                                                     return AjaxResult.error();
1951
                                                     return AjaxResult.error();
1946
                                                 }
1952
                                                 }
1947
 
1953
 
2692
      */
2698
      */
2693
     @Transactional
2699
     @Transactional
2694
     @Override
2700
     @Override
2695
-    public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO)  {
2701
+    public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) {
2696
 
2702
 
2697
         // 新增预约会议表
2703
         // 新增预约会议表
2698
-        ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(),SecurityUtils.getUserId(), reservedConferenceVO.getRoomId(),
2699
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime());
2704
+        ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), SecurityUtils.getUserId(), reservedConferenceVO.getRoomId(),
2705
+                reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime());
2700
 
2706
 
2701
-    reservedConferenceMapper.insert(conference);
2702
-    return success("预约会议成功");
2707
+        reservedConferenceMapper.insert(conference);
2708
+        return success("预约会议成功");
2703
     }
2709
     }
2704
 
2710
 
2705
 
2711
 
2728
         // 查询最大房间号
2734
         // 查询最大房间号
2729
         Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
2735
         Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
2730
 
2736
 
2731
-        if (null == maxRoomId || maxRoomId >4294967294L) {
2737
+        if (null == maxRoomId || maxRoomId > 4294967294L) {
2732
             return 1L;
2738
             return 1L;
2733
         } else {
2739
         } else {
2734
-            return maxRoomId+1;
2740
+            return maxRoomId + 1;
2735
         }
2741
         }
2736
 
2742
 
2737
     }
2743
     }
2776
     @Override
2782
     @Override
2777
     public AjaxResult deleteRoom(String roomId) {
2783
     public AjaxResult deleteRoom(String roomId) {
2778
 
2784
 
2779
-        return success( reservedConferenceMapper.deleteByRoomId(roomId));
2785
+        return success(reservedConferenceMapper.deleteByRoomId(roomId));
2780
     }
2786
     }
2781
 
2787
 
2788
+    @Override
2789
+    public AjaxResult uploadCaseZipFile(MultipartFile file) {
2790
+        if (file.isEmpty()) {
2791
+            return AjaxResult.error("请选择要上传的文件");
2792
+        }
2793
+        //String targetPath = "/home/ruoyi/uploadPath/upload/unzipFile";
2794
+        String targetPath = "D:\\home\\unzip\\";
2795
+        File zipFile = null;
2796
+        InputStream ins = null;
2797
+        try {
2798
+            ins = file.getInputStream();
2799
+            zipFile = new File(file.getOriginalFilename());
2800
+            inputChangeToFile(ins, zipFile);
2801
+        } catch (IOException e) {
2802
+            e.printStackTrace();
2803
+        }
2804
+        //解压缩上传的压缩包
2805
+        boolean unzipSuccess  = UnZipFileUtils.unZipFile(zipFile, targetPath);
2806
+        if (unzipSuccess ) {
2807
+            String unzipPath = targetPath + file.getOriginalFilename() + "\\";
2808
+            File directory = new File(targetPath);
2809
+            String pdfFilePath  = findAndConvertPDF(directory);
2810
+            if (pdfFilePath != null){
2811
+                // 返回找到的PDF文件路径
2812
+                return AjaxResult.success(pdfFilePath);
2813
+            }else {
2814
+                // 没有找到符合条件的文件
2815
+                return AjaxResult.error("未找到符合条件的文件");
2816
+            }
2817
+        }else {
2818
+            // 解压失败
2819
+            return AjaxResult.error("解压失败");
2820
+        }
2821
+
2822
+    }
2823
+    public static String findAndConvertPDF(File directory) {
2824
+
2825
+        File[] matches = directory.listFiles(new FilenameFilter() {
2826
+            public boolean accept(File dir, String name) {
2827
+                return name.contains("仲裁申请书");
2828
+            }
2829
+        });
2782
 
2830
 
2831
+        if (matches != null && matches.length > 0) {
2832
+            for (File file : matches) {
2833
+                if (file.isFile() && file.getName().toLowerCase().endsWith(".pdf")) {
2834
+                    // 如果是PDF格式直接返回路径
2835
+                    return file.getAbsolutePath();
2836
+                } else {
2837
+                    // 如果不是PDF格式,进行转换成PDF并返回路径
2838
+                    String pdfPath = convertToPDF(file);
2839
+                    return pdfPath;
2840
+                }
2841
+            }
2842
+        }
2843
+        return null;
2844
+    }
2845
+
2846
+    private static String convertToPDF(File file) {
2847
+        // 实现文件格式转换逻辑,这里假设已经实现了转换逻辑,返回转换后的PDF文件路径
2848
+        String pdfPath = "convertedFilePath.pdf"; // 这里替换为实际转换后的PDF文件路径
2849
+        return pdfPath;
2850
+    }
2783
 }
2851
 }
2784
 
2852
 
2785
 
2853
 

+ 0
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Datei anzeigen

223
                 casePaymentRecordMapper.saveRecord(paymentRecord);
223
                 casePaymentRecordMapper.saveRecord(paymentRecord);
224
                 // 新增日志
224
                 // 新增日志
225
                 CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
225
                 CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
226
-
227
             }
226
             }
228
         }
227
         }
229
 
228
 

+ 74
- 173
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Datei anzeigen

182
     public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
182
     public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
183
         Gson gson = new Gson();
183
         Gson gson = new Gson();
184
         DeptIdentify deptIdentify = new DeptIdentify();
184
         DeptIdentify deptIdentify = new DeptIdentify();
185
-        deptIdentify.setIdentifyStatus(0);
186
         List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
185
         List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
187
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
186
         if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
188
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
187
             for (int i = 0; i < deptIdentifysnew.size(); i++) {
189
                 DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
188
                 DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
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);
189
+                Integer identifyStatus = deptIdentify1.getIdentifyStatus();
190
+                if (identifyStatus!=1){
191
+                    String authFlowId = deptIdentify1.getAuthFlowId();
192
+                    if (authFlowId != null) {
193
+                        EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
194
+                        JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
195
+                        int code = identifyInfoJsonObject.get("code").getAsInt();
196
+                        if (code == 0) {
197
+                            JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
198
+                            int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
199
+                            if (realnameStatus == 1) {
200
+                                String orgId = identifyInfoData.get("orgId").getAsString();
201
+                                //查询企业内部印章
202
+                                EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
203
+                                JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
204
+                                int code1 = jsonObject.get("code").getAsInt();
205
+                                if (code1 == 0) {
206
+                                    JsonObject data = jsonObject.getAsJsonObject("data");
207
+                                    JsonArray seals = data.get("seals").getAsJsonArray();
208
+                                    if (seals.size() > 0) {
209
+                                        for (int j = 0; j < seals.size(); j++) {
210
+                                            //保存印章信息到数据库
211
+                                            JsonObject asJsonObject = seals.get(j).getAsJsonObject();
212
+                                            SealManage sealManage = new SealManage();
213
+                                            String sealName = asJsonObject.get("sealName").toString();
214
+                                            String sealId = asJsonObject.get("sealId").toString();
215
+                                            String url = asJsonObject.get("sealImageDownloadUrl").toString();
216
+                                            LocalDate now = LocalDate.now();
217
+                                            String year = Integer.toString(now.getYear());
218
+                                            String month = String.format("%02d", now.getMonthValue());
219
+                                            String day = String.format("%02d", now.getDayOfMonth());
220
+                                            String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
221
+                                            String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
222
+                                            String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
223
+                                            String savePath = "/home/ruoyi/uploadPath/upload/";
224
+                                            // 创建日期目录
225
+                                            File saveFolder = new File(saveFolderPath);
226
+                                            if (!saveFolder.exists()) {
227
+                                                saveFolder.mkdirs();
253
                                             }
228
                                             }
254
-                                        }
255
-                                    }
256
-                                }
257
-
258
-                            }
259
-                            //将orgId保存到数据库里
260
-                            deptIdentify1.setOrgId(orgId);
261
-                            deptIdentify1.setIdentifyStatus(1);
262
-                            deptIdentify1.setIsUse(0);  //默认机构为未启用
263
-                            int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
264
-                        }
265
-                    }else {
266
-                        deptIdentify1.setIdentifyStatus(2);
267
-                        deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
268
-                    }
269
-                }
270
-
271
-            }
272
-        }
273
-    }
274
-
275
-    /**
276
-     * 定时查询企业认证状态
277
-     *
278
-     * @throws Exception
279
-     */
280
-    @Scheduled(cron = "*/30 * * * * *")
281
-    @Transactional
282
-    public void fixExecuteSelectDeptIndentify() throws Exception {
283
-        Gson gson = new Gson();
284
-        DeptIdentify deptIdentify = new DeptIdentify();
285
-        deptIdentify.setIdentifyStatus(2);
286
-        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
287
-        if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
288
-            for (int i = 0; i < deptIdentifysnew.size(); i++) {
289
-                DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
290
-                String authFlowId = deptIdentify1.getAuthFlowId();
291
-                if (authFlowId != null) {
292
-                    EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
293
-                    JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
294
-                    int code = identifyInfoJsonObject.get("code").getAsInt();
295
-                    if (code == 0) {
296
-                        JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
297
-                        int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
298
-                        if (realnameStatus == 1) {
299
-                            String orgId = identifyInfoData.get("orgId").getAsString();
300
-                            //查询企业内部印章
301
-                            EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
302
-                            JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
303
-                            int code1 = jsonObject.get("code").getAsInt();
304
-                            if (code1 == 0) {
305
-                                JsonObject data = jsonObject.getAsJsonObject("data");
306
-                                JsonArray seals = data.get("seals").getAsJsonArray();
307
-                                if (seals.size() > 0) {
308
-                                    for (int j = 0; j < seals.size(); j++) {
309
-                                        //保存印章信息到数据库
310
-                                        JsonObject asJsonObject = seals.get(j).getAsJsonObject();
311
-                                        SealManage sealManage = new SealManage();
312
-                                        String sealName = asJsonObject.get("sealName").toString();
313
-                                        String sealId = asJsonObject.get("sealId").toString();
314
-                                        String url = asJsonObject.get("sealImageDownloadUrl").toString();
315
-                                        LocalDate now = LocalDate.now();
316
-                                        String year = Integer.toString(now.getYear());
317
-                                        String month = String.format("%02d", now.getMonthValue());
318
-                                        String day = String.format("%02d", now.getDayOfMonth());
319
-                                        String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
320
-                                        String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
321
-                                        String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
322
-                                        String savePath = "/home/ruoyi/uploadPath/upload/";
323
-                                        // 创建日期目录
324
-                                        File saveFolder = new File(saveFolderPath);
325
-                                        if (!saveFolder.exists()) {
326
-                                            saveFolder.mkdirs();
327
-                                        }
328
-                                        String resultFilePath = saveFolderPath + "/" + fileName;
329
-                                        File resultFilePathFile = new File(resultFilePath);
330
-                                        if (!resultFilePathFile.exists()) {
331
-                                            resultFilePathFile.createNewFile();
332
-                                        }
333
-                                        String fileDownloadUrlnew = url.substring(1, url.length() - 1);
334
-                                        boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
335
-                                        if (downLoadFile) {
336
-                                            CaseAttach caseAttach = new CaseAttach();
337
-                                            caseAttach.setAnnexType(10);  //10代表印章图片
338
-                                            caseAttach.setAnnexPath(savePath);
339
-                                            caseAttach.setAnnexName(saveName);
340
-                                            int i1 = caseAttachMapper.save(caseAttach);
341
-                                            if (i1 > 0) {
342
-                                                //将印章信息保存到公章管理表里
343
-                                                String sealName1 = sealName.substring(1, sealName.length() - 1);
344
-                                                String sealId1 = sealId.substring(1, sealId.length() - 1);
345
-                                                Integer annexId1 = caseAttach.getAnnexId();
346
-                                                sealManage.setAnnexId(annexId1);
347
-                                                sealManage.setSealId(sealId1);
348
-                                                sealManage.setSealName(sealName1);
349
-                                                sealManage.setIdentifyId(deptIdentify1.getId());
350
-                                                sealManage.setSealStatus(1);
351
-                                                sealManage.setIsUse(1);
352
-                                                sealManageMapper.insertSealManage(sealManage);
229
+                                            String resultFilePath = saveFolderPath + "/" + fileName;
230
+                                            File resultFilePathFile = new File(resultFilePath);
231
+                                            if (!resultFilePathFile.exists()) {
232
+                                                resultFilePathFile.createNewFile();
233
+                                            }
234
+                                            String fileDownloadUrlnew = url.substring(1, url.length() - 1);
235
+                                            boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
236
+                                            if (downLoadFile) {
237
+                                                CaseAttach caseAttach = new CaseAttach();
238
+                                                caseAttach.setAnnexType(10);  //10代表印章图片
239
+                                                caseAttach.setAnnexPath(savePath);
240
+                                                caseAttach.setAnnexName(saveName);
241
+                                                int i1 = caseAttachMapper.save(caseAttach);
242
+                                                if (i1 > 0) {
243
+                                                    //将印章信息保存到公章管理表里
244
+                                                    String sealName1 = sealName.substring(1, sealName.length() - 1);
245
+                                                    String sealId1 = sealId.substring(1, sealId.length() - 1);
246
+                                                    Integer annexId1 = caseAttach.getAnnexId();
247
+                                                    sealManage.setAnnexId(annexId1);
248
+                                                    sealManage.setSealId(sealId1);
249
+                                                    sealManage.setSealName(sealName1);
250
+                                                    sealManage.setIdentifyId(deptIdentify1.getId());
251
+                                                    sealManage.setSealStatus(1);
252
+                                                    sealManage.setIsUse(1);
253
+                                                    sealManageMapper.insertSealManage(sealManage);
254
+                                                }
353
                                             }
255
                                             }
354
                                         }
256
                                         }
355
                                     }
257
                                     }
356
-                                }
357
 
258
 
259
+                                }
260
+                                //将orgId保存到数据库里
261
+                                deptIdentify1.setOrgId(orgId);
262
+                                deptIdentify1.setIdentifyStatus(1);
263
+                                deptIdentify1.setIsUse(0);  //默认机构为未启用
264
+                                int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
358
                             }
265
                             }
359
-                            //将orgId保存到数据库里
360
-                            deptIdentify1.setOrgId(orgId);
361
-                            deptIdentify1.setIdentifyStatus(1);
362
-                            deptIdentify1.setIsUse(0);  //默认机构为未启用
363
-                            int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
266
+                        }else {
267
+                            deptIdentify1.setIdentifyStatus(2);
268
+                            deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
364
                         }
269
                         }
365
-                    }else {
366
-                        deptIdentify1.setIdentifyStatus(2);
367
-                        deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
368
                     }
270
                     }
369
                 }
271
                 }
370
-
371
             }
272
             }
372
         }
273
         }
373
     }
274
     }

+ 15
- 47
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/UnZipFileUtils.java Datei anzeigen

17
 public class UnZipFileUtils {
17
 public class UnZipFileUtils {
18
 
18
 
19
     public static void main(String[] args) {
19
     public static void main(String[] args) {
20
-        // 压缩包路径
21
-//        String zipPath = "F:\\testZip\\zipFile\\上传申请书证据材料.zip";
22
-        // 解压后存放路径
23
-//        String targetPath =  "F:\\testZip\\unzipFile";
24
-//        unZipFile(new File(zipPath),targetPath);
25
-
26
-
27
-//        String zipPath = "F:\\testZip\\unzipFile\\上传申请书证据材料";
28
-//        File dirUnzipPath = new File(zipPath);
29
-//        List<File> allFiles = new ArrayList<>();
30
-//        getFiles(dirUnzipPath,allFiles);
31
-//        if(allFiles!=null&&allFiles.size()>0){
32
-//            for (File fileIter : allFiles) {
33
-//                System.out.println(fileIter.getName());
34
-//                System.out.println(fileIter.getAbsolutePath());
35
-//            }
36
-//        }
37
-
38
-         String key = "\\";
39
-         String str = "F:\\testZip\\上传申请书证据材料\\证据材料\\仲裁裁决书模板.docx";
40
-        List<Integer> allindex = new ArrayList<>();
41
-        int a = str.indexOf(key);//*第一个出现的索引位置
42
-        allindex.add(a);
43
-        while (a != -1) {
44
-            System.out.print(a + "\t");
45
-            a = str.indexOf(key, a + 1);//*从这个索引往后开始第一个出现的位置
46
-            allindex.add(a);
47
-        }
48
-        String substr = str.substring(allindex.get(1)+1,allindex.get(2));
49
-        System.out.println("substr---"+substr);
50
-
51
-
20
+        File file = new File("D:\\home\\ruoyi\\仲裁委项目-测试单.zip");
21
+        String targetPath = "D:\\home\\unzip\\";
22
+        unZipFile(file,targetPath);
52
     }
23
     }
53
 
24
 
54
     public static boolean unZipFile(File aboriginalFile, String targetPath) {
25
     public static boolean unZipFile(File aboriginalFile, String targetPath) {
55
         if (!aboriginalFile.exists()) {
26
         if (!aboriginalFile.exists()) {
56
-            log.error("此文件不存在:",aboriginalFile.getPath());
27
+            log.error("此文件不存在:", aboriginalFile.getPath());
57
             return false;
28
             return false;
58
         }
29
         }
59
         try {
30
         try {
65
                     String directPath = targetPath + File.separator + entryZip.getName();
36
                     String directPath = targetPath + File.separator + entryZip.getName();
66
                     File directFile = new File(directPath);
37
                     File directFile = new File(directPath);
67
                     boolean makeDirs = directFile.mkdirs();
38
                     boolean makeDirs = directFile.mkdirs();
68
-                    System.out.println("创建文件夹是否成功:" +makeDirs);
39
+                    System.out.println("创建文件夹是否成功:" + makeDirs);
69
                 } else {
40
                 } else {
70
                     //若是文件,就创建文件
41
                     //若是文件,就创建文件
71
                     File sourceFile = new File(targetPath + File.separator + entryZip.getName());
42
                     File sourceFile = new File(targetPath + File.separator + entryZip.getName());
72
-                    if(!sourceFile.getParentFile().exists()){
43
+                    if (!sourceFile.getParentFile().exists()) {
73
                         boolean mDirect = sourceFile.getParentFile().mkdirs();
44
                         boolean mDirect = sourceFile.getParentFile().mkdirs();
74
-                        System.out.println("创建压缩文件时,创建父文件夹是否成功:" +mDirect);
45
+                        System.out.println("创建压缩文件时,创建父文件夹是否成功:" + mDirect);
75
                     }
46
                     }
76
                     boolean newUnZipFile = sourceFile.createNewFile();
47
                     boolean newUnZipFile = sourceFile.createNewFile();
77
-                    if (newUnZipFile){
48
+                    if (newUnZipFile) {
78
                         // 将压缩文件内容写入到这个文件中
49
                         // 将压缩文件内容写入到这个文件中
79
-                        try{
50
+                        try {
80
                             InputStream is = srcZipFile.getInputStream(entryZip);
51
                             InputStream is = srcZipFile.getInputStream(entryZip);
81
                             FileOutputStream fos = new FileOutputStream(sourceFile);
52
                             FileOutputStream fos = new FileOutputStream(sourceFile);
82
                             int len;
53
                             int len;
84
                             while ((len = is.read(buf)) != -1) {
55
                             while ((len = is.read(buf)) != -1) {
85
                                 fos.write(buf, 0, len);
56
                                 fos.write(buf, 0, len);
86
                             }
57
                             }
87
-                        } catch (Exception e){
88
-                            log.error("解压失败",e);
58
+                        } catch (Exception e) {
59
+                            log.error("解压失败", e);
89
                         }
60
                         }
90
                     }
61
                     }
91
                 }
62
                 }
93
             return true;
64
             return true;
94
 
65
 
95
         } catch (IOException e) {
66
         } catch (IOException e) {
96
-            log.error("解压失败",e);
67
+            log.error("解压失败", e);
97
             return false;
68
             return false;
98
         }
69
         }
99
 
70
 
106
             return;
77
             return;
107
         }
78
         }
108
         File[] fileArray = fileSource.listFiles();
79
         File[] fileArray = fileSource.listFiles();
109
-        if(fileArray!=null&&fileArray.length>0){
80
+        if (fileArray != null && fileArray.length > 0) {
110
             for (File fileIter : fileArray) {
81
             for (File fileIter : fileArray) {
111
                 if (fileIter.isDirectory()) {
82
                 if (fileIter.isDirectory()) {
112
-                    getFiles(fileIter,allFiles);
113
-                }else {
83
+                    getFiles(fileIter, allFiles);
84
+                } else {
114
                     allFiles.add(fileIter);
85
                     allFiles.add(fileIter);
115
                 }
86
                 }
116
 
87
 
120
     }
91
     }
121
 
92
 
122
 
93
 
123
-
124
-
125
-
126
 }
94
 }