Преглед изворни кода

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb

# Conflicts:
#	ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
hejinbo пре 2 година
родитељ
комит
1a1f87c998
17 измењених фајлова са 423 додато и 64 уклоњено
  1. 12
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  2. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java
  3. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java
  4. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java
  5. 6
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
  6. 1
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java
  7. 30
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java
  8. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
  9. 99
    8
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java
  10. 86
    29
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  11. 10
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  12. 3
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java
  13. 3
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  14. 12
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml
  15. 22
    21
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  16. 101
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml
  17. 11
    3
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Прегледај датотеку

166
 
166
 
167
     /** 是否仲裁反请求 */
167
     /** 是否仲裁反请求 */
168
     private Integer adjudicaCounter;
168
     private Integer adjudicaCounter;
169
+    /**
170
+     * 仲裁反请求原因
171
+     */
172
+    private String adjudicaCounterReason;
169
 
173
 
170
     /** 被申请人是否缺席 */
174
     /** 被申请人是否缺席 */
171
     private Integer isAbsence;
175
     private Integer isAbsence;
178
     /** 申请人是否缺席 */
182
     /** 申请人是否缺席 */
179
     private Integer appliIsAbsen;
183
     private Integer appliIsAbsen;
180
 
184
 
185
+    public String getAdjudicaCounterReason() {
186
+        return adjudicaCounterReason;
187
+    }
188
+
189
+    public void setAdjudicaCounterReason(String adjudicaCounterReason) {
190
+        this.adjudicaCounterReason = adjudicaCounterReason;
191
+    }
192
+
181
     public Integer getAppliIsAbsen() {
193
     public Integer getAppliIsAbsen() {
182
         return appliIsAbsen;
194
         return appliIsAbsen;
183
     }
195
     }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAttach.java Прегледај датотеку

18
      * 案件申请id
18
      * 案件申请id
19
      */
19
      */
20
     private Long caseAppliId;
20
     private Long caseAppliId;
21
+    /**
22
+     * 案件记录id
23
+     */
24
+    private Long caseAppliLogId;
21
     /**
25
     /**
22
      * 附件名称
26
      * 附件名称
23
      */
27
      */
46
      * 印章状态(0未启用,1已启用)
50
      * 印章状态(0未启用,1已启用)
47
      */
51
      */
48
     private Integer sealStatus;
52
     private Integer sealStatus;
53
+    /**
54
+     * 是否是证据上传,0-否,1-是
55
+     */
56
+    private Integer isBatchUpload;
49
 
57
 
50
 }
58
 }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java Прегледај датотеку

21
      * 用户id
21
      * 用户id
22
      */
22
      */
23
     private Long userId;
23
     private Long userId;
24
+    /**
25
+     * 用户名
26
+     */
27
+    private String userName;
24
     /**
28
     /**
25
      * 案件id
29
      * 案件id
26
      */
30
      */
39
      */
43
      */
40
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
44
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
41
     private Date scheduleEndTime;
45
     private Date scheduleEndTime;
46
+    /**
47
+     * 是否超过5分钟
48
+     */
49
+    private Boolean isBeforeFiveMinutes;
42
 
50
 
43
 
51
 
44
     public ReservedConference() {
52
     public ReservedConference() {

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseEvidenceDTO.java Прегледај датотеку

31
     private Integer pendingAppointArbotrar;
31
     private Integer pendingAppointArbotrar;
32
     /** 是否仲裁反请求 */
32
     /** 是否仲裁反请求 */
33
     private Integer adjudicaCounter;
33
     private Integer adjudicaCounter;
34
+    /**
35
+     * 仲裁反请求原因
36
+     */
37
+    private String adjudicaCounterReason;
34
     /** 是否管辖异议申请 */
38
     /** 是否管辖异议申请 */
35
     private Integer objectiJuris;
39
     private Integer objectiJuris;
36
 
40
 

+ 6
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Прегледај датотеку

35
      * @param affiliateLogList
35
      * @param affiliateLogList
36
      */
36
      */
37
     void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
37
     void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
38
+
39
+    /**
40
+     * 根据案件id删除
41
+     * @param caseId
42
+     */
43
+    void deleteByCaseId(@Param("caseAppliId") Long caseId);
38
 }
44
 }

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java Прегледај датотеку

43
      */
43
      */
44
     void batchDeleteLog(@Param("ids") List<Long> ids);
44
     void batchDeleteLog(@Param("ids") List<Long> ids);
45
 
45
 
46
+    CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
46
 }
47
 }

+ 30
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachLogMapper.java Прегледај датотеку

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface CaseAttachLogMapper {
12
+    int save(CaseAttach caseAttach);
13
+
14
+    List<CaseAttach>  queryAnnexPathByCaseId(Long id);
15
+
16
+    List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
17
+
18
+
19
+    int updateCaseAttach(CaseAttach caseAttach);
20
+
21
+    int updateCaseAttachBycaseid(CaseAttach caseAttach);
22
+
23
+    int deleteByFileIds(@Param("ids") List<Integer> fileIds);
24
+
25
+    List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
26
+
27
+    CaseAttach queryAnnexById(Integer annexId);
28
+
29
+
30
+}

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java Прегледај датотеку

