6 Коммиты

Автор SHA1 Сообщение Дата
  hejinbo 738afdce5c 模板管理 2 лет назад
  wangqiong123 78b8aa6487 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2 лет назад
  18792927508 98200d775c 申请人用手机号关联 2 лет назад
  wangqiong123 fde91ebba5 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2 лет назад
  18792927508 320398289d duibi 2 лет назад
  hejinbo eb7a8fd736 Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev 2 лет назад

+ 59
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/TemplateController.java Просмотреть файл

@@ -0,0 +1,59 @@
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 Просмотреть файл

@@ -148,6 +148,12 @@ public interface SysUserMapper
148 148
      * @return
149 149
      */
150 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,4 +164,6 @@ public interface SysUserMapper
158 164
     List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
159 165
 
160 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 Просмотреть файл

@@ -0,0 +1,33 @@
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 Просмотреть файл

@@ -0,0 +1,16 @@
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 Просмотреть файл

@@ -0,0 +1,16 @@
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 Просмотреть файл

@@ -21,10 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
21 21
 import org.springframework.stereotype.Service;
22 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 25
 import java.util.function.Function;
29 26
 import java.util.stream.Collectors;
30 27
 
@@ -53,6 +50,13 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
53 50
     private SmsRecordMapper smsRecordMapper;
54 51
     @Autowired
55 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 60
     @Override
57 61
     public int insert(CaseApplication caseApplicationLog) {
58 62
         return caseApplicationLogMapper.insert(caseApplicationLog);
@@ -149,40 +153,28 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
149 153
                 List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
150 154
                 // 更新记录附件表
151 155
                 if(CollectionUtil.isNotEmpty(attachLogList)){
152
-                //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
153 156
                     for (CaseAttach caseAttach : attachLogList) {
154 157
                         caseAttach.setCaseAppliId(vo.getCaseId());
155 158
                         caseAttachMapper.updateCaseAttach(caseAttach);
156 159
                     }
157 160
                 }
158
-             //   caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
159 161
             } else {
160 162
                 // 拒绝,将日志表改版本的状态改为拒绝
161 163
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
162 164
                 caseApplicationLogMapper.updateStatus(vo);
163 165
                return sendAuditMessage(vo);
164
-
165
-
166
-                // 修改案件表的版本号
167
-                 //  caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
168
-
169 166
             }
170 167
             return AjaxResult.success();
171 168
         } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
172
-            // 如果版本号为1,则直接返回
173
-
174 169
             // 审核修改撤销状态
175 170
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
171
+                // 同意撤销
176 172
                 agreeRevoke(vo);
177
-                // 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
178
-
179 173
             } else {
180 174
                 // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
181 175
                 vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
182 176
                 caseApplicationLogMapper.updateStatus(vo);
183 177
                 return sendAuditMessage(vo);
184
-                // 修改案件表的版本号
185
-             //   caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
186 178
             }
187 179
             return AjaxResult.success();
188 180
         }
@@ -234,34 +226,43 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
234 226
 
235 227
     @Override
236 228
     public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
237
-        // 查询当前版本号和上一个版本号的案件
229
+        // 查询当前版本号和主表的案件
238 230
         CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
239
-      //  CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
240 231
         CaseApplication caseApplication = new CaseApplication();
241 232
         caseApplication.setCaseAppliId(vo.getCaseId());
242 233
         caseApplication.setId(vo.getCaseId());
243 234
         CaseApplication beforeCase=   caseApplicationService.selectCaseApplication(caseApplication);
244 235
 
245 236
         // 查询案件关联人员
246
-       // beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
247 237
         afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
248 238
         // 查询附件
249 239
         CaseAttach caseAttach = new CaseAttach();
250 240
         caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
251 241
         caseAttach.setAnnexType(2);
252 242
         caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
253
-   //     beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
254 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 262
         CompareCaseVO compareCaseVO = new CompareCaseVO();
257 263
         compareCaseVO.setBeforeCase(beforeCase);
258 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 266
         StringBuilder changeColumn = new StringBuilder();
