Kaynağa Gözat

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

wangqiong123 2 yıl önce
ebeveyn
işleme
4e85bf306b

+ 4
- 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java Dosyayı Görüntüle

222
 
222
 
223
     /**
223
     /**
224
      * 根据模板id查询模板字段列表
224
      * 根据模板id查询模板字段列表
225
-     * @param templateManage
225
+     * @param id
226
      * @return
226
      * @return
227
      */
227
      */
228
     @GetMapping("/getTemplateInfoById")
228
     @GetMapping("/getTemplateInfoById")
229
-    public AjaxResult getTemplateInfoById(@RequestBody  TemplateManage templateManage){
230
-        if(templateManage.getId()==null){
231
-            return error("参数校验错误");
232
-        }
229
+    public AjaxResult getTemplateInfoById(@RequestParam("id") Long id){
230
+        TemplateManage templateManage = new TemplateManage();
231
+        templateManage.setId(id);
233
         List<FatchRule> fatchRuleList = deptIdentifyService.getTemplateInfoById(templateManage);
232
         List<FatchRule> fatchRuleList = deptIdentifyService.getTemplateInfoById(templateManage);
234
         return AjaxResult.success(fatchRuleList);
233
         return AjaxResult.success(fatchRuleList);
235
     }
234
     }

+ 3
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Dosyayı Görüntüle

1093
             if(CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
1093
             if(CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
1094
                 // 修改自定义字段
1094
                 // 修改自定义字段
1095
                 for (ColumnValue columnValue : caseApplication.getColumnValues()) {
1095
                 for (ColumnValue columnValue : caseApplication.getColumnValues()) {
1096
-                    columnValueMapper.updateColumnValue(columnValue);
1096
+                    if(StrUtil.isNotEmpty(columnValue.getValue())) {
1097
+                        columnValueMapper.updateColumnValue(columnValue);
1098
+                    }
1097
                 }
1099
                 }
1098
             }
1100
             }
1099
             // 修改记录表状态为同意提交修改的内容
1101
             // 修改记录表状态为同意提交修改的内容

+ 103
- 45
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseZipImportImpl.java Dosyayı Görüntüle

32
 import org.apache.pdfbox.pdmodel.PDDocument;
32
 import org.apache.pdfbox.pdmodel.PDDocument;
33
 import org.springframework.beans.factory.annotation.Autowired;
33
 import org.springframework.beans.factory.annotation.Autowired;
34
 import org.springframework.stereotype.Service;
34
 import org.springframework.stereotype.Service;
35
+import org.springframework.transaction.annotation.Transactional;
35
 import org.springframework.web.multipart.MultipartFile;
36
 import org.springframework.web.multipart.MultipartFile;
36
 
37
 
37
 import java.io.*;
38
 import java.io.*;
93
     private Integer maxCaseNum;
94
     private Integer maxCaseNum;
94
     private Integer maxBatchNumber;
95
     private Integer maxBatchNumber;
95
 
96
 
96
-
97
+@Transactional
97
     public AjaxResult zipImport(MultipartFile file, Long templateId) {
98
     public AjaxResult zipImport(MultipartFile file, Long templateId) {
98
         UUID uuid = UUID.randomUUID();
99
         UUID uuid = UUID.randomUUID();
99
         // todo
100
         // todo
166
             throw new ServiceException("未找到文件夹");
167
             throw new ServiceException("未找到文件夹");
167
         }
168
         }
168
         File[] files = directory.listFiles();
169
         File[] files = directory.listFiles();
169
-            CaseZipImportTask caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchMap, fatchRuleMap, userMap, dictDataList, files , deptMap,SecurityUtils.getLoginUser());
170
-        Future<List<CaseApplication>> future = ThreadPoolUtil.submit(caseZipImportTask);
170
+    CaseZipImportTask caseZipImportTask = null;
171
+    try {
172
+        caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchMap, fatchRuleMap, userMap, dictDataList, files , deptMap, SecurityUtils.getLoginUser());
173
+    } catch (Exception e) {
174
+        return error("导入失败");
175
+    }
176
+    Future<List<CaseApplication>> future = ThreadPoolUtil.submit(caseZipImportTask);
171
         try {
177
         try {
172
             if(future.get()!=null){
178
             if(future.get()!=null){
173
                 return success("导入成功");
179
                 return success("导入成功");
174
             }
180
             }
175
         } catch (InterruptedException e) {
181
         } catch (InterruptedException e) {
176
             e.printStackTrace();
182
             e.printStackTrace();
183
+            return success("导入失败");
177
         } catch (ExecutionException e) {
184
         } catch (ExecutionException e) {
185
+
178
             e.printStackTrace();
186
             e.printStackTrace();
187
+            return success("导入失败");
179
         }
188
         }
180
-        return error("无可导入的案件");
189
+        return error("导入失败");
181
 
190
 
182
 
191
 
183
     }
192
     }
184
-
193
+    @Transactional
185
     public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap, Map<String, String> fatchMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
194
     public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap, Map<String, String> fatchMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
186
         // fileMap<caseId, List<File>>
195
         // fileMap<caseId, List<File>>
187
         Map<String, String> fileMap = findFile(file, fatchRuleList);
196
         Map<String, String> fileMap = findFile(file, fatchRuleList);
288
                 caseApplication.setCaseAttachList(caseAttachs);
297
                 caseApplication.setCaseAttachList(caseAttachs);
289
                 // 案件压缩包导入
298
                 // 案件压缩包导入
290
                 caseApplication.setImportFlag(2);
