6 Commits

Auteur SHA1 Bericht Datum
  hejinbo 738afdce5c 模板管理 2 jaren geleden
  wangqiong123 78b8aa6487 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2 jaren geleden
  18792927508 98200d775c 申请人用手机号关联 2 jaren geleden
  wangqiong123 fde91ebba5 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2 jaren geleden
  18792927508 320398289d duibi 2 jaren geleden
  hejinbo eb7a8fd736 Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev 2 jaren geleden

+ 59
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TemplateController.java Bestand weergeven

1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.ruoyi.common.core.controller.BaseController;
4
+import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.common.core.page.TableDataInfo;
6
+import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
7
+import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
8
+import com.ruoyi.wisdomarbitrate.service.ITemplateService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.*;
11
+
12
+import java.util.List;
13
+
14
+@RestController
15
+@RequestMapping("/template")
16
+public class TemplateController extends BaseController {
17
+    @Autowired
18
+    private ITemplateService templateService;
19
+    /**
20
+     * 新增模板
21
+     * @param templateManual
22
+     * @return
23
+     */
24
+    @PostMapping("/insert")
25
+    public AjaxResult insertTemplate(@RequestBody TemplateManual templateManual){
26
+        return templateService.insertTemplate(templateManual);
27
+    }
28
+
29
+    /**
30
+     * 删除模板
31
+     * @param id
32
+     * @return
33
+     */
34
+    @DeleteMapping("/delete")
35
+    public AjaxResult deleteTemplate(Long id){
36
+        return templateService.deleteTemplate(id);
37
+    }
38
+
39
+    /**
40
+     * 修改模板
41
+     * @param templateManual
42
+     * @return
43
+     */
44
+    @PutMapping("/update")
45
+    public AjaxResult updateTemplate(@RequestBody TemplateManual templateManual){
46
+        return templateService.updateTemplate(templateManual);
47
+    }
48
+
49
+    /**
50
+     * 查询模板
51
+     */
52
+    @GetMapping("/list")
53
+    public TableDataInfo list( TemplateManual templateManual) {
54
+        startPage();
55
+        List<TemplateManual> list = templateService.selectTemplate(templateManual);
56
+        return getDataTable(list);
57
+    }
58
+
59
+}

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java Bestand weergeven

148
      * @return
148
      * @return
149
      */
149
      */
150
     SysUser selectUserByIdCard(@Param("idCard")String identityNo);
150
     SysUser selectUserByIdCard(@Param("idCard")String identityNo);
151
+    /**
152
+     * 根据手机号查询用户信息
153
+     * @param phone
154
+     * @return
155
+     */
156
+    SysUser selectUserByPhone(@Param("phone")String phone);
151
 
157
 
152
     /**
158
     /**
153
      * 根据部门和角色查询用户
159
      * 根据部门和角色查询用户
158
     List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
164
     List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
159
 
165
 
160
     List<SysUser>  selectRoleUserByDeptId(@Param("deptId")Long deptId,@Param("roleId") Long roleId );
166
     List<SysUser>  selectRoleUserByDeptId(@Param("deptId")Long deptId,@Param("roleId") Long roleId );
167
+
168
+
161
 }
169
 }

+ 33
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/TemplateManual.java Bestand weergeven

1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import com.ruoyi.common.core.domain.BaseEntity;
4
+import lombok.Data;
5
+
6
+@Data
7
+public class TemplateManual  {
8
+    /**
9
+     * ID
10
+     */
11
+    private Long id;
12
+
13
+    /**
14
+     * 模板名称
15
+     */
16
+    private String name;
17
+
18
+    /**
19
+     * 模板内容,用{}作为占位符动态替换其内容
20
+     */
21
+    private String content;
22
+
23
+    /**
24
+     * 模板类型,1-裁决内容,2-调解协议,3-金融消费纠纷基本情况
25
+     */
26
+    private Integer type;
27
+
28
+    /**
29
+     * 删除标志(0代表存在 2代表删除)
30
+     */
31
+    private Integer delFlag;
32
+
33
+}