266 267
         // 对比基本字段
267 268
         for (String column : columns) {
@@ -282,6 +283,54 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
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 335
         List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
287 336
         List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
@@ -344,50 +393,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
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,12 +437,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
432 437
         List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
433 438
         // 更新记录附件表
434 439
         if(CollectionUtil.isNotEmpty(attachLogList)){
435
-        //    caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
436 440
             for (CaseAttach caseAttach : attachLogList) {
437 441
                 caseAttach.setCaseAppliId(vo.getCaseId());
438 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 Просмотреть файл

@@ -1189,13 +1189,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1189 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 1194
             if (agentUser == null) {
1195 1195
                 agentUser = new SysUser();
1196 1196
                 agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
1197 1197
                 agentUser.setNickName(caseAffiliate.getNameAgent());
1198
-                agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
1198
+                agentUser.setUserName(caseAffiliate.getContactTelphoneAgent());
1199 1199
                 agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
1200 1200
                 //   agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
1201 1201
                 agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
@@ -1248,6 +1248,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1248 1248
                 caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
1249 1249
                 caseAffiliate.setNameAgent(agentUser.getNickName());
1250 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 1256
                 List<Long> longList = new ArrayList<>();
1252 1257
                 // 新增角色为申请人
1253 1258
                 if (CollectionUtil.isNotEmpty(agentUser.getRoles())) {
@@ -2985,12 +2990,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
2985 2990
                         caseAffiliate.setIdentityNum(map.get("统一社会信用代码").get(0));
2986 2991
                         caseAffiliate.setCompLegalPerson(map.get("负责人").get(0));
2987 2992
                         caseAffiliate.setNameAgent(map.get("委托代理人").get(0));
2988
-                        caseAffiliate.setContactTelphone(map.get("联系电话").get(0));
2993
+                        caseAffiliate.setContactTelphoneAgent(map.get("联系电话").get(0));
2989 2994
                         caseAffiliate.setResidenAffili(map.get("住所").get(0));
2990 2995
                         caseAffiliate.setContactAddress(map.get("联系地址").get(0));
2991 2996
                         caseAffiliate.setEmail(map.get("电子邮件").get(0).replaceAll("\\s", ""));
2992 2997
                         //设置默认代理人的身份证号码,暂时写死 要不然新增方法报错
2993
-                        caseAffiliate.setIdentityNumAgent("610423199603171716");
2998
+                  //      caseAffiliate.setIdentityNumAgent("610423199603171716");
2994 2999
                         caseAffiliates.add(caseAffiliate);
2995 3000
                         CaseAffiliate caseAffiliate1 = new CaseAffiliate();
2996 3001
                         caseAffiliate1.setIdentityType(2);

+ 50
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/TemplateServiceImpl.java Просмотреть файл

@@ -0,0 +1,50 @@
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 Просмотреть файл

@@ -329,7 +329,7 @@ public class VideoServiceImpl implements VideoService {
329 329
         } catch (IOException e) {
330 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 333
         // html转pdf并上传到服务器
334 334
         boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
335 335
 

+ 8
- 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Просмотреть файл

@@ -194,6 +194,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
194 194
 			left join sys_role r on r.role_id = ur.role_id
195 195
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
196 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 205
     <select id="selectByDeptIdAndRole" resultMap="SysUserResult">
198 206
 		select u.* from
199 207
 		               sys_user u

+ 3
- 9
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

@@ -166,7 +166,7 @@
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 170
                 CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
171 171
                 ELSE '无审理方式'
172 172
                 END arbitratMethodName,
@@ -192,8 +192,7 @@
192 192
                 update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
193 193
                 as updateSubmitStatus
194 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 197
                 <where>
199 198
                     (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
@@ -471,12 +470,7 @@
471 470
                 ) tt2
472 471
 
473 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 474
                                      <if test="caseStatus != null">
481 475
                                          AND tt2.case_status = #{caseStatus}
482 476
                                      </if>

+ 62
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/TemplateManualMapper.xml Просмотреть файл

@@ -0,0 +1,62 @@
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>