299
                 caseApplication.setImportFlag(2);
291
-                caseApplicationMapper.insertCaseApplication(caseApplication);
300
+                // 多线程执行
301
+//                List<MultipleThreadListParam> execList = new ArrayList<>();
302
+//                if (CollectionUtil.isNotEmpty(addUsers)) {
303
+//                    Function<List<SysUser>, Integer> function = userMapper::batchSave;
304
+//                    execList.add(new MultipleThreadListParam(function, addUsers));
305
+//                }
306
+//                if (CollectionUtil.isNotEmpty(userRoleList)) {
307
+//                    Function<List<SysUserRole>, Integer> function = userRoleMapper::batchUserRole;
308
+//                    execList.add(new MultipleThreadListParam(function, userRoleList));
309
+//
310
+//                }
311
+//                if (CollectionUtil.isNotEmpty(sysDepts)) {
312
+//                    Function<List<SysDept>, Integer> function = sysDeptMapper::batchSave;
313
+//                    execList.add(new MultipleThreadListParam(function, sysDepts));
314
+//
315
+//                }
316
+//                if (CollectionUtil.isNotEmpty(caseApplications)) {
317
+//                    Function<List<CaseApplication>, Integer> function = caseApplicationMapper::batchSave;
318
+//                    execList.add(new MultipleThreadListParam(function, caseApplications));
319
+//                    Function<List<CaseApplication>, Integer> functionLog = caseApplicationLogMapper::batchSave;
320
+//                    execList.add(new MultipleThreadListParam(functionLog, caseApplications));
321
+//
322
+//                }
323
+//                if (CollectionUtil.isNotEmpty(caseAffiliates)) {
324
+//                    Function<List<CaseAffiliate>, Integer> function = caseAffiliateMapper::batchCaseAffiliate;
325
+//                    execList.add(new MultipleThreadListParam(function, caseAffiliates));
326
+//                    Function<List<CaseAffiliate>, Integer> functionLog = caseAffiliateLogMapper::batchCaseAffiliate;
327
+//                    execList.add(new MultipleThreadListParam(functionLog, caseAffiliates));
328
+//                }
329
+//                if (CollectionUtil.isNotEmpty(caseAttachs)) {
330
+//                    Function<List<CaseAttach>, Integer> function = caseAttachMapper::batchSave;
331
+//                    execList.add(new MultipleThreadListParam(function, caseAttachs));
332
+//                    Function<List<CaseAttach>, Integer> functionLog = caseAttachLogMapper::batchSave;
333
+//                    execList.add(new MultipleThreadListParam(functionLog, caseAttachs));
334
+//                }
335
+//                if (CollectionUtil.isNotEmpty(columnValueList)) {
336
+//                    Function<List<ColumnValue>, Integer> function = columnValueMapper::batchSave;
337
+//                    execList.add(new MultipleThreadListParam(function, columnValueList));
338
+//                    Function<List<ColumnValue>, Integer> functionLog = columnValueLogMapper::batchSave;
339
+//                    execList.add(new MultipleThreadListParam(functionLog, columnValueList));
340
+//                }
341
+//                if (CollectionUtil.isNotEmpty(execList)) {
342
+//                    MultipleThreadWorkUtil.execListFun(execList.toArray(new MultipleThreadListParam[execList.size()]));
343
+//                }
292
                 // 多线程执行
344
                 // 多线程执行