+ 16
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/TemplateManualMapper.java Bestand weergeven

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+import java.util.List;
7
+
8
+@Mapper
9
+public interface TemplateManualMapper {
10
+
11
+    int insertTemplateManual(TemplateManual templateManual);
12
+
13
+    int updateTemplateManual(TemplateManual templateManual);
14
+
15
+    List<TemplateManual> selectTemplateManual(TemplateManual templateManual);
16
+}

+ 16
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ITemplateService.java Bestand weergeven

1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
5
+
6
+import java.util.List;
7
+
8
+public interface ITemplateService {
9
+    AjaxResult insertTemplate(TemplateManual templateManual);
10
+
11
+    AjaxResult deleteTemplate(Long id);
12
+
13
+    AjaxResult updateTemplate(TemplateManual templateManual);
14
+
15
+    List<TemplateManual> selectTemplate(TemplateManual templateManual);
16
+}

+ 77
- 74
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Bestand weergeven

21
 import org.springframework.stereotype.Service;
21
 import org.springframework.stereotype.Service;
22
 import org.springframework.transaction.annotation.Transactional;
22
 import org.springframework.transaction.annotation.Transactional;
23
 
23
 
24
-import java.util.Date;
25
-import java.util.List;
26
-import java.util.Map;
27
-import java.util.Objects;
24
+import java.util.*;
28
 import java.util.function.Function;
25
 import java.util.function.Function;
29
 import java.util.stream.Collectors;
26
 import java.util.stream.Collectors;
30
 
27
 
53
     private SmsRecordMapper smsRecordMapper;
50
     private SmsRecordMapper smsRecordMapper;
54
     @Autowired
51
     @Autowired
55
     private ICaseApplicationService caseApplicationService;
52
     private ICaseApplicationService caseApplicationService;
53
+    // 对比两个版本修改的字段,基本字段对比
54
+    private static final String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
55
+            "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
56
+    // 人员字段对比
57
+    private static final String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
58
+            "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
59
+            "compLegalperPost","responSex","responBirth"};
56
     @Override
60
     @Override
57
     public int insert(CaseApplication caseApplicationLog) {
61
     public int insert(CaseApplication caseApplicationLog) {
58
         return caseApplicationLogMapper.insert(caseApplicationLog);
62
         return caseApplicationLogMapper.insert(caseApplicationLog);
149
                 List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
153
                 List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
150
                 // 更新记录附件表
154
                 // 更新记录附件表
151
                 if(CollectionUtil.isNotEmpty(attachLogList)){
155
                 if(CollectionUtil.isNotEmpty(attachLogList)){
152
-                //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
153
                     for (CaseAttach caseAttach : attachLogList) {
156
                     for (CaseAttach caseAttach : attachLogList) {
154
                         caseAttach.setCaseAppliId(vo.getCaseId());
157
                         caseAttach.setCaseAppliId(vo.getCaseId());
155
                         caseAttachMapper.updateCaseAttach(caseAttach);
158
                         caseAttachMapper.updateCaseAttach(caseAttach);
156
                     }
159
                     }
157
                 }
160
                 }
158
-             //   caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
159
             } else {
161
             } else {
160
                 // 拒绝,将日志表改版本的状态改为拒绝
162
                 // 拒绝,将日志表改版本的状态改为拒绝
161
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
163
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
162
                 caseApplicationLogMapper.updateStatus(vo);
164
                 caseApplicationLogMapper.updateStatus(vo);
163
                return sendAuditMessage(vo);
165
                return sendAuditMessage(vo);
164
-
165
-
166
-                // 修改案件表的版本号
167
-                 //  caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
168
-
169
             }
166
             }
170
             return AjaxResult.success();
167
             return AjaxResult.success();
171
         } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
168
         } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
172
-            // 如果版本号为1,则直接返回
173
-
174
             // 审核修改撤销状态