25
     List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
25
     List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
26
 
26
 
27
     CaseAttach queryAnnexById(Integer annexId);
27
     CaseAttach queryAnnexById(Integer annexId);
28
+
29
+    /**
30
+     * 根据案件id和附件类型删除和上传类型
31
+     * @param caseAppliId
32
+     * @param annexType
33
+     */
34
+    void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
28
 }
35
 }

+ 99
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Прегледај датотеку

3
 import cn.hutool.core.collection.CollectionUtil;
3
 import cn.hutool.core.collection.CollectionUtil;
4
 import cn.hutool.core.util.StrUtil;
4
 import cn.hutool.core.util.StrUtil;
5
 import com.ruoyi.common.core.domain.AjaxResult;
5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.domain.entity.SysDept;
6
 import com.ruoyi.common.enums.UpdateSubmitStatus;
7
 import com.ruoyi.common.enums.UpdateSubmitStatus;
7
 import com.ruoyi.common.enums.YesOrNoEnum;
8
 import com.ruoyi.common.enums.YesOrNoEnum;
8
 import com.ruoyi.common.utils.ObjectFieldUtils;
9
 import com.ruoyi.common.utils.ObjectFieldUtils;
9
 import com.ruoyi.common.utils.SmsUtils;
10
 import com.ruoyi.common.utils.SmsUtils;
10
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
11
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
11
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
12
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
13
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
12
 import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
14
 import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
13
 import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
15
 import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
14
 import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
22
 import java.util.List;
24
 import java.util.List;
23
 import java.util.Map;
25
 import java.util.Map;
24
 import java.util.Objects;
26
 import java.util.Objects;
27
+import java.util.function.Function;
25
 import java.util.stream.Collectors;
28
 import java.util.stream.Collectors;
26
 
29
 
27
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
30
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
42
     @Autowired
45
     @Autowired
43
     private CaseAffiliateMapper caseAffiliateMapper;
46
     private CaseAffiliateMapper caseAffiliateMapper;
44
     @Autowired
47
     @Autowired
48
+    private CaseAttachMapper caseAttachMapper;
49
+    @Autowired
50
+    private CaseAttachLogMapper caseAttachLogMapper;
51
+    @Autowired
45
     private SmsRecordMapper smsRecordMapper;
52
     private SmsRecordMapper smsRecordMapper;
46
     @Override
53
     @Override
47
     public int insert(CaseApplication caseApplicationLog) {
54
     public int insert(CaseApplication caseApplicationLog) {
105
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
112
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
106
                 // 如果版本号为1,则直接返回
113
                 // 如果版本号为1,则直接返回
107
                 if(vo.getVersion() <= 1){
114
                 if(vo.getVersion() <= 1){
115
+                    vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
116
+                    caseApplicationLogMapper.updateStatus(vo);
108
                     return AjaxResult.success();
117
                     return AjaxResult.success();
109
                 }
118
                 }
110
                 // 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
119
                 // 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
123
 
132
 
124
                 // 更新相关人员主表
133
                 // 更新相关人员主表
125
                 if(CollectionUtil.isNotEmpty(affiliateLogList)){
134
                 if(CollectionUtil.isNotEmpty(affiliateLogList)){
135
+                    caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
126
                     for (CaseAffiliate caseAffiliate : affiliateLogList) {
136
                     for (CaseAffiliate caseAffiliate : affiliateLogList) {
127
-                       caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
137
+                        caseAffiliate.setCaseAppliId(vo.getCaseId());
138
+
139
+                    }
140
+                    caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
141
+                }
142
+                // // 根据caseLogId查询案件记录附件表
143
+                CaseApplication caseApplication = new CaseApplication();
144
+                caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
145
+                caseApplication.setAnnexType(2);
146
+                List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
147
+                // 更新记录附件表
148
+                if(CollectionUtil.isNotEmpty(attachLogList)){
149
+                //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
150
+                    for (CaseAttach caseAttach : attachLogList) {
151
+                        caseAttach.setCaseAppliId(vo.getCaseId());
152
+                        caseAttachMapper.updateCaseAttach(caseAttach);
128
                     }
153
                     }
129
                 }
154
                 }
130
              //   caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
155
              //   caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
177
             return AjaxResult.success();
202
             return AjaxResult.success();
178
         }
203
         }
179
 
204
 
180
-        // todo 给申请人发送短信
181
         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
205
         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
182
         request.setTemplateId("1996949");
206
         request.setTemplateId("1996949");
183
         request.setPhone(caseAffiliate.getContactTelphone());
207
         request.setPhone(caseAffiliate.getContactTelphone());
209
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
233
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
210
         // 查询当前版本号和上一个版本号的案件
234
         // 查询当前版本号和上一个版本号的案件
211
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
235
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
212
-        CaseApplication beforeCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
236
+        CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
213
         // 查询案件关联人员
237
         // 查询案件关联人员