293
                 ThreadPoolUtil.execute(() -> {
345
                 ThreadPoolUtil.execute(() -> {
294
-                    caseApplicationLogMapper.insert(caseApplication);
295
-                    // 多线程执行
296
-                    if (CollectionUtil.isNotEmpty(addUsers)) {
297
-                        userMapper.batchSave(addUsers);
346
+                    try {
347
+                        caseApplicationMapper.insertCaseApplication(caseApplication);
348
+                        caseApplicationLogMapper.insert(caseApplication);
349
+                        // 多线程执行
350
+                        if (CollectionUtil.isNotEmpty(addUsers)) {
351
+                            userMapper.batchSave(addUsers);
298
 
352
 
299
-                    }
300
-                    if (CollectionUtil.isNotEmpty(userRoleList)) {
301
-                        userRoleMapper.batchUserRole(userRoleList);
353
+                        }
354
+                        if (CollectionUtil.isNotEmpty(userRoleList)) {
355
+                            userRoleMapper.batchUserRole(userRoleList);
302
 
356
 
303
-                    }
304
-                    if (CollectionUtil.isNotEmpty(sysDepts)) {
305
-                        sysDeptMapper.batchSave(sysDepts);
357
+                        }
358
+                        if (CollectionUtil.isNotEmpty(sysDepts)) {
359
+                            sysDeptMapper.batchSave(sysDepts);
306
 
360
 
307
-                    }
308
-                    if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
309
-                        caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
310
-                        caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
311
-                    }
312
-                    if (CollectionUtil.isNotEmpty(caseAttachs)) {
313
-                        caseAttachMapper.batchSave(caseAttachs);
314
-                        caseAttachLogMapper.batchSave(caseAttachs);
361
+                        }
362
+                        if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
363
+                            caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
364
+                            caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
365
+                        }
366
+                        if (CollectionUtil.isNotEmpty(caseAttachs)) {
367
+                            caseAttachMapper.batchSave(caseAttachs);
368
+                            caseAttachLogMapper.batchSave(caseAttachs);
315
 
369
 
316
-                    }
317
-                    if (CollectionUtil.isNotEmpty(columnValueList)) {
318
-                        columnValueMapper.batchSave(columnValueList);
319
-                        columnValueLogMapper.batchSave(columnValueList);
320
-                    }
321
-                    // 新增日志
322
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
323
-                    // 发送短信
324
-                    if (CollectionUtil.isNotEmpty(smsRequestList)) {
325
-                        Map<Long, SmsSendRecord> sendRecordMap = null;
326
-                        if (CollectionUtil.isNotEmpty(smsSendRecordList)) {
327
-                            sendRecordMap = smsSendRecordList.stream().collect(Collectors.toMap(SmsSendRecord::getCaseId, Function.identity()));
328
-                            for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
329
-                                Boolean aBoolean = SmsUtils.sendSms(request);
330
-                                if (sendRecordMap != null && sendRecordMap.containsKey(sendSmsRequest.getCaseId())) {
331
-                                    if (aBoolean) {
332
-                                        sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(1);
333
-                                    } else {
334
-                                        sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(0);
370
+                        }
371
+                        if (CollectionUtil.isNotEmpty(columnValueList)) {
372
+                            columnValueMapper.batchSave(columnValueList);
373
+                            columnValueLogMapper.batchSave(columnValueList);
374
+                        }
375
+                        // 新增日志
376
+                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
377
+                        // 发送短信
378
+                        if (CollectionUtil.isNotEmpty(smsRequestList)) {
379
+                            Map<Long, SmsSendRecord> sendRecordMap = null;
380
+                            if (CollectionUtil.isNotEmpty(smsSendRecordList)) {
381
+                                sendRecordMap = smsSendRecordList.stream().collect(Collectors.toMap(SmsSendRecord::getCaseId, Function.identity()));
382
+                                for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
383
+                                    Boolean aBoolean = SmsUtils.sendSms(request);
384
+                                    if (sendRecordMap != null && sendRecordMap.containsKey(sendSmsRequest.getCaseId())) {
385
+                                        if (aBoolean) {
386
+                                            sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(1);
387
+                                        } else {
388
+                                            sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(0);
389
+                                        }
335
                                     }
390
                                     }
336
                                 }
391
                                 }
392
+                                smsRecordMapper.batchSaveSmsSendRecord(smsSendRecordList);
337
                             }
393
                             }
338
-                            smsRecordMapper.batchSaveSmsSendRecord(smsSendRecordList);
339
-                        }
340
 
394
 
341
 
395
 
396
+                        }
397
+                    } catch (Exception e) {
398
+                        e.printStackTrace();
399
+                        throw new RuntimeException("导入失败,请检查抓取规则是否正确");
342
                     }
400
                     }
343
 
401
 
344
                 });
402
                 });

+ 10
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/task/CaseZipImportTask.java Dosyayı Görüntüle

49
     @Override
49
     @Override
50
     public List<CaseApplication> call() {
50
     public List<CaseApplication> call() {
51
         List<CaseApplication> caseApplications = new ArrayList<>();
51
         List<CaseApplication> caseApplications = new ArrayList<>();
52
-        for (File file1 : files) {
53
-            if (file1.isDirectory() && file1.listFiles() != null) {
52
+        try {
53
+            for (File file1 : files) {
54
+                if (file1.isDirectory() && file1.listFiles() != null) {
54
 
55
 
55
-                for (File file2 : file1.listFiles()) {
56
-                    CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser);
57
-                    if (caseApplication != null) {
58
-                        caseApplications.add(caseApplication);
56
+                    for (File file2 : file1.listFiles()) {
57
+                        CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser);
58
+                        if (caseApplication != null) {
59
+                            caseApplications.add(caseApplication);
60
+                        }
59
                     }
61
                     }
60
                 }
62
                 }
61
             }
63
             }
64
+        } catch (Exception e) {
65
+            throw new RuntimeException("导入失败");
62
         }
66
         }
63
 
67
 
64
         return caseApplications;
68
         return caseApplications;

+ 8
- 8
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml Dosyayı Görüntüle

204
     <delete id="batchDeleteLog">
204
     <delete id="batchDeleteLog">
205
 
205
 
206
         delete from case_application_log l where l.id in
206
         delete from case_application_log l where l.id in
207
-        <foreach collection="ids" item="id" separator=",">
208
-            #{id}
207
+        <foreach collection="ids" item="item" open="(" separator="," close=")">
208
+            #{item}
209
         </foreach>
209
         </foreach>
210
         ;
210
         ;
211
         delete from case_affiliate_log l where l.case_appli_log_id in
211
         delete from case_affiliate_log l where l.case_appli_log_id in
212
-        <foreach collection="ids" item="id" separator=",">
213
-            #{id}
212
+        <foreach collection="ids" item="item" open="(" separator="," close=")">
213
+            #{item}
214
         </foreach>
214
         </foreach>
215
         ;
215
         ;
216
         delete from case_attach_log l where l.case_appli_log_id in
216
         delete from case_attach_log l where l.case_appli_log_id in
217
-        <foreach collection="ids" item="id" separator=",">
218
-            #{id}
217
+        <foreach collection="ids" item="item" open="(" separator="," close=")">
218
+            #{item}
219
         </foreach>
219
         </foreach>
220
         ;
220
         ;
221
         delete from column_value_log l where l.case_appli_log_id in
221
         delete from column_value_log l where l.case_appli_log_id in
222
-        <foreach collection="ids" item="id" separator=",">
223
-            #{id}
222
+        <foreach collection="ids" item="item" open="(" separator="," close=")">
223
+            #{item}
224
         </foreach>