169
             // 审核修改撤销状态
175
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
170
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
171
+                // 同意撤销
176
                 agreeRevoke(vo);
172
                 agreeRevoke(vo);
177
-                // 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
178
-
179
             } else {
173
             } else {
180
                 // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
174
                 // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
181
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
175
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
182
                 caseApplicationLogMapper.updateStatus(vo);
176
                 caseApplicationLogMapper.updateStatus(vo);
183
                 return sendAuditMessage(vo);
177
                 return sendAuditMessage(vo);
184
-                // 修改案件表的版本号
185
-             //   caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
186
             }
178
             }
187
             return AjaxResult.success();
179
             return AjaxResult.success();
188
         }
180
         }
234
 
226
 
235
     @Override
227
     @Override
236
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
228
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
237
-        // 查询当前版本号和上一个版本号的案件
229
+        // 查询当前版本号和主表的案件
238
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
230
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
239
-      //  CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
240
         CaseApplication caseApplication = new CaseApplication();
231
         CaseApplication caseApplication = new CaseApplication();
241
         caseApplication.setCaseAppliId(vo.getCaseId());
232
         caseApplication.setCaseAppliId(vo.getCaseId());
242
         caseApplication.setId(vo.getCaseId());
233
         caseApplication.setId(vo.getCaseId());
243
         CaseApplication beforeCase=   caseApplicationService.selectCaseApplication(caseApplication);
234
         CaseApplication beforeCase=   caseApplicationService.selectCaseApplication(caseApplication);
244
 
235
 
245
         // 查询案件关联人员
236
         // 查询案件关联人员
246
-       // beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
247
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
237
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
248
         // 查询附件
238
         // 查询附件
249
         CaseAttach caseAttach = new CaseAttach();
239
         CaseAttach caseAttach = new CaseAttach();
250
         caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
240
         caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
251
         caseAttach.setAnnexType(2);
241
         caseAttach.setAnnexType(2);
252
         caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
242
         caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
253
-   //     beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
254
         caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
243
         caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
255
-        afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
244
+        List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
245
+        if(CollectionUtil.isNotEmpty(afterAttachList)){
246
+            for (CaseAttach attach : afterAttachList) {
247
+                String annexName = attach.getAnnexName();
248
+                String prefix = "/profile";
249
+                int startIndex = annexName.indexOf(prefix);
250
+                startIndex += prefix.length();
251
+                String annexPath = "/uploadPath" + annexName.substring(startIndex);
252
+                attach.setAnnexPath(annexPath);
253
+                int startIndexnew = annexName.lastIndexOf("/");
254
+                if (startIndexnew != -1) {
255
+                    String annexNamenew = annexName.substring(startIndexnew + 1);
256
+                    attach.setAnnexName(annexNamenew);
257
+                }
258
+            }
259
+            afterCase.setCaseAttachList(afterAttachList);
260
+        }
261
+        afterCase.setCaseAttachList(afterAttachList);
256
         CompareCaseVO compareCaseVO = new CompareCaseVO();
262
         CompareCaseVO compareCaseVO = new CompareCaseVO();
257
         compareCaseVO.setBeforeCase(beforeCase);
263
         compareCaseVO.setBeforeCase(beforeCase);
258
         compareCaseVO.setAfterCase(afterCase);
264
         compareCaseVO.setAfterCase(afterCase);
259
-        // 对比两个版本修改的字段
260
-        String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
261
-                "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
262
-        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
263
-                "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
264
-        "compLegalperPost","responSex","responBirth"};
265
+
265
         StringBuilder changeColumn = new StringBuilder();
266
         StringBuilder changeColumn = new StringBuilder();
266
         // 对比基本字段
267
         // 对比基本字段
267
         for (String column : columns) {
268
         for (String column : columns) {
282
             }
283
             }
283
 
284
 
284
         }
285
         }