214
         beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
238
         beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
215
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
239
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
240
+        // 查询附件
241
+        CaseAttach caseAttach = new CaseAttach();
242
+        caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
243
+        caseAttach.setAnnexType(2);
244
+        caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
245
+        beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
246
+        caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
247
+        afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
216
         CompareCaseVO compareCaseVO = new CompareCaseVO();
248
         CompareCaseVO compareCaseVO = new CompareCaseVO();
217
         compareCaseVO.setBeforeCase(beforeCase);
249
         compareCaseVO.setBeforeCase(beforeCase);
218
         compareCaseVO.setAfterCase(afterCase);
250
         compareCaseVO.setAfterCase(afterCase);
219
         // 对比两个版本修改的字段
251
         // 对比两个版本修改的字段
220
         String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
252
         String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
221
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
253
                 "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
222
-        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
254
+        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
223
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
255
                 "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
224
         "compLegalperPost","responSex","responBirth"};
256
         "compLegalperPost","responSex","responBirth"};
225
         StringBuilder changeColumn = new StringBuilder();
257
         StringBuilder changeColumn = new StringBuilder();
258
+        // 对比基本字段
226
         for (String column : columns) {
259
         for (String column : columns) {
227
             String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
260
             String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
228
             String afterValue = ObjectFieldUtils.getValue(afterCase, column);
261
             String afterValue = ObjectFieldUtils.getValue(afterCase, column);
241
             }
274
             }
242
 
275
 
243
         }
276
         }
277
+        // 对比人员字段
244
         List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
278
         List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
245
         List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
279
         List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
246
         Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
280
         Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
257
                 affiliateChangeColumn.append(column).append(",");
291
                 affiliateChangeColumn.append(column).append(",");
258
             }
292
             }
259
 
293
 
260
-        }
261
-        else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
294
+        } else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
262
             affiliateChangeColumn = new StringBuilder();
295
             affiliateChangeColumn = new StringBuilder();
263
             for (String column : affiliateColumns) {
296
             for (String column : affiliateColumns) {
264
 
297
 
302
             }
335
             }
303
 
336
 
304
 
337
 
338
+        }
339
+        boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(afterCase.getCaseAttachList());
340
+        boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList());
341
+        // 对比附件
342
+        if(notEmptyFlag || emptyFlag){
343
+            changeColumn.append("fileColumn");
344
+        }else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
345
+            if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
346
+                changeColumn.append("fileColumn");
347
+            }else {
348
+                Map<String, CaseAttach> afterAttachMap = afterCase.getCaseAttachList().stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
349
+
350
+
351
+                for (CaseAttach beforeCaseAttach : beforeCase.getCaseAttachList()) {
352
+                    if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
353
+                        changeColumn.append("fileColumn");
354
+                        break;
355
+                    }
356
+                }
357
+            }
358
+
359
+
305
         }
360
         }
306
         compareCaseVO.setChangeColumn(changeColumn.toString());
361
         compareCaseVO.setChangeColumn(changeColumn.toString());
362
+        if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
363
+            List<CaseAttach> caseAttachList = afterCase.getCaseAttachList();
364
+            for (CaseAttach attach : caseAttachList) {
365
+                    String annexName = attach.getAnnexName();
366
+                    String prefix = "/profile";
367
+                    int startIndex = annexName.indexOf(prefix);
368
+                    startIndex += prefix.length();
369
+                    String annexPath = "/uploadPath" + annexName.substring(startIndex);
370
+                    attach.setAnnexPath(annexPath);
371
+                    int startIndexnew = annexName.lastIndexOf("/");
372
+                    if (startIndexnew != -1) {
373
+                        String annexNamenew = annexName.substring(startIndexnew + 1);
374
+                        attach.setAnnexName(annexNamenew);
375
+                    }
376
+
377
+
378
+                }
379
+            afterCase.setCaseAttachList(caseAttachList);
380
+        }
307
 
381
 
308
         return AjaxResult.success(compareCaseVO);
382
         return AjaxResult.success(compareCaseVO);
309
     }
383
     }
319
             caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
393
             caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
320
 
394
 
321
         }else {
395
         }else {
322
-            caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
396
+            caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
323
         }
397
         }