224
         </foreach>
225
         ;
225
         ;
226
     </delete>
226
     </delete>

+ 251
- 123
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Dosyayı Görüntüle

5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper">
6
 
6
 
7
     <resultMap type="CaseApplication" id="CaseApplicationResult">
7
     <resultMap type="CaseApplication" id="CaseApplicationResult">
8
-        <id     property="id"       column="id"      />
9
-        <result property="caseNum"       column="case_num"      />
10
-        <result property="caseName"       column="case_name"      />
11
-        <result property="caseSubjectAmount"     column="case_subject_amount"    />
12
-        <result property="registerDate"     column="register_date"    />
13
-        <result property="arbitratMethod"        column="arbitrat_method"        />
14
-        <result property="caseStatus"  column="case_status"  />
15
-        <result property="hearDate"          column="hear_date"          />
16
-        <result property="arbitratClaims"       column="arbitrat_claims"       />
17
-        <result property="loanStartDate"     column="loan_start_date"     />
18
-        <result property="loanEndDate"       column="loan_end_date"       />
19
-        <result property="claimPrinciOwed"      column="claim_princi_owed"     />
20
-        <result property="claimInterestOwed"      column="claim_interest_owed"     />
21
-        <result property="claimLiquidDamag"    column="claim_liquid_damag"   />
22
-
23
-        <result property="feePayable"          column="fee_payable"          />
24
-        <result property="beginVideoDate"     column="begin_video_date"     />
25
-        <result property="onlineVideoPerson"       column="online_video_person"       />
26
-        <result property="contractNumber"      column="contract_number"     />
27
-        <result property="caseStatusName"      column="caseStatusName"     />
28
-        <result property="createBy"     column="create_by"    />
29
-        <result property="createTime"   column="create_time"  />
30
-        <result property="updateBy"     column="update_by"    />
31
-        <result property="updateTime"   column="update_time"  />
32
-        <result property="arbitratMethodName"   column="arbitratMethodName"  />
33
-
34
-        <result property="applicantIsWrittenHear"   column="appli_iswrit_hear"  />
35
-        <result property="respondentIsWrittenHear"   column="respon_isWrit_hear"  />
36
-
37
-        <result property="isAbsence"   column="is_absence"  />
38
-        <result property="responCrossOpin"   column="respon_cross_opin"  />
39
-        <result property="applicaCrossOpin"   column="applica_cross_opin"  />
40
-        <result property="responDefenOpini"   column="respon_defen_opini"  />
41
-
42
-        <result property="arbitratorId"   column="arbitrator_id"  />
43
-        <result property="arbitratorName"   column="arbitrator_name"  />
44
-        <result property="paymentStatus"   column="payment_status"  />
45
-        <result property="paymentStatusName"   column="paymentStatusName"  />
46
-        <result property="filearbitraUrl"   column="filearbitra_url"  />
47
-
48
-        <result property="requestRule"   column="request_rule"  />
49
-        <result property="properPreser"   column="proper_preser"  />
50
-        <result property="adjudicaCounter"   column="adjudica_counter"  />
51
-        <result property="lockStatus"   column="lock_status"  />
52
-        <result property="facts"   column="facts"  />
53
-
54
-        <result property="batchNumber"   column="batch_number"  />
55
-        <result property="mediationAgreement"   column="mediation_agreement"  />
8
+        <id property="id" column="id"/>
9
+        <result property="caseNum" column="case_num"/>
10
+        <result property="caseName" column="case_name"/>
11
+        <result property="caseSubjectAmount" column="case_subject_amount"/>
12
+        <result property="registerDate" column="register_date"/>
13
+        <result property="arbitratMethod" column="arbitrat_method"/>
14
+        <result property="caseStatus" column="case_status"/>
15
+        <result property="hearDate" column="hear_date"/>
16
+        <result property="arbitratClaims" column="arbitrat_claims"/>
17
+        <result property="loanStartDate" column="loan_start_date"/>
18
+        <result property="loanEndDate" column="loan_end_date"/>
19
+        <result property="claimPrinciOwed" column="claim_princi_owed"/>
20
+        <result property="claimInterestOwed" column="claim_interest_owed"/>
21
+        <result property="claimLiquidDamag" column="claim_liquid_damag"/>
22
+
23
+        <result property="feePayable" column="fee_payable"/>
24
+        <result property="beginVideoDate" column="begin_video_date"/>
25
+        <result property="onlineVideoPerson" column="online_video_person"/>
26
+        <result property="contractNumber" column="contract_number"/>
27
+        <result property="caseStatusName" column="caseStatusName"/>
28
+        <result property="createBy" column="create_by"/>
29
+        <result property="createTime" column="create_time"/>
30
+        <result property="updateBy" column="update_by"/>
31
+        <result property="updateTime" column="update_time"/>
32
+        <result property="arbitratMethodName" column="arbitratMethodName"/>
33
+
34
+        <result property="applicantIsWrittenHear" column="appli_iswrit_hear"/>
35
+        <result property="respondentIsWrittenHear" column="respon_isWrit_hear"/>
36
+
37
+        <result property="isAbsence" column="is_absence"/>
38
+        <result property="responCrossOpin" column="respon_cross_opin"/>
39
+        <result property="applicaCrossOpin" column="applica_cross_opin"/>
40
+        <result property="responDefenOpini" column="respon_defen_opini"/>
41
+
42
+        <result property="arbitratorId" column="arbitrator_id"/>
43
+        <result property="arbitratorName" column="arbitrator_name"/>
44
+        <result property="paymentStatus" column="payment_status"/>
45
+        <result property="paymentStatusName" column="paymentStatusName"/>
46
+        <result property="filearbitraUrl" column="filearbitra_url"/>
47
+
48
+        <result property="requestRule" column="request_rule"/>
49
+        <result property="properPreser" column="proper_preser"/>
50
+        <result property="adjudicaCounter" column="adjudica_counter"/>
51
+        <result property="lockStatus" column="lock_status"/>
52
+        <result property="facts" column="facts"/>
53
+
54
+        <result property="batchNumber" column="batch_number"/>
55
+        <result property="mediationAgreement" column="mediation_agreement"/>
56
     </resultMap>
