10 Commits

Autor SHA1 Nachricht Datum
  hejinbo ec87e603ee Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb vor 2 Jahren
  hejinbo 630b455790 小程序立案申请书展示 vor 2 Jahren
  wangqiong123 cee39d271a Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev vor 2 Jahren
  18792927508 1b7f380867 转pdf vor 2 Jahren
  wangqiong123 8acb479047 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev vor 2 Jahren
  18792927508 de1644db2c 根据案件id查附件 vor 2 Jahren
  wangqiong123 45d23fbab6 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev vor 2 Jahren
  gy b 0e6470fd59 案件回显 vor 2 Jahren
  hejinbo 002ea67fe7 Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev vor 2 Jahren
  hejinbo 397f74daad Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev vor 2 Jahren

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

@@ -132,6 +132,18 @@ public class VideoController extends BaseController {
132 132
 
133 133
         return  videoService.htmlToPDF(reservedConferenceVO);
134 134
     }
135
+    /**
136
+     * 根据案件id和类型查询附件
137
+     * @param caseAppliId
138
+     * @param annexType
139
+     * @return
140
+     */
141
+
142
+    @GetMapping("attachListByCaseId")
143
+    public AjaxResult attachListByCaseId( @RequestParam("caseAppliId") Long caseAppliId,@RequestParam("annexType") Integer annexType) {
144
+
145
+        return  videoService.attachListByCaseId(caseAppliId,annexType);
146
+    }
135 147
 
136 148
 
137 149
 }

+ 1
- 1
ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java Datei anzeigen

@@ -142,7 +142,7 @@ public class RuoYiConfig
142 142
     }
143 143
     public static String getHtml2PDFPath()
144 144
     {
145
-        return getProfile() + "/upload/html2PDF/";
145
+        return getProfile() + "/upload/html2PDF";
146 146
     }
147 147
     // https://1304001529.vod-qcloud.com/b78823bbvodcq1304001529/3ce565bf3270835011486046286/f0.mp4
148 148
 }

+ 1
- 4
ruoyi-common/src/main/java/com/ruoyi/common/utils/PdfUtils.java Datei anzeigen