324
          if (caseApplicationLog == null) {
398
          if (caseApplicationLog == null) {
325
             return;
399
             return;
330
         // 根据caseLogId查询相关人员表
404
         // 根据caseLogId查询相关人员表
331
         List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
405
         List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
332
 
406
 
407
+
333
         // 更新案件主表
408
         // 更新案件主表
334
         caseApplicationMapper.updataCaseApplication(caseApplicationLog);
409
         caseApplicationMapper.updataCaseApplication(caseApplicationLog);
335
 
410
 
336
         // 更新相关人员主表
411
         // 更新相关人员主表
337
         if(CollectionUtil.isNotEmpty(affiliateLogList)){
412
         if(CollectionUtil.isNotEmpty(affiliateLogList)){
413
+            caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
338
             for (CaseAffiliate caseAffiliate : affiliateLogList) {
414
             for (CaseAffiliate caseAffiliate : affiliateLogList) {
339
-                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
415
+                caseAffiliate.setCaseAppliId(vo.getCaseId());
416
+
417
+            }
418
+            caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
419
+        }
420
+        // // 根据caseLogId查询案件记录附件表
421
+        CaseApplication caseApplication = new CaseApplication();
422
+        caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
423
+        caseApplication.setAnnexType(2);
424
+        List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
425
+        // 更新记录附件表
426
+        if(CollectionUtil.isNotEmpty(attachLogList)){
427
+        //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
428
+            for (CaseAttach caseAttach : attachLogList) {
429
+                caseAttach.setCaseAppliId(vo.getCaseId());
430
+                caseAttachMapper.updateCaseAttach(caseAttach);
340
             }
431
             }
341
         }
432
         }
342
        // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
433
        // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);

+ 86
- 29
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Прегледај датотеку

127
     private CaseApplicationLogMapper caseApplicationLogMapper;
127
     private CaseApplicationLogMapper caseApplicationLogMapper;
128
     @Autowired
128
     @Autowired
129
     private CaseAffiliateLogMapper caseAffiliateLogMapper;
129
     private CaseAffiliateLogMapper caseAffiliateLogMapper;
130
+    @Autowired
131
+    private CaseAttachLogMapper caseAttachLogMapper;
130
 
132
 
131
     // 手机号正则
133
     // 手机号正则
132
     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}$");
134
     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}$");
978
             if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
980
             if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
979
                 caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
981
                 caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
980
                 // 插入案件日志人员相关表
982
                 // 插入案件日志人员相关表
981
-                caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
983
+                if(CollectionUtil.isNotEmpty(caseAttachList)) {
984
+                    List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
985
+                    // 插入日志附件表
986
+                    if(CollectionUtil.isNotEmpty(filterList)) {
987
+                        for (CaseAttach caseAttach : filterList) {
988
+                            // 查询附件表
989
+                            CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
990
+                            attach.setCaseAppliLogId(caseApplication.getId());
991
+                            caseAttachLogMapper.save(attach);
992
+                        }
993
+                    }
994
+
995
+                }    caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
982
             }
996
             }
983
         });
997
         });
984
 
998
 
1083
 
1097
 
1084
         }
1098
         }
1085
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
1099
         List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
1086
-        if (caseAttachList != null && caseAttachList.size() > 0) {
1087
-            for (CaseAttach caseAttach : caseAttachList) {
1088
-                caseAttach.setCaseAppliId(caseApplication.getId());
1089
-                caseAttachMapper.updateCaseAttach(caseAttach);
1100
+        // 立案申请状态直接修改主表信息
1101
+            if (caseAttachList != null && caseAttachList.size() > 0
1102
+                    && caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
1103
+                List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
1104
+                if(CollectionUtil.isNotEmpty(filterList)){
1105
+                    // 先删除2的附件在新增
1106
+//                    caseAttachMapper.deleteByCasedIdAndType(caseApplication.getId(),2,0);
1107
+//                for (CaseAttach caseAttach : filterList) {
1108
+//                    caseAttach.setCaseAppliId(caseApplication.getId());
1109
+//                    caseAttachMapper.save(caseAttach);
1110
+//                }
1111
+
1112
+                    for (CaseAttach caseAttach : caseAttachList) {
1113
+                        caseAttach.setCaseAppliId(caseApplication.getId());
1114
+                        caseAttachMapper.updateCaseAttach(caseAttach);
1115
+                    }
1090
             }
1116
             }
1091
 
1117
 
1118
+
1092
         }
1119
         }
1093
         // 根据案件id查询最新版本号
1120
         // 根据案件id查询最新版本号
1094
         Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
1121
         Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
1103
 
1130
 
1104
         // 异步新增案件日志
1131
         // 异步新增案件日志
1105
         ThreadPoolUtil.execute(() -> {
1132
         ThreadPoolUtil.execute(() -> {
1106
-            caseApplication.setCaseAppliId(caseApplication.getId());
1107
-            int insertRow = caseApplicationLogMapper.insert(caseApplication);
1108
-            if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
1109
-                caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
1110
-                // 插入案件日志人员相关表
1111
-                caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
1133
+            try {
1134
+                caseApplication.setCaseAppliId(caseApplication.getId());
1135
+                int insertRow = caseApplicationLogMapper.insert(caseApplication);
1136
+                if (insertRow != 0 ) {
1137
+                    if( CollectionUtil.isNotEmpty(caseAffiliates)) {
1138
+                        caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
1139
+                        // 插入案件日志人员相关表
1140
+                        caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
1141
+                    }
1142
+                    if(CollectionUtil.isNotEmpty(caseAttachList)) {
1143
+                        List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
1144
+                        // 插入日志附件表
1145
+                       if(CollectionUtil.isNotEmpty(filterList)) {
1146
+                           for (CaseAttach caseAttach : filterList) {
1147
+                               // 查询附件表
1148
+                               CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
1149
+                               attach.setCaseAppliLogId(caseApplication.getId());
1150
+                               caseAttachLogMapper.save(attach);
1151
+                           }
1152
+                       }
1153
+
1154
+                    }
1155
+                }
1156
+            } catch (Exception e) {
1157
+                throw new RuntimeException(e);
1112
             }
1158
             }
1113
         });
1159
         });