56
     </resultMap>
57
 
57
 
58
 
58
 
368
                 JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
368
                 JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
369
                 WHERE
369
                 WHERE
370
                  r.create_by=#{loginUserName}  AND ca.identity_type=1
370
                  r.create_by=#{loginUserName}  AND ca.identity_type=1
371
+                 and c.id not in(
372
+                <trim suffixOverrides="union">
373
+                <!--被申请人,仲裁员,部门长,财务,代理人案件-->
374
+                <if test="isOtherRole!=null and isOtherRole==1">
375
+                    select c.id
376
+                    from case_application c
377
+                    JOIN case_affiliate ca ON ca.case_appli_id = c.id
378
+                    <where>
379
+                        <!--根据角色和状态过滤-->
380
+                        <!--被申请人-->
381
+                        <if test="idCard != null and idCard != ''">
382
+                            or (ca.identity_num=#{idCard} AND ca.identity_type=2
383
+                            and (c.case_status=4 or c.case_status=17)
384
+                            )
385
+                        </if>
386
+                        <!--仲裁员-->
387
+                        <if test="userId != null and userId != ''">
388
+                            or ( ca.identity_type=1 and
389
+                            c.case_status in (7,13,17,18)
390
+                            and
391
+                            instr (c.arbitrator_id,#{userId})>0)
392
+                        </if>
393
+                        <!--部门长-->
394
+                        <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
395
+                            or (ca.identity_type=1)
396
+                        </if>
397
+                        <!--财务-->
398
+                        <if test="financeStatus != null and financeStatus != ''">
399
+                            or (ca.identity_type=1
400
+                            and c.case_status =#{financeStatus}
401
+                            )
402
+                        </if>
403
+                        <!--代理人-->
404
+                        <if test="agentDeptIds != null and agentDeptIds.size()>0">
405
+                            or (
406
+                            ca.application_organ_id in
407
+                            <foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
408
+                            </foreach>
409
+                            AND ca.identity_type=1
410
+                            and c.case_status in (0,9)
411
+                            )
412
+
413
+                        </if>
414
+                    </where>
415
+                    union
416
+                </if>
417
+                <if test="applicationOrganId != null and applicationOrganId != ''">
418
+
419
+
420
+                    <!--申请人案件-->
421
+                    select c.id
422
+                    from case_application c
423
+                    JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
424
+
425
+                    <where>
426
+                        (c.case_status &lt;= 10 or c.case_status=31) AND
427
+                        ca.identity_type=1
428
+
429
+                        <if test="applicationOrganId != null and applicationOrganId != ''">
430
+                            AND ca.application_organ_id = #{applicationOrganId}
431
+                        </if>
432
+                    </where>
433
+                    union
434
+                </if>
435
+                <!--秘书案件-->
436
+                <if test="deptIds != null and deptIds.size() > 0">
437
+
438
+                    <!--秘书主表案件-->
439
+                    SELECT
440
+                    c.id
441
+                    FROM
442
+                    case_application c
443
+                    JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
444
+                    JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and
445
+                    l.version
446
+                    = (
447
+                    SELECT
448
+                    max( version ) version
449
+                    FROM
450
+                    case_application_log
451
+                    WHERE case_appli_id = c.id
452
+                    )
453
+                    WHERE
454
+                    ca.identity_type=1
455
+                    and c.case_status in (1,5,8,9,11,14,15,16,17,31)
456
+                    union
457
+                    <!--秘书审核案件-->
458
+                    SELECT
459
+                    l.case_appli_id id
460
+                    FROM
461
+                    case_application c
462
+                    JOIN case_application_log l ON c.id = l.case_appli_id
463
+                    JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
464
+                    AND ca.identity_type = 1
465
+                    WHERE
466
+                    l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
467
+
468
+                    <!-- 查询该案件的最新记录 -->
469
+                    AND l.version = (
470
+                    SELECT
471
+                    max( version ) version
472
+                    FROM
473
+                    case_application_log
474
+                    WHERE
475
+                    c.id = case_appli_id)
476
+                </if>
477
+                </trim>
478
+                )
371
             </if>
479
             </if>
372
 
480
 
373
         </trim>
481
         </trim>
391
     </select>
499
     </select>
392
 
500
 
393
 
501
 
394
-    <select id="selectHandledCase"  resultMap="CaseApplicationResult">
502
+    <select id="selectHandledCase" resultMap="CaseApplicationResult">
395
         select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
503
         select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
396
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
504
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
397
         ELSE '无审理方式'
505
         ELSE '无审理方式'
398
         END arbitratMethodName,
506
         END arbitratMethodName,
399
         c.case_status ,
507
         c.case_status ,
400
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
508
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
401
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
509
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
402
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
510
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
403
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
511
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
408
         ELSE '无案件状态'
516
         ELSE '无案件状态'
409
         END caseStatusName,
517
         END caseStatusName,
410
         c.hear_date ,c.arbitrat_claims ,
518
         c.hear_date ,c.arbitrat_claims ,
411
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
519
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
520
+        ,c.fee_payable ,
412
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
521
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
413
-        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url,c.version
522
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId
523
+        ,ca.application_organ_name as applicantName,c.filearbitra_url,c.version
414
         from case_log_record r
524
         from case_log_record r
415
         join case_application c on r.case_appli_id=c.id
525
         join case_application c on r.case_appli_id=c.id
416
         JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
526
         JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
423
                 AND c.case_num = #{caseNum}
533
                 AND c.case_num = #{caseNum}
424
             </if>
534
             </if>
425
             <if test="nameId != null and nameId != ''">
535
             <if test="nameId != null and nameId != ''">
426
-                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
536
+                AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
427
             </if>
537
             </if>
428
             <if test="loginUserName != null and loginUserName != ''">
538
             <if test="loginUserName != null and loginUserName != ''">
429
-                AND r.create_by=#{loginUserName}  AND ca.identity_type=1
539
+                AND r.create_by=#{loginUserName} AND ca.identity_type=1
430
             </if>
540
             </if>
431
 
541
 
432
         </where>
542
         </where>
443
         from(
553
         from(
444
         select t.id,t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
554
         select t.id,t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
445
         t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
555
         t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
446
-        t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
556
+        t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed
557
+        ,t.claim_liquid_damag,t.fee_payable ,
447
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
558
         t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
448
         t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
559
         t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
449
         t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url,t.lock_status,t.version
560
         t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url,t.lock_status,t.version
480
                 AND c.case_num = #{caseNum}
591
                 AND c.case_num = #{caseNum}
481
             </if>
592
             </if>
482
             <if test="nameId != null and nameId != ''">
593
             <if test="nameId != null and nameId != ''">
483
-                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
594
+                AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
484
             </if>
595
             </if>
485
             <if test="caseStatusList != null and caseStatusList.size() > 0">
596
             <if test="caseStatusList != null and caseStatusList.size() > 0">
486
                 and c.case_status in
597
                 and c.case_status in
521
             </if>
632
             </if>
522
             <!--财务-->
633
             <!--财务-->
523
             <if test="financeStatus != null and financeStatus != ''">
634
             <if test="financeStatus != null and financeStatus != ''">
524
-                or  (t.identity_type=1 and t.case_status =#{financeStatus})
635
+                or (t.identity_type=1 and t.case_status =#{financeStatus})
525
 
636
 
526
 
637
 
527
             </if>
638
             </if>
565
         <trim suffixOverrides="union">
676
         <trim suffixOverrides="union">
566
             <!--被申请人,仲裁员,部门长,财务,代理人案件-->
677
             <!--被申请人,仲裁员,部门长,财务,代理人案件-->
567
             <if test="isOtherRole!=null and isOtherRole==1">
678
             <if test="isOtherRole!=null and isOtherRole==1">
568
-                select  DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
679
+                select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num ,
680
+                t.identity_type from(
569
                 select c.id ,
681
                 select c.id ,
570
                 c.case_status,ca.application_organ_id,
682
                 c.case_status,ca.application_organ_id,
571
                 c.arbitrator_id,ca.identity_num , ca.identity_type
683
                 c.arbitrator_id,ca.identity_num , ca.identity_type
612
                     </if>
724
                     </if>
613
                     <!--财务-->
725
                     <!--财务-->
614
                     <if test="financeStatus != null and financeStatus != ''">
726
                     <if test="financeStatus != null and financeStatus != ''">
615
-                        or   ( t.identity_type=1 and t.case_status =#{financeStatus})
727
+                        or ( t.identity_type=1 and t.case_status =#{financeStatus})
616
 
728
 
617
                     </if>
729
                     </if>
618
                     <!--代理人-->
730
                     <!--代理人-->
651
                 ca.identity_type=1
763
                 ca.identity_type=1
652
 
764
 
653
                 and c.case_status in (1,5,8,9,11,14,15,16,17,31)
765
                 and c.case_status in (1,5,8,9,11,14,15,16,17,31)
654
-      <!--          <if test="deptIds != null and deptIds.size() > 0">
655
-                    and ca.application_organ_id in
656
-                    <foreach item="item" collection="deptIds" open="(" separator="," close=")">
657
-                        #{item}
658
-                    </foreach>
659
-                </if> -->
766
+                <!--          <if test="deptIds != null and deptIds.size() > 0">
767
+                              and ca.application_organ_id in
768
+                              <foreach item="item" collection="deptIds" open="(" separator="," close=")">
769
+                                  #{item}
770
+                              </foreach>
771
+                          </if> -->
660
                 <if test="caseStatus != null">
772
                 <if test="caseStatus != null">
661
                     AND c.case_status = #{caseStatus}
773
                     AND c.case_status = #{caseStatus}
662
                 </if>
774
                 </if>
665
                     AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
777
                     AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
666
                 </if>
778
                 </if>
667
                 union
779
                 union
668
-            select  c.id ,
780
+                select c.id ,
669
                 c.case_status,ca.application_organ_id,
781
                 c.case_status,ca.application_organ_id,
670
                 c.arbitrator_id,ca.identity_num , ca.identity_type
782
                 c.arbitrator_id,ca.identity_num , ca.identity_type
671
                 FROM
783
                 FROM
694
         ELSE '无审理方式'
806
         ELSE '无审理方式'
695
         END arbitratMethodName,
807
         END arbitratMethodName,
696
         c.case_status ,
808
         c.case_status ,
697
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
809
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
698
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
810
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
699
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
811
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
700
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
812
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
705
         ELSE '无案件状态'
817
         ELSE '无案件状态'
706
         END caseStatusName,
818
         END caseStatusName,
707
         c.hear_date ,c.arbitrat_claims ,
819
         c.hear_date ,c.arbitrat_claims ,
708
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
820
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
821
+        ,c.fee_payable ,
709
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
822
         c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
710
-        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url,(select version from
823
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId
824
+        ,ca.application_organ_name as applicantName,c.filearbitra_url,(select version from
711
         case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
825
         case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
712
         update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
826
         update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
713
         as updateSubmitStatus,c.batch_number
827
         as updateSubmitStatus,c.batch_number
726
                 AND c.case_num = #{caseNum}
840
                 AND c.case_num = #{caseNum}
727
             </if>
841
             </if>
728
             <if test="nameId != null and nameId != ''">
842
             <if test="nameId != null and nameId != ''">
729
-                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
843
+                AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
730
             </if>
844
             </if>
731
             <if test="caseStatusList != null and caseStatusList.size() > 0">
845
             <if test="caseStatusList != null and caseStatusList.size() > 0">
732
                 and c.case_status in
846
                 and c.case_status in
791
 
905
 
792
 
906
 
793
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
907
     <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
794
-        select count(1) from  case_application c
908
+        select count(1) from case_application c
795
         <where>
909
         <where>
796
             <if test="caseNum != null and caseNum != ''">
910
             <if test="caseNum != null and caseNum != ''">
797
                 AND c.case_num = #{caseNum}
911
                 AND c.case_num = #{caseNum}
875
         id,
989
         id,
876
         case_name ,
990
         case_name ,
877
         case_num,
991
         case_num,
878
-       case_subject_amount,
992
+        case_subject_amount,
879
         register_date,
993
         register_date,
880
         arbitrat_method,
994
         arbitrat_method,
881
         case_status,
995
         case_status,
900
         create_by,
1014
         create_by,
901
         import_flag,
1015
         import_flag,
902
         version,
1016
         version,
903
-       template_id,
1017
+        template_id,
904
         facts,
1018
         facts,
905
         mediation_agreement,
1019
         mediation_agreement,
906
         batch_number,
1020
         batch_number,
907
         create_time
1021
         create_time
908
         )values
1022
         )values
909
         <foreach item="item" index="index" collection="list" separator=",">
1023
         <foreach item="item" index="index" collection="list" separator=",">
910
-        (
911
-        #{item.id},
912
-        #{item.caseName},
913
-        #{item.caseNum},
914
-        #{item.caseSubjectAmount},
915
-        sysdate(),
916
-        #{item.arbitratMethod},
917
-        #{item.caseStatus},
918
-        #{item.hearDate},
919
-        #{item.arbitratClaims},
920
-        #{item.requestRule},
921
-       #{item.loanStartDate},
922
-        #{item.loanEndDate},
923
-        #{item.claimPrinciOwed},
924
-
925
-        #{item.claimInterestOwed},
926
-        #{item.claimLiquidDamag},
927
-        #{item.feePayable},
928
-        #{item.beginVideoDate},
929
-        #{item.onlineVideoPerson},
930
-
931
-        #{item.contractNumber},
932
-
933
-       #{item.adjudicaCounter},
934
-        #{item.properPreser},
935
-
936
-        #{item.createBy},
937
-        #{item.importFlag},
938
-        #{item.version},
939
-       #{item.templateId},
940
-
941
-        #{item.facts},
942
-        #{item.mediationAgreement},
943
-        #{item.batchNumber},
944
-        sysdate()
945
-        )
1024
+            (
1025
+            #{item.id},
1026
+            #{item.caseName},
1027
+            #{item.caseNum},
1028
+            #{item.caseSubjectAmount},
1029
+            sysdate(),
1030
+            #{item.arbitratMethod},
1031
+            #{item.caseStatus},
1032
+            #{item.hearDate},
1033
+            #{item.arbitratClaims},
1034
+            #{item.requestRule},
1035
+            #{item.loanStartDate},
1036
+            #{item.loanEndDate},
1037
+            #{item.claimPrinciOwed},
1038
+
1039
+            #{item.claimInterestOwed},
1040
+            #{item.claimLiquidDamag},
1041
+            #{item.feePayable},
1042
+            #{item.beginVideoDate},
1043
+            #{item.onlineVideoPerson},
1044
+
1045
+            #{item.contractNumber},
1046
+
1047
+            #{item.adjudicaCounter},
1048
+            #{item.properPreser},
1049
+
1050
+            #{item.createBy},
1051
+            #{item.importFlag},
1052
+            #{item.version},
1053
+            #{item.templateId},
1054
+
1055
+            #{item.facts},
1056
+            #{item.mediationAgreement},
1057
+            #{item.batchNumber},
1058
+            sysdate()
1059
+            )
946
         </foreach>;
1060
         </foreach>;
947
     </insert>
1061
     </insert>
948
 
1062
 
962
             <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
1076
             <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
963
             <if test="feePayable != null ">fee_payable = #{feePayable},</if>
1077
             <if test="feePayable != null ">fee_payable = #{feePayable},</if>
964
             <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
1078
             <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
965
-            <if test="onlineVideoPerson != null  and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
1079
+            <if test="onlineVideoPerson != null  and onlineVideoPerson != ''">online_video_person =
1080
+                #{onlineVideoPerson},
1081
+            </if>
966
 
1082
 
967
             <if test="contractNumber != null  and contractNumber != ''">contract_number = #{contractNumber},</if>
1083
             <if test="contractNumber != null  and contractNumber != ''">contract_number = #{contractNumber},</if>
968
 
1084
 
978
             <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
1094
             <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
979
             <if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
1095
             <if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
980
             <if test="version != null ">version = #{version},</if>
1096
             <if test="version != null ">version = #{version},</if>
981
-             <if test="facts != null and facts != ''">facts = #{facts},</if>
982
-            <if test="mediationAgreement != null and mediationAgreement != ''">mediation_agreement = #{mediationAgreement},</if>
1097
+            <if test="facts != null and facts != ''">facts = #{facts},</if>
1098
+            <if test="mediationAgreement != null and mediationAgreement != ''">mediation_agreement =
1099
+                #{mediationAgreement},
1100
+            </if>
983
             update_time = sysdate()
1101
             update_time = sysdate()
984
         </set>
1102
         </set>
985
         where id = #{id}
1103
         where id = #{id}
1003
             <if test="isAbsence != null">is_absence = #{isAbsence},</if>
1121
             <if test="isAbsence != null">is_absence = #{isAbsence},</if>
1004
             <if test="appliIsAbsen != null">appli_is_absen = #{appliIsAbsen},</if>
1122
             <if test="appliIsAbsen != null">appli_is_absen = #{appliIsAbsen},</if>
1005
             <if test="responCrossOpin != null  and responCrossOpin != ''">respon_cross_opin = #{responCrossOpin},</if>
1123
             <if test="responCrossOpin != null  and responCrossOpin != ''">respon_cross_opin = #{responCrossOpin},</if>
1006
-            <if test="applicaCrossOpin != null  and applicaCrossOpin != ''">applica_cross_opin = #{applicaCrossOpin},</if>
1007
-            <if test="responDefenOpini != null  and responDefenOpini != ''">respon_defen_opini = #{responDefenOpini},</if>
1124
+            <if test="applicaCrossOpin != null  and applicaCrossOpin != ''">applica_cross_opin = #{applicaCrossOpin},
1125
+            </if>
1126
+            <if test="responDefenOpini != null  and responDefenOpini != ''">respon_defen_opini = #{responDefenOpini},
1127
+            </if>
1008
             <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
1128
             <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
1009
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
1129
             <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
1010
             <if test="hearDate != null">hear_date = #{hearDate},</if>
1130
             <if test="hearDate != null">hear_date = #{hearDate},</if>
1011
             <if test="filearbitraUrl != null  and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
1131
             <if test="filearbitraUrl != null  and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
1012
-            <if test="adjudicaCounterReason != null  and adjudicaCounterReason != ''">adjudica_counter_reason = #{adjudicaCounterReason},</if>
1132
+            <if test="adjudicaCounterReason != null  and adjudicaCounterReason != ''">adjudica_counter_reason =
1133
+                #{adjudicaCounterReason},
1134
+            </if>
1013
         </set>
1135
         </set>
1014
         where id = #{id}
1136
         where id = #{id}
1015
     </update>
1137
     </update>
1064
         END arbitratMethodName,
1186
         END arbitratMethodName,
1065
         c.case_name,
1187
         c.case_name,
1066
         c.case_status ,
1188
         c.case_status ,
1067
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
1189
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
1068
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
1190
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
1069
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
1191
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
1070
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
1192
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
1075
         ELSE '无案件状态'
1197
         ELSE '无案件状态'
1076
         END caseStatusName,
1198
         END caseStatusName,
1077
         c.hear_date ,c.arbitrat_claims ,
1199
         c.hear_date ,c.arbitrat_claims ,
1078
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
1079
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
1200
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
1201
+        ,c.fee_payable ,
1202
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time
1203
+        ,c.request_rule,c.adjudica_counter,c.proper_preser,
1080
         c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
1204
         c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
1081
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
1205
+        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId
1206
+        ,ca.application_organ_name as applicantName,
1082
         c.batch_number,
1207
         c.batch_number,
1083
         c.facts,
1208
         c.facts,
1084
         c.appli_iswrit_hear,c.respon_isWrit_hear,
1209
         c.appli_iswrit_hear,c.respon_isWrit_hear,
1099
         ELSE '无审理方式'
1224
         ELSE '无审理方式'
1100
         END arbitratMethodName,
1225
         END arbitratMethodName,
1101
         c.case_status ,
1226
         c.case_status ,
1102
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
1227
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
1103
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
1228
         when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
1104
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
1229
         when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
1105
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
1230
         when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
1110
         ELSE '无案件状态'
1235
         ELSE '无案件状态'
1111
         END caseStatusName,
1236
         END caseStatusName,
1112
         c.hear_date ,c.arbitrat_claims ,
1237
         c.hear_date ,c.arbitrat_claims ,
1113
-        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
1114
-        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
1238
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
1239
+        ,c.fee_payable ,
1240
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time
1241
+        ,c.request_rule,c.adjudica_counter,c.proper_preser,
1115
         c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
1242
         c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
1116
-        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
1243
+        c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId
1244
+        ,ca.application_organ_name as applicantName,
1117
         c.batch_number,
1245
         c.batch_number,
1118
         c.facts,
1246
         c.facts,
1119
         c.mediation_agreement,c.template_id templateId
1247
         c.mediation_agreement,c.template_id templateId