@@ -32,13 +32,10 @@ public class PdfUtils {
32 32
      * @param pdfFilePath 保存的路径
33 33
      * @param htmlcontent:必须是完整的html格式,比如<html><body>123</body></html>
34 34
      */
35
-    public  boolean htmlStringConvertToPDF(String pdfFilePath, String htmlcontent) {
35
+    public  static boolean htmlStringConvertToPDF(String pdfFilePath, String htmlcontent) {
36 36
         Document document = new Document();
37 37
         PdfWriter writer = null;
38 38
         try {
39
-//            if(!new File(pdfFilePath).exists()){
40
-//                new File(pdfFilePath).createNewFile();
41
-//            }
42 39
             writer = PdfWriter.getInstance(document, new FileOutputStream(pdfFilePath));
43 40
             // 设置底部距离60,解决重叠问题
44 41
 

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Datei anzeigen

@@ -19,6 +19,7 @@ public interface CaseAffiliateMapper {
19 19
 
20 20
 
21 21
     List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
22
+    List<CaseAffiliate>  selectCaseAffiliateByCaseIds(@Param("ids") List<Long> ids);
22 23
     CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
23 24
 
24 25
     int updataCaseAffiliate(CaseAffiliate caseAffiliate);

+ 3
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseLogRecordMapper.java Datei anzeigen

@@ -2,9 +2,11 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.springframework.stereotype.Repository;
5 7
 
6 8
 import java.util.List;
7
-
9
+@Mapper
8 10
 public interface CaseLogRecordMapper {
9 11
 
10 12
 

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/VideoService.java Datei anzeigen

@@ -47,4 +47,12 @@ public interface VideoService {
47 47
      * @return
48 48
      */
49 49
     AjaxResult htmlToPDF(ReservedConferenceVO reservedConferenceVO);
50
+
51
+    /**
52
+     * 根据案件id和类型查询附件
53
+     * @param caseAppliId
54
+     * @param annexType
55
+     * @return
56
+     */
57
+    AjaxResult attachListByCaseId(Long caseAppliId, Integer annexType);
50 58
 }

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Datei anzeigen

@@ -257,9 +257,9 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
257 257
         compareCaseVO.setBeforeCase(beforeCase);
258 258
         compareCaseVO.setAfterCase(afterCase);
259 259
         // 对比两个版本修改的字段
260
-        String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
260
+        String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
261 261
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
262
-        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
262
+        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
263 263
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
264 264
         "compLegalperPost","responSex","responBirth"};
265 265
         StringBuilder changeColumn = new StringBuilder();

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

@@ -70,6 +70,7 @@ import java.text.SimpleDateFormat;
70 70
 import java.time.LocalDate;
71 71
 import java.time.ZoneId;
72 72
 import java.util.*;
73
+import java.util.function.Function;
73 74
 import java.util.regex.Pattern;
74 75
 import java.util.stream.Collectors;
75 76
 import java.util.zip.ZipEntry;
@@ -136,8 +137,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
136 137
     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}$");
137 138
     // 邮箱正则
138 139
     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}$");
139
-    // 身份证号码正则表达式
140
-    private static final String ID_REGEX = "^(\\\\d{15}$|\\\\d{18}$|\\\\d{17}([0-9]|X))$";
140
+
141
+    // 基本字段校验
142
+    private static final  String[] baseColumns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
143
+            "claimPrinciOwed","arbitratClaims"};
144
+    // 申请人字段校验
145
+    private static final String[] applicAffiliateColumns = {"name", "contactTelphone","contactAddress","workTelphone","workAddress",
146
+           "residenAffili","compLegalPerson",
147
+            "compLegalperPost","email","nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
148
+    // 申请人/被申请人代理人字段校验
149
+    private static final String[] applicAgentAffiliateColumns = {"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
150
+    // 被申请人字段校验
151
+    private static final  String[] dectborAffiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
152
+           "residenAffili","responSex","responBirth","email","nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
141 153
 
142 154
     /**
143 155
      * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
@@ -1275,14 +1287,65 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1275 1287
     @Transactional
1276 1288
     public int submitCaseApplication(List<Long> ids) {
1277 1289
         int rows = 0;
1278
-        for (Long id : ids) {
1279
-            CaseApplication application = new CaseApplication();
1280
-            application.setId(id);
1281
-            //提交立案申请
1282
-            application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
1283
-            rows += caseApplicationMapper.submitCaseApplication(application);
1284
-            // 新增日志
1285
-            insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
1290
+        // 查询案件信息,做必填校验,校验不通过,提示,不能提交
1291
+        StringBuilder errorMsg = new StringBuilder();
1292
+        List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByIds(ids);
1293
+        if(CollectionUtil.isNotEmpty(caseApplications)) {
1294
+
1295
+            Map<Long, CaseApplication> applicationMap = caseApplications.stream().collect(Collectors.toMap(CaseApplication::getId, Function.identity(), (n1, n2) -> n2));
1296
+            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliateByCaseIds(ids);
1297
+            // 转换为Map<CaseId,List<CaseAffiliate>>形式
1298
+            Map<Long, List<CaseAffiliate>> caseAffiliateMap = caseAffiliates.stream().collect(Collectors.groupingBy(CaseAffiliate::getCaseAppliId));
1299
+            for (Long id : ids) {
1300
+                // 必填校验
1301
+                CaseApplication caseApplication = applicationMap.get(id);
1302
+                // 基本字段校验
1303
+                if(caseApplication!=null) {
1304
+                    for (String baseColumn : baseColumns) {
1305
+                       if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, baseColumn))){
1306
+                           errorMsg.append(baseColumn).append("不能为空,");
1307
+                           // todo 暂抛出异常,后边改为提示具体的字段
1308
+                           throw new ServiceException("必填字段未填写,请完善案件信息!");
1309
+                       }
1310
+                    }
1311
+                    // 校验人员
1312
+                    if(CollectionUtil.isNotEmpty(caseAffiliates)){
1313
+                        List<CaseAffiliate> affiliateList = caseAffiliateMap.get(id);
1314
+                        if(CollectionUtil.isNotEmpty(affiliateList)){
1315
+                            for (CaseAffiliate caseAffiliate : affiliateList) {
1316
+                                if(caseAffiliate.getIdentityType()==1){
1317
+                                    // 校验申请人
1318
+                                    for (String applicAffiliateColumn : applicAffiliateColumns) {
1319
+                                        if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, applicAffiliateColumn))){
1320
+                                            errorMsg.append(applicAffiliateColumn).append("不能为空,");
1321
+                                            // todo 暂抛出异常,后边改为提示具体的字段
1322
+                                            throw new ServiceException("必填字段未填写,请完善案件信息!");
1323
+                                        }
1324
+                                    }
1325
+                                    }else {
1326
+                                    // 校验被申请人
1327
+                                    // 校验申请人
1328
+                                    for (String applicAffiliateColumn : dectborAffiliateColumns) {
1329
+                                        if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, applicAffiliateColumn))){
1330
+                                            errorMsg.append(applicAffiliateColumn).append("不能为空,");
1331
+                                            // todo 暂抛出异常,后边改为提示具体的字段
1332
+                                            throw new ServiceException("必填字段未填写,请完善案件信息!");
1333
+                                        }
1334
+                                    }
1335
+                                }
1336
+                            }
1337
+                        }
1338
+                    }
1339
+                }
1340
+
1341
+                CaseApplication application = new CaseApplication();
1342
+                application.setId(id);
1343
+                //提交立案申请
1344
+                application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
1345
+                rows += caseApplicationMapper.submitCaseApplication(application);
1346
+                // 新增日志
1347
+                insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
1348
+            }
1286 1349
         }
1287 1350
         return rows;
1288 1351
     }

+ 14
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Datei anzeigen

@@ -80,12 +80,20 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
80 80
                 List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
81 81
                 if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
82 82
                     for (CaseAttach caseAttach : evidenceMaterialList) {
83
-                        String path = caseAttach.getAnnexName();
84
-                        String prefix = "/profile";
85
-                        int startIndex = path.indexOf(prefix);
86
-                        startIndex += prefix.length();
87
-                        String extractedPath = "/uploadPath" + path.substring(startIndex);
88
-                        caseAttach.setAnnexPath(extractedPath);
83
+                        //根据附件类型决定返回的路径
84
+                        Integer annexType = caseAttach.getAnnexType();
85
+                        if (annexType != 1){
86
+                            String path = caseAttach.getAnnexName();
87
+                            String prefix = "/profile";
88
+                            int startIndex = path.indexOf(prefix);
89
+                            startIndex += prefix.length();
90
+                            String extractedPath = "/uploadPath" + path.substring(startIndex);
91
+                            caseAttach.setAnnexPath(extractedPath);
92
+                        }else {
93
+                            String annexPath = caseAttach.getAnnexPath();
94
+                            String result = annexPath.replace("/home/ruoyi", "");
95
+                            caseAttach.setAnnexPath(result);
96
+                        }
89 97
                     }
90 98
                 }
91 99
                 caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);

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

@@ -331,15 +331,14 @@ public class VideoServiceImpl implements VideoService {
331 331
         }
332 332
         String htmlContent = "<html><body style=\"font-size:12.0pt; font-family:SimSun;\">" +reservedConferenceVO.getHtmlContent()+"</body></html>";
333 333
         // html转pdf并上传到服务器
334
-        PdfUtils pdfUtils = new PdfUtils();
335
-        boolean convertFlag = pdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() + currentFileName, htmlContent);
334
+        boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
336 335
 
337 336
         // 绑定案件
338 337
         if(convertFlag){
339 338
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
340 339
                     .annexName(fileName)
341 340
                     .annexPath(RuoYiConfig.getHtml2PDFPath())
342
-                    .annexType(11)
341
+                    .annexType(7)
343 342
                     .build();
344 343
             caseAttachMapper.save(caseAttach);
345 344
             return AjaxResult.success();
@@ -348,6 +347,37 @@ public class VideoServiceImpl implements VideoService {
348 347
         }
349 348
     }
350 349
 
350
+    @Override
351
+    public AjaxResult attachListByCaseId(Long caseAppliId, Integer annexType) {
352
+        CaseApplication caseApplication = new CaseApplication();
353
+        caseApplication.setId(caseAppliId);
354
+        caseApplication.setAnnexType(annexType);
355
+        List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
356
+        if(CollectionUtil.isEmpty(caseAttachList)){
357
+            return success(caseAttachList);
358
+        }
359
+
360
+        // 附件转换
361
+        if (caseAttachList != null && caseAttachList.size() > 0) {
362
+            for (CaseAttach caseAttach : caseAttachList) {
363
+                String annexName = caseAttach.getAnnexName();
364
+                String prefix = "/profile";
365
+                int startIndex = annexName.indexOf(prefix);
366
+                startIndex += prefix.length();
367
+                String annexPath = "/uploadPath" + annexName.substring(startIndex);
368
+                caseAttach.setAnnexPath(annexPath);
369
+                int startIndexnew = annexName.lastIndexOf("/");
370
+                if (startIndexnew != -1) {
371
+                    String annexNamenew = annexName.substring(startIndexnew + 1);
372
+                    caseAttach.setAnnexName(annexNamenew);
373
+                }
374
+
375
+
376
+            }
377
+        }
378
+        return success(caseAttachList);
379
+    }
380
+
351 381
 
352 382
     /**
353 383
      *  查询出音视频集合,并下载,在将云点播上面的音视频删除

+ 14
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Datei anzeigen

@@ -45,6 +45,19 @@
45 45
             </if>
46 46
         </where>
47 47
     </select>
48
+    <select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
49
+        select c.*,s.user_id
50
+        from case_affiliate c
51
+        left join sys_user s on c.identity_num=s.id_card
52
+        <where>
53
+            <if test="ids != null ">
54
+                case_appli_id in
55
+                <foreach collection="ids" item="item" open="(" separator="," close=")">
56
+                    #{item}
57
+                </foreach>
58
+            </if>
59
+        </where>
60
+    </select>
48 61
     <select id="selectCaseAffiliateByIdentityType"  resultMap="CaseAffiliateResult">
49 62
         select c.*
50 63
         from case_affiliate c
@@ -64,6 +77,7 @@
64 77
     </select>
65 78
 
66 79
 
80
+
67 81
     <insert id="batchCaseAffiliate">
68 82
         insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
69 83
         contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,