1114
 
1160
 
2722
     public long createRoomId(Long caseId) {
2768
     public long createRoomId(Long caseId) {
2723
         long roomId = generateRoomId();
2769
         long roomId = generateRoomId();
2724
         // 新增预约会议表
2770
         // 新增预约会议表
2725
-//        ReservedConference conference = new ReservedConference(caseId, roomId,
2726
-//                null, null,0);
2771
+//        ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(),roomId,
2772
+//                null, null);
2727
 //        reservedConferenceMapper.insert(conference);
2773
 //        reservedConferenceMapper.insert(conference);
2728
         // 绑定案件与房间号
2774
         // 绑定案件与房间号
2729
         caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
2775
         caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
2757
     @Transactional
2803
     @Transactional
2758
     public List<ReservedConference> reserveConferenceList(Long caseId) {
2804
     public List<ReservedConference> reserveConferenceList(Long caseId) {
2759
         List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
2805
         List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
2760
-        List<ReservedConference> result = new ArrayList<>();
2761
-        // 判断当前时间是否大于结束时间,如果大于,则把该房间删掉
2762
-        if (CollectionUtil.isNotEmpty(reservedConferences)) {
2763
-            List<Long> ids = new ArrayList<>();
2764
-            for (ReservedConference reservedConference : reservedConferences) {
2765
-                Date endTime = reservedConference.getScheduleEndTime();
2766
-                Date now = new Date();
2767
-                if (now.after(endTime)) {
2768
-                    ids.add(reservedConference.getId());
2769
-                } else {
2770
-                    result.add(reservedConference);
2771
-                }
2806
+        if (CollectionUtil.isEmpty(reservedConferences)) {
2807
+            return reservedConferences;
2808
+        }
2809
+        Map<Long,String> userIdMap = null;
2810
+        List<Long> userIds = reservedConferences.stream().map(ReservedConference::getUserId).collect(Collectors.toList());
2811
+        if(CollectionUtil.isNotEmpty(userIds)){
2812
+            // 根据userids查询用户名
2813
+            List<SysUser> userList = sysUserMapper.selectUserListByIds(userIds);
2814
+            if(CollectionUtil.isNotEmpty(userList)){
2815
+                userIdMap = userList.stream().collect(Collectors.toMap(SysUser::getUserId,SysUser::getUserName));
2816
+            }
2817
+        }
2818
+        for (ReservedConference reservedConference : reservedConferences) {
2819
+            if(null!=reservedConference.getUserId() && null!=userIdMap){
2820
+                reservedConference.setUserName(userIdMap.get(reservedConference.getUserId()));
2821
+            }
2822
+            Date startTime = reservedConference.getScheduleStartTime();
2823
+            if (null == startTime) {
2824
+                continue;
2772
             }
2825
             }
2773
-            if (CollectionUtil.isNotEmpty(ids)) {
2774
-                // 根据id批量删除
2775
-                reservedConferenceMapper.batchDeleteByIds(ids);
2826
+            long beforeMinutes = startTime.getTime() - 1000 * 60 * 5;
2827
+            if (System.currentTimeMillis() < beforeMinutes) {
2828
+                reservedConference.setIsBeforeFiveMinutes(true);
2829
+            } else {
2830
+                reservedConference.setIsBeforeFiveMinutes(false);
2776
             }
2831
             }
2777
         }
2832
         }
2778
-        return result;
2833
+
2834
+
2835
+        return reservedConferences;
2779
     }
2836
     }
2780
 
2837
 
2781
     /**
2838
     /**

+ 10
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Прегледај датотеку

125
             }
125
             }
126
                 CaseAttach caseAttachselect = new CaseAttach();
126
                 CaseAttach caseAttachselect = new CaseAttach();
127
                 caseAttachselect.setAnnexId(caseAttach.getAnnexId());
127
                 caseAttachselect.setAnnexId(caseAttach.getAnnexId());
128
-                caseAttachselect.setAnnexName(caseAttach.getAnnexName());
128
+            String annexName = caseAttach.getAnnexName();
129
+            if(StrUtil.isNotEmpty(annexName)) {
130
+                int startIndexnew = annexName.lastIndexOf("/");
131
+                if (startIndexnew != -1) {
132
+                    String annexNamenew = annexName.substring(startIndexnew + 1);
133
+                    caseAttach.setAnnexName(annexNamenew);
134
+                }
135
+            }
129
                 caseAttachselect.setAnnexType(caseAttach.getAnnexType());
136
                 caseAttachselect.setAnnexType(caseAttach.getAnnexType());
130
                 return AjaxResult.success("上传成功", caseAttachselect);
137
                 return AjaxResult.success("上传成功", caseAttachselect);
131
         } catch (IOException e) {
138
         } catch (IOException e) {
193
         caseApplication.setId(caseEvidenceDTO.getCaseId());
200
         caseApplication.setId(caseEvidenceDTO.getCaseId());
194
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
201
         CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
195
         if (caseApplication1 != null) {
202
         if (caseApplication1 != null) {
203
+            caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
196
             int caseStatus = caseApplication1.getCaseStatus();
204
             int caseStatus = caseApplication1.getCaseStatus();
197
             caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
205
             caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
198
             //默认书面审理
206
             //默认书面审理
246
                         .annexType(annexType)
254
                         .annexType(annexType)
247
                         .userId(userId)
255
                         .userId(userId)
248
                         .userName(userName)
256
                         .userName(userName)
257
+                        .isBatchUpload(1)
249
                         .build();
258
                         .build();
250
                 int count = caseAttachMapper.save(caseAttach);
259
                 int count = caseAttachMapper.save(caseAttach);
251
                 if (count > 0 && annexType != null && annexType != 8) {
260
                 if (count > 0 && annexType != null && annexType != 8) {

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java Прегледај датотеку

365
                 staticAndMksDir = Paths.get(absPath).toFile().toString();
365
                 staticAndMksDir = Paths.get(absPath).toFile().toString();
366
             long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
366
             long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
367
             if(downloadFile>0) {
367
             if(downloadFile>0) {
368
+                log.info("下载成功roomId"+roomId);
368
                 Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
369
                 Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
370
+                log.info("下载成功caseId"+caseId);
369
                 String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
371
                 String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
370
                 // 存入数据库
372
                 // 存入数据库
371
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
373
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
374
                         .annexType(9)
376
                         .annexType(9)
375
                         .build();
377
                         .build();
376
                 caseAttachMapper.save(caseAttach);
378
                 caseAttachMapper.save(caseAttach);
379
+                log.info("保存附件号成功");
377
                 return annexName;
380
                 return annexName;
378
             }
381
             }
379
         }
382
         }

+ 3
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Прегледај датотеку

150
             #{item}
150
             #{item}
151
         </foreach>
151
         </foreach>
152
     </delete>
152
     </delete>
153
+    <delete id="deleteByCaseId">
154
+        delete from case_affiliate where case_appli_id = #{caseAppliId}
155
+    </delete>
153
 
156
 
154
 
157
 
155
 </mapper>
158
 </mapper>

+ 12
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml Прегледај датотеку

48
         <result property="lockStatus"   column="lock_status"  />
48
         <result property="lockStatus"   column="lock_status"  />
49
         <result property="version"   column="version"  />
49
         <result property="version"   column="version"  />
50
         <result property="updateSubmitStatus"   column="update_submit_status"  />
50
         <result property="updateSubmitStatus"   column="update_submit_status"  />
51
+        <result property="properPreser"   column="proper_preser"  />
51
     </resultMap>
52
     </resultMap>
52
     <insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
53
     <insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
53
         insert into case_application_log(
54
         insert into case_application_log(
69
         <if test="createBy != null  and createBy != ''">create_by,</if>
70
         <if test="createBy != null  and createBy != ''">create_by,</if>
70
         <if test="version != null ">version,</if>
71
         <if test="version != null ">version,</if>
71
         <if test="updateSubmitStatus != null ">update_submit_status,</if>
72
         <if test="updateSubmitStatus != null ">update_submit_status,</if>
73
+        <if test="properPreser != null ">proper_preser,</if>
72
         create_time
74
         create_time
73
         )values(
75
         )values(
74
         <if test="caseAppliId != null">#{caseAppliId},</if>
76
         <if test="caseAppliId != null">#{caseAppliId},</if>
89
         <if test="createBy != null  and createBy != ''">#{createBy},</if>
91
         <if test="createBy != null  and createBy != ''">#{createBy},</if>
90
         <if test="version != null ">#{version},</if>
92
         <if test="version != null ">#{version},</if>
91
         <if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
93
         <if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
94
+        <if test="properPreser != null ">#{properPreser},</if>
92
         sysdate()
95
         sysdate()
93
         )
96
         )
94
     </insert>
97
     </insert>
130
     <select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
133
     <select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
131
         SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
134
         SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
132
                loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
135
                loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
133
-               create_by,version,update_submit_status,create_time
136
+               create_by,version,update_submit_status,create_time,proper_preser
134
         FROM case_application_log
137
         FROM case_application_log
135
         WHERE case_appli_id = #{caseAppliId} and version=#{version}
138
         WHERE case_appli_id = #{caseAppliId} and version=#{version}
136
     </select>
139
     </select>
138
     <select id="selectLatestCase" resultMap="CaseApplicationResult">
141
     <select id="selectLatestCase" resultMap="CaseApplicationResult">
139
         SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
142
         SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
140
                loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
143
                loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
141
-               create_by,version,update_submit_status,create_time
144
+               create_by,version,update_submit_status,create_time,proper_preser
142
         FROM case_application_log
145
         FROM case_application_log
143
         WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
146
         WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
144
     </select>
147
     </select>
153
         FROM case_application_log
156
         FROM case_application_log
154
         WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
157
         WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
155
     </select>
158
     </select>
159
+    <select id="selectBeforeCase" resultMap="CaseApplicationResult">
160
+        SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
161
+               loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
162
+               create_by,version,update_submit_status,create_time,proper_preser
163
+        FROM case_application_log
164
+        WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
165
+    </select>
156
 
166
 
157
 
167
 
158
 </mapper>
168
 </mapper>

+ 22
- 21
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Прегледај датотеку

162
 
162
 
163
 
163
 
164
                 <!--申请人案件-->
164
                 <!--申请人案件-->
165
-                select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,
165
+                select c.id ,l.id AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
166
                 CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
166
                 CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
167
                 ELSE '无审理方式'
167
                 ELSE '无审理方式'
168
                 END arbitratMethodName,
168
                 END arbitratMethodName,
176
                 when 31 then '待修改开庭时间'
176
                 when 31 then '待修改开庭时间'
177
                 ELSE '无案件状态'
177
                 ELSE '无案件状态'
178
                 END caseStatusName,
178
                 END caseStatusName,
179
-                c.hear_date ,l.arbitrat_claims ,
180
-                l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag
181
-                ,l.fee_payable ,
182
-                c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,
179
+                c.hear_date ,c.arbitrat_claims ,
180
+                c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
181
+                ,c.fee_payable ,
182
+                c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
183
                 c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
183
                 c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
184
                 as
184
                 as
185
                 applicantName,
185
                 applicantName,
335
                 SELECT
335
                 SELECT
336
                 l.case_appli_id id,
336
                 l.case_appli_id id,
337
                 l.id AS caseLogId,
337
                 l.id AS caseLogId,
338
-                l.case_num,
339
-                l.case_subject_amount,
338
+                c.case_num,
339
+                c.case_subject_amount,
340
                 c.register_date,
340
                 c.register_date,
341
                 c.arbitrat_method,
341
                 c.arbitrat_method,
342
                 CASE
342
                 CASE
389
                 '待修改开庭时间' ELSE '无案件状态'
389
                 '待修改开庭时间' ELSE '无案件状态'
390
                 END caseStatusName,
390
                 END caseStatusName,
391
                 c.hear_date,
391
                 c.hear_date,
392
-                l.arbitrat_claims,
393
-                l.loan_start_date,
394
-                l.loan_end_date,
395
-                l.claim_princi_owed,
396
-                l.claim_interest_owed,
397
-                l.claim_liquid_damag,
398
-                l.fee_payable,
392
+                c.arbitrat_claims,
393
+                c.loan_start_date,
394
+                c.loan_end_date,
395
+                c.claim_princi_owed,
396
+                c.claim_interest_owed,
397
+                c.claim_liquid_damag,
398
+                c.fee_payable,
399
                 c.begin_video_date,
399
                 c.begin_video_date,
400
                 c.online_video_person,
400
                 c.online_video_person,
401
-                l.contract_number,
402
-                l.create_by,
401
+                c.contract_number,
402
+                c.create_by,
403
                 c.create_time,
403
                 c.create_time,
404
-                l.update_by,
405
-                l.update_time,
404
+                c.update_by,
405
+                c.update_time,
406
                 c.arbitrator_name,
406
                 c.arbitrator_name,
407
                     ca.name,
407
                     ca.name,
408
                 ca.application_organ_id ,
408
                 ca.application_organ_id ,
1455
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
1455
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
1456
             <if test="hearDate != null">hear_date = #{hearDate},</if>
1456
             <if test="hearDate != null">hear_date = #{hearDate},</if>
1457
             <if test="filearbitraUrl != null  and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
1457
             <if test="filearbitraUrl != null  and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
1458
+            <if test="adjudicaCounterReason != null  and adjudicaCounterReason != ''">adjudica_counter_reason = #{adjudicaCounterReason},</if>
1458
         </set>
1459
         </set>
1459
         where id = #{id}
1460
         where id = #{id}
1460
     </update>
1461
     </update>
1468
         update case_application set lock_status=#{lockStatus} where id = #{id}
1469
         update case_application set lock_status=#{lockStatus} where id = #{id}
1469
     </update>
1470
     </update>
1470
     <update id="bindCaseId">
1471
     <update id="bindCaseId">
1471
-       <!-- update case_application set room_id=#{roomId} where id = #{caseId} -->
1472
+        update case_application set room_id=#{roomId} where id = #{caseId}
1472
 
1473
 
1473
-        update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId}
1474
+<!--         update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId} -->
1474
     </update>
1475
     </update>
1475
     <update id="updateVersionById">
1476
     <update id="updateVersionById">
1476
         update case_application set version = #{version} where id = #{id}
1477
         update case_application set version = #{version} where id = #{id}
1585
     </select>
1586
     </select>
1586
     <select id="selectCaseIdByRoomId" resultType="java.lang.Long">
1587
     <select id="selectCaseIdByRoomId" resultType="java.lang.Long">
1587
         select id
1588
         select id
1588
-        from case_application where room_id like concat('%', #{roomId}, '%')  limit 1
1589
+        from case_application where room_id=#{roomId} limit 1
1589
     </select>
1590
     </select>
1590
 
1591
 
1591
     <select id="selectMaxRoomId" resultType="java.lang.Long">
1592
     <select id="selectMaxRoomId" resultType="java.lang.Long">

+ 101
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachLogMapper.xml Прегледај датотеку

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAttachLogMapper">
6
+    <resultMap type="CaseAttach" id="CaseAttachResult">
7
+        <id     property="annexId"       column="annex_id"      />
8
+        <result property="caseAppliId"       column="case_appli_id"      />
9
+        <result property="annexName"     column="annex_name"    />
10
+        <result property="annexPath"     column="annex_path"    />
11
+        <result property="annexType"     column="annex_type"    />
12
+        <result property="note"     column="note"    />
13
+        <result property="userId"     column="use_id"    />
14
+        <result property="userName"     column="use_account"    />
15
+        <result property="sealStatus"     column="seal_status"    />
16
+        <result property="caseAppliLogId"     column="case_appli_log_id"    />
17
+    </resultMap>
18
+    <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
19
+        INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
20
+        VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
21
+    </insert>
22
+    <delete id="deleteByFileIds">
23
+        delete from case_attach_log
24
+        where annex_id in
25
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
26
+            #{id}
27
+        </foreach>
28
+    </delete>
29
+
30
+    <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
31
+        select *
32
+        from case_attach_log
33
+        where case_appli_log_id =#{id}
34
+    </select>
35
+
36
+    <select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
37
+        select *
38
+        from case_attach_log
39
+        <where>
40
+            <if test="caseAppliLogId != null ">
41
+                AND case_appli_log_id = #{caseAppliLogId}
42
+            </if>
43
+            <if test="annexType != null ">
44
+                AND annex_type = #{annexType}
45
+            </if>
46
+        </where>
47
+    </select>
48
+
49
+    <select id="queryCaseAttachList" resultMap="CaseAttachResult">
50
+        select *
51
+        from case_attach_log
52
+        <where>
53
+            <if test="caseLogId != null ">
54
+                AND case_appli_log_id = #{caseLogId}
55
+            </if>
56
+            <if test="annexType != null ">
57
+                AND annex_type = #{annexType}
58
+            </if>
59
+            <if test="annexTypeList != null and annexTypeList.size() > 0">
60
+                and annex_type in
61
+                <foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
62
+                    #{annexType}
63
+                </foreach>
64
+            </if>
65
+        </where>
66
+    </select>
67
+    <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
68
+        select *
69
+        from case_attach_log
70
+        <where>
71
+            <if test="annexId != null ">
72
+                AND annex_id = #{annexId}
73
+            </if>
74
+        </where>
75
+    </select>
76
+
77
+    <update id="updateCaseAttach" parameterType="CaseAttach">
78
+        update case_attach_log
79
+        set
80
+            case_appli_log_id= #{caseAppliLogId}
81
+        where annex_id = #{annexId}
82
+    </update>
83
+
84
+    <update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
85
+        update case_attach_log
86
+        <set>
87
+            <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
88
+            <if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
89
+        </set>
90
+        <where>
91
+            <if test="caseAppliId != null ">
92
+                AND case_appli_log_id  = #{caseAppliLogId}
93
+            </if>
94
+            <if test="annexType != null ">
95
+                AND annex_type  = #{annexType}
96
+            </if>
97
+        </where>
98
+    </update>
99
+
100
+
101
+</mapper>

+ 11
- 3
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Прегледај датотеку

15
         <result property="sealStatus"     column="seal_status"    />
15
         <result property="sealStatus"     column="seal_status"    />
16
     </resultMap>
16
     </resultMap>
17
     <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
17
     <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
18
-        INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
19
-        VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
18
+        INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
19
+        VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus},#{isBatchUpload})
20
     </insert>
20
     </insert>
21
     <delete id="deleteByFileIds">
21
     <delete id="deleteByFileIds">
22
         delete from case_attach
22
         delete from case_attach
25
             #{id}
25
             #{id}
26
         </foreach>
26
         </foreach>
27
     </delete>
27
     </delete>
28
+    <delete id="deleteByCasedIdAndType">
29
+        delete from case_attach
30
+        where case_appli_id = #{caseAppliId}
31
+        and annex_type = #{annexType}
32
+        <if test="isBatchUpload != null ">
33
+            AND is_batch_upload = #{isBatchUpload}
34
+        </if>
35
+    </delete>
28
 
36
 
29
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
37
     <select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
30
         select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
38
         select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
64
         </where>
72
         </where>
65
     </select>
73
     </select>
66
     <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
74
     <select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
67
-        select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
75
+        select *
68
         from case_attach
76
         from case_attach
69
         <where>
77
         <where>
70
             <if test="annexId != null ">
78
             <if test="annexId != null ">