286
+        // 对比案件人员字段
287
+        compareAffilate(beforeCase,afterCase);
288
+        // 对比申请人证据资料
289
+        compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase,afterCase,changeColumn).toString());
290
+
291
+        return AjaxResult.success(compareCaseVO);
292
+    }
293
+
294
+    /**
295
+     * 对比申请人证据资料
296
+     * @param beforeCase
297
+     * @param afterCase
298
+     * @param changeColumn
299
+     * @return
300
+     */
301
+    private StringBuilder compareApplicantFile(CaseApplication beforeCase, CaseApplication afterCase, StringBuilder changeColumn) {
302
+        List<CaseAttach> beforeAttachFilter =new ArrayList<>();
303
+        List<CaseAttach> afterAttachFilter =new ArrayList<>();
304
+        if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
305
+            beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
306
+        }
307
+        if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
308
+            afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
309
+        }
310
+        if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
311
+            if(beforeAttachFilter.size()!=afterAttachFilter.size()){
312
+                changeColumn.append("fileColumn");
313
+            }else {
314
+                Map<String, CaseAttach> afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
315
+                for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
316
+                    if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
317
+                        changeColumn.append("fileColumn");
318
+                        break;
319
+                    }
320
+                }
321
+            }
322
+        }
323
+
324
+
325
+      return changeColumn;
326
+    }
327
+
328
+    /**
329
+     * 对比案件人员字段
330
+     * @param beforeCase
331
+     * @param afterCase
332
+     */
333
+    private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
285
         // 对比人员字段
334
         // 对比人员字段
286
         List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
335
         List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
287
         List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
336
         List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
344
 
393
 
345
 
394
 
346
         }
395
         }
347
-        boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(afterCase.getCaseAttachList());
348
-        boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList());
349
-        // 对比附件
350
-        if(notEmptyFlag || emptyFlag){
351
-            changeColumn.append("fileColumn");
352
-        }else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
353
-            if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
354
-                changeColumn.append("fileColumn");
355
-            }else {
356
-                Map<String, CaseAttach> afterAttachMap = afterCase.getCaseAttachList().stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
357
-
358
-
359
-                for (CaseAttach beforeCaseAttach : beforeCase.getCaseAttachList()) {
360
-                    if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
361
-                        changeColumn.append("fileColumn");
362
-                        break;
363
-                    }
364
-                }
365
-            }
366
-
367
-
368
-        }
369
-        compareCaseVO.setChangeColumn(changeColumn.toString());
370
-        if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
371
-            List<CaseAttach> caseAttachList = afterCase.getCaseAttachList();
372
-            for (CaseAttach attach : caseAttachList) {
373
-                    String annexName = attach.getAnnexName();
374
-                    String prefix = "/profile";
375
-                    int startIndex = annexName.indexOf(prefix);
376
-                    startIndex += prefix.length();
377
-                    String annexPath = "/uploadPath" + annexName.substring(startIndex);
378
-                    attach.setAnnexPath(annexPath);
379
-                    int startIndexnew = annexName.lastIndexOf("/");
380
-                    if (startIndexnew != -1) {
381
-                        String annexNamenew = annexName.substring(startIndexnew + 1);
382
-                        attach.setAnnexName(annexNamenew);
383
-                    }
384
-
385
-
386
-                }
387
-            afterCase.setCaseAttachList(caseAttachList);
388
-        }
389
-
390
-        return AjaxResult.success(compareCaseVO);
391
     }
396
     }
392
 
397
 
