Parcourir la source

Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

wangqiong123 il y a 2 ans
Parent
révision
b7b9e39b37

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java Voir le fichier

@@ -166,4 +166,11 @@ public interface SysUserMapper
166 166
      * @return
167 167
      */
168 168
     int batchSave(@Param("list")List<SysUser> addUsers);
169
+
170
+    /**
171
+     * 根据角色查询调解员
172
+     * @param roleName
173
+     * @return
174
+     */
175
+    List<SysUser> selectUserByRole(@Param("roleName") String roleName);
169 176
 }

+ 1
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/mscase/MsCaseLogRecordDTO.java Voir le fichier

@@ -52,24 +52,14 @@ public class MsCaseLogRecordDTO implements Serializable {
52 52
      */
53 53
     @Column(name="create_nick_name")
54 54
     private String createNickName;
55
-
56 55
     /**
57 56
      * 创建时间
58 57
      */
59 58
     @Column(name="create_time")
60 59
     private Date createTime;
61 60
 
62
-    /**
63
-     * 更新者
64
-     */
65
-    @Column(name="update_by")
66
-    private String updateBy;
67 61
 
68
-    /**
69
-     * 更新时间
70
-     */
71
-    @Column(name="update_time")
72
-    private Date updateTime;
62
+
73 63
 
74 64
 
75 65
 

+ 2
- 12
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseLogRecord.java Voir le fichier

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
2 2
 
3
+import lombok.EqualsAndHashCode;
3 4
 import lombok.Getter;
4 5
 import lombok.Setter;
5 6
 import lombok.ToString;
@@ -13,6 +14,7 @@ import java.util.Date;
13 14
 @Getter
14 15
 @Setter
15 16
 @ToString
17
+@EqualsAndHashCode
16 18
 @Table(name = "ms_case_log_record")
17 19
 public class MsCaseLogRecord {
18 20
     @Id
@@ -55,18 +57,6 @@ public class MsCaseLogRecord {
55 57
     @Column(name = "create_time")
56 58
     private Date createTime;
57 59
 
58
-    /**
59
-     * 更新者
60
-     */
61
-    @Column(name = "update_by")
62
-    private String updateBy;
63
-
64
-    /**
65
-     * 更新时间
66
-     */
67
-    @Column(name = "update_time")
68
-    private Date updateTime;
69
-
70 60
     /**
71 61
      * 备注
72 62
      */

+ 10
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseLogRecordMapper.java Voir le fichier

@@ -1,7 +1,17 @@
1 1
 package com.ruoyi.wisdomarbitrate.mapper.mscase;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseLogRecord;
4
+import org.apache.ibatis.annotations.Select;
4 5
 import tk.mybatis.mapper.common.Mapper;
5 6
 
7
+import java.util.List;
8
+
6 9
 public interface MsCaseLogRecordMapper extends Mapper<MsCaseLogRecord> {
10
+    /**
11
+     * 查询调解员已办数量
12
+     * @param collect
13
+     * @return
14
+     */
15
+    @Select("select create_by createBy,GROUP_CONCAT(DISTINCT case_appli_id) caseAppliId from ms_case_log_record where create_by in('hhl','gyj') group by create_by,case_appli_id")
16
+    List<MsCaseLogRecord> selectCompleteByCreateBy(List<Long> collect);
7 17
 }

+ 39
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Voir le fichier

@@ -26,6 +26,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.template.TemplateManage;
26 26
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
27 27
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
28 28
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
29
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseLogRecord;
29 30
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MediatorVO;
30 31
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationReq;
31 32
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
@@ -107,6 +108,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
107 108
     TemplateManageMapper templateManageMapper;
108 109
     @Autowired
109 110
     private SmsRecordMapper smsRecordMapper;
111
+    @Autowired
112
+    private MsCaseLogRecordMapper caseLogRecordMapper;
110 113
     // 案件基本字段
111 114
     public static final List<String> CASE_BASE_COLUMN = Arrays.asList("caseSubjectAmount", "arbitratClaims", "facts", "requestRule");
112 115
     public static final SimpleDateFormat yyyymmddFormat = new SimpleDateFormat("yyyy-MM-dd");
@@ -548,6 +551,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
548 551
         return AjaxResult.success("调解申请书生成成功");
549 552
     }
550 553
 
554
+    /**
555
+     * 根据批次号查询该流程未锁定案件
556
+     * @param batchNumber
557
+     * @param caseFlowId 案件流程id
558
+     * @return
559
+     */
560
+
551 561
     public List<MsCaseApplication> listByBatchNumber(String batchNumber,Integer caseFlowId) {
552 562
         Example example = new Example(MsCaseFlow.class);
553 563
         example.createCriteria().andEqualTo("batch_number", batchNumber);
@@ -559,6 +569,11 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
559 569
 
560 570
     }
561 571
 
572
+    /**
573
+     * 批量更新附件
574
+     * @param req
575
+     * @return
576
+     */
562 577
     @Override
563 578
     public AjaxResult batchUpdateAttach(MsCaseApplicationVO req) {
564 579
         for (MsCaseAttach attach : req.getCaseAttachList()) {
@@ -568,6 +583,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
568 583
         return null;
569 584
     }
570 585
 
586
+    /**
587
+     * 证据上传
588
+     * @param files
589
+     * @param annexType
590
+     * @param id
591
+     * @return
592
+     */
571 593
     @Override
572 594
     public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id) {
573 595
         List<MsCaseAttach> successList = new ArrayList<>();
@@ -668,9 +690,26 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
668 690
         return AjaxResult.success("提交成功");
669 691
     }
670 692
 
693
+    /**
694
+     * 查询调解员
695
+     * @return
696
+     */
671 697
     @Override
672 698
     public AjaxResult listMediator() {
673 699
         List<MediatorVO> mediatorVOS = new ArrayList<MediatorVO>();
700
+        // 查出所有调解员
701
+        List<SysUser> users = userMapper.selectUserByRole("调解员");
702
+        if(CollectionUtil.isEmpty(users)){
703
+            return AjaxResult.error("暂无调解员");
704
+        }
705
+        // 查询调解员已办数量
706
+        List<MsCaseLogRecord> recordList=caseLogRecordMapper.selectCompleteByCreateBy(users.stream().map(SysUser::getUserId).collect(Collectors.toList()));
707
+        if(CollectionUtil.isNotEmpty(recordList)){
708
+            // 组装成id对应的list
709
+            recordList.stream().collect(Collectors.groupingBy(MsCaseLogRecord::getCaseAppliId, Collectors.toList()));
710
+        }
711
+        // 查询待办数量
712
+
674 713
         mediatorVOS= msCaseApplicationMapper.listMediator();
675 714
 
676 715
         return null;

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/CaseLogUtils.java Voir le fichier

@@ -35,11 +35,11 @@ public class CaseLogUtils
35 35
             SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
36 36
             operLog.setCreateBy(sysUser.getUserName());
37 37
             operLog.setCreateNickName(sysUser.getNickName());
38
-            operLog.setUpdateBy(sysUser.getUserName());
38
+
39 39
         }else {
40 40
             operLog.setCreateBy("admin");
41 41
             operLog.setCreateNickName("管理员");
42
-            operLog.setUpdateBy("admin");
42
+
43 43
         }
44 44
         operLog.setCaseStatusName(caseStatusName);
45 45
         operLog.setCaseAppliId(caseAppliId);

+ 8
- 2
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Voir le fichier

@@ -318,5 +318,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
318 318
 		INNER JOIN ms_sys_dept d ON u.dept_id = d.dept_id
319 319
 		WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
320 320
 	</select>
321
-	
322
-</mapper> 
321
+
322
+    <select id="selectUserByRole" resultType="com.ruoyi.common.core.domain.entity.SysUser">
323
+		select u.user_id,u.user_name,u.nick_name,u.specialty  from ms_sys_user u
324
+		    join ms_sys_user_role ur on ur.user_id =u.user_id
325
+		    join ms_sys_role r on ur.role_id = r.role_id and r.role_name='调解员'
326
+		    where r.del_flag = '0' and r.status='0' and u.del_flag = '0' and u.status='0'
327
+    </select>
328
+</mapper>