393
     /**
398
     /**
432
         List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
437
         List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
433
         // 更新记录附件表
438
         // 更新记录附件表
434
         if(CollectionUtil.isNotEmpty(attachLogList)){
439
         if(CollectionUtil.isNotEmpty(attachLogList)){
435
-        //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
436
             for (CaseAttach caseAttach : attachLogList) {
440
             for (CaseAttach caseAttach : attachLogList) {
437
                 caseAttach.setCaseAppliId(vo.getCaseId());
441
                 caseAttach.setCaseAppliId(vo.getCaseId());
438
                 caseAttachMapper.updateCaseAttach(caseAttach);
442
                 caseAttachMapper.updateCaseAttach(caseAttach);
439
             }
443
             }
440
         }
444
         }
441
-       // caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
442
     }
445
     }
443
 }
446
 }

+ 10
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Bestand weergeven

1189
         if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
1189
         if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
1190
 
1190
 
1191
             // 组装申请机构代理人信息,用户表新增并且和部门关联
1191
             // 组装申请机构代理人信息,用户表新增并且和部门关联
1192
-            // 根据代理人身份证去用户表查询,有修改,么有新增
1193
-            SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
1192
+            // 根据代理人手机号去用户表查询,有修改,么有新增
1193
+            SysUser agentUser = sysUserMapper.selectUserByPhone(caseAffiliate.getContactTelphoneAgent());
1194
             if (agentUser == null) {
1194
             if (agentUser == null) {
1195
                 agentUser = new SysUser();
1195
                 agentUser = new SysUser();
1196
                 agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
1196
                 agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
1197
                 agentUser.setNickName(caseAffiliate.getNameAgent());
1197
                 agentUser.setNickName(caseAffiliate.getNameAgent());
1198
-                agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
1198
+                agentUser.setUserName(caseAffiliate.getContactTelphoneAgent());
1199
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
1199
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
1200
                 //   agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
1200
                 //   agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
1201
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
1201
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
1248
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
1248
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
1249
                 caseAffiliate.setNameAgent(agentUser.getNickName());
1249
                 caseAffiliate.setNameAgent(agentUser.getNickName());
1250
                 caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
1250
                 caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
1251
+                if(StrUtil.isNotEmpty(agentUser.getIdCard())){
1252
+                    caseAffiliate.setIdentityNumAgent(agentUser.getIdCard());
1253
+                }else {
1254
+                    caseAffiliate.setIdentityNumAgent(caseAffiliate.getIdentityNumAgent());
1255
+                }
1251
                 List<Long> longList = new ArrayList<>();
1256
                 List<Long> longList = new ArrayList<>();
1252
                 // 新增角色为申请人
1257
                 // 新增角色为申请人
1253
                 if (CollectionUtil.isNotEmpty(agentUser.getRoles())) {
1258
                 if (CollectionUtil.isNotEmpty(agentUser.getRoles())) {
2985
                         caseAffiliate.setIdentityNum(map.get("统一社会信用代码").get(0));
2990
                         caseAffiliate.setIdentityNum(map.get("统一社会信用代码").get(0));
2986
                         caseAffiliate.setCompLegalPerson(map.get("负责人").get(0));
2991
                         caseAffiliate.setCompLegalPerson(map.get("负责人").get(0));
2987
                         caseAffiliate.setNameAgent(map.get("委托代理人").get(0));
2992
                         caseAffiliate.setNameAgent(map.get("委托代理人").get(0));
2988
-                        caseAffiliate.setContactTelphone(map.get("联系电话").get(0));
2993
+                        caseAffiliate.setContactTelphoneAgent(map.get("联系电话").get(0));
2989
                         caseAffiliate.setResidenAffili(map.get("住所").get(0));
2994
                         caseAffiliate.setResidenAffili(map.get("住所").get(0));
2990
                         caseAffiliate.setContactAddress(map.get("联系地址").get(0));
2995
                         caseAffiliate.setContactAddress(map.get("联系地址").get(0));
2991
                         caseAffiliate.setEmail(map.get("电子邮件").get(0).replaceAll("\\s", ""));
2996
                         caseAffiliate.setEmail(map.get("电子邮件").get(0).replaceAll("\\s", ""));
2992
                         //设置默认代理人的身份证号码,暂时写死 要不然新增方法报错
2997
                         //设置默认代理人的身份证号码,暂时写死 要不然新增方法报错
2993
-                        caseAffiliate.setIdentityNumAgent("610423199603171716");
2998
+                  //      caseAffiliate.setIdentityNumAgent("610423199603171716");
2994
                         caseAffiliates.add(caseAffiliate);
2999
                         caseAffiliates.add(caseAffiliate);
2995
                         CaseAffiliate caseAffiliate1 = new CaseAffiliate();
3000
                         CaseAffiliate caseAffiliate1 = new CaseAffiliate();
2996
                         caseAffiliate1.setIdentityType(2);
3001
                         caseAffiliate1.setIdentityType(2);

+ 50
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/TemplateServiceImpl.java Bestand weergeven

1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
5
+import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
6
+import com.ruoyi.wisdomarbitrate.mapper.TemplateManualMapper;
7
+import com.ruoyi.wisdomarbitrate.service.ITemplateService;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.stereotype.Service;
10
+
11
+import java.util.List;
12
+@Service
13
+public class TemplateServiceImpl implements ITemplateService {
14
+    @Autowired
15
+    private TemplateManualMapper templateManualMapper;
16
+    @Override
17
+    public AjaxResult insertTemplate(TemplateManual templateManual) {
18
+       int i = templateManualMapper.insertTemplateManual(templateManual);
19
+       if (i>0){
20
+           return AjaxResult.success("新增成功");
21
+       }
22
+        return AjaxResult.error("新增失败");
23
+    }
24
+
25
+    @Override
26
+    public AjaxResult deleteTemplate(Long id) {
27
+        TemplateManual templateManual = new TemplateManual();
28
+        templateManual.setId(id);
29
+        templateManual.setDelFlag(2);
30
+        int i = templateManualMapper.updateTemplateManual(templateManual);
31
+        if (i > 0) {
32
+            return AjaxResult.success("删除成功");
33
+        }
34
+        return AjaxResult.error();
35
+    }
36
+
37
+    @Override
38
+    public AjaxResult updateTemplate(TemplateManual templateManual) {
39
+        int i = templateManualMapper.updateTemplateManual(templateManual);
40
+        if (i > 0) {
41
+            return AjaxResult.success("修改成功");
42
+        }
43
+        return AjaxResult.error();
44
+    }
45
+
46
+    @Override
47
+    public List<TemplateManual> selectTemplate(TemplateManual templateManual) {
48
+        return templateManualMapper.selectTemplateManual(templateManual);
49
+    }
50
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java Bestand weergeven

329
         } catch (IOException e) {
329
         } catch (IOException e) {
330
             throw new RuntimeException(e);
330
             throw new RuntimeException(e);
331
         }
331
         }
332
-        String htmlContent = "<html><body style=\"font-size:12.0pt; font-family:SimSun;\">" +reservedConferenceVO.getHtmlContent()+"</body></html>";
332
+        String htmlContent = "<html><head> <title>庭审笔录</title></head><body style=\"font-size:12.0pt; font-family:SimSun;\"><h1 align=\"center\">庭审笔录</h1>" +reservedConferenceVO.getHtmlContent()+"</body></html>";
333
         // html转pdf并上传到服务器
333
         // html转pdf并上传到服务器
334
         boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
334
         boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
335
 
335
 

+ 8
- 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Bestand weergeven

194
 			left join sys_role r on r.role_id = ur.role_id
194
 			left join sys_role r on r.role_id = ur.role_id
195
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
195
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
196
 	</select>
196
 	</select>
197
+	<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
198
+		select u.*,d.dept_name,ur.role_id
199
+			from sys_user u
200
+		    left join sys_dept d on u.dept_id = d.dept_id
201
+			left join sys_user_role ur on u.user_id = ur.user_id
202
+			left join sys_role r on r.role_id = ur.role_id
203
+		where u.phonenumber = #{phone} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
204
+	</select>
197
     <select id="selectByDeptIdAndRole" resultMap="SysUserResult">
205
     <select id="selectByDeptIdAndRole" resultMap="SysUserResult">
198
 		select u.* from
206
 		select u.* from
199
 		               sys_user u
207
 		               sys_user u

+ 3
- 9
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Bestand weergeven

166
 
166
 
167
 
167
 
168
                 <!--申请人案件-->
168
                 <!--申请人案件-->
169
-                select c.id ,l.id AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
169
+                select c.id ,'' AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
170
                 CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
170
                 CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
171
                 ELSE '无审理方式'
171
                 ELSE '无审理方式'
172
                 END arbitratMethodName,
172
                 END arbitratMethodName,
192
                 update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
192
                 update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
193
                 as updateSubmitStatus
193
                 as updateSubmitStatus
194
                 from case_application c
194
                 from case_application c
195
-                JOIN case_application_log l ON c.id = l.case_appli_id and c.version=l.version
196
-                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1
195
+                JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
197
 
196
 
198
                 <where>
197
                 <where>
199
                     (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
198
                     (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
471
                 ) tt2
470
                 ) tt2
472
 
471
 
473
                                  <where>
472
                                  <where>
474
-                                     <if test="caseStatusList != null and caseStatusList.size() > 0">
475
-                                         and tt2.case_status in
476
-                                         <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
477
-                                             #{caseStatus}
478
-                                         </foreach>
479
-                                     </if>
473
+
480
                                      <if test="caseStatus != null">
474
                                      <if test="caseStatus != null">
481
                                          AND tt2.case_status = #{caseStatus}
475
                                          AND tt2.case_status = #{caseStatus}
482
                                      </if>
476
                                      </if>

+ 62
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/TemplateManualMapper.xml Bestand weergeven

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.TemplateManualMapper">
6
+    <resultMap type="TemplateManual" id="TemplateManualResult">
7
+        <id     property="id"       column="id"      />
8
+        <result property="name"     column="name"    />
9
+        <result property="content"        column="content"        />
10
+        <result property="type"  column="type"  />
11
+        <result property="delFlag"     column="del_flag"     />
12
+    </resultMap>
13
+    <insert id="insertTemplateManual" parameterType="TemplateManual" useGeneratedKeys="true" keyProperty="id">
14
+        insert into template_manual(
15
+        <if test="name != null and name != ''">name,</if>
16
+        <if test="content != null and content != '' ">content,</if>
17
+        <if test="type != null ">type,</if>
18
+        del_flag
19
+        )values(
20
+        <if test="name != null and name != ''">#{name},</if>
21
+        <if test="content != null and content != '' ">#{content},</if>
22
+        <if test="type != null ">#{type},</if>
23
+        0
24
+        )
25
+    </insert>
26
+
27
+    <update id="updateTemplateManual" parameterType="TemplateManual">
28
+        update template_manual
29
+        <set>
30
+            <if test="name != null and name != ''">name = #{name},</if>
31
+            <if test="content != null and content != '' ">content = #{content},</if>
32
+            <if test="type != null ">type = #{type},</if>
33
+            <if test="delFlag != null ">del_flag = #{delFlag},</if>
34
+        </set>
35
+        <where>
36
+            <if test="id != null">
37
+                AND id = #{id}
38
+            </if>
39
+
40
+        </where>
41
+    </update>
42
+    <select id="selectTemplateManual" parameterType="TemplateManual" resultMap="TemplateManualResult">
43
+        SELECT  id, name ,content , type
44
+        FROM  template_manual
45
+        <where>
46
+            <if test="id != null">
47
+                AND id = #{id}
48
+            </if>
49
+            <if test="name != null and name != ''">
50
+                AND name = #{name}
51
+            </if>
52
+            <if test="content != null  and content != ''">
53
+                AND content = #{content}
54
+            </if>
55
+            <if test="type != null ">
56
+                AND type = #{type}
57
+            </if>
58
+            AND  del_flag =0
59
+        </where>
60
+    </select>
61
+
62
+</mapper>