18792927508 2 лет назад
Родитель
Сommit
74766cd4ee

+ 16
- 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java Просмотреть файл

@@ -1,18 +1,5 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.List;
4
-import org.apache.commons.lang3.ArrayUtils;
5
-import org.springframework.beans.factory.annotation.Autowired;
6
-import org.springframework.security.access.prepost.PreAuthorize;
7
-import org.springframework.validation.annotation.Validated;
8
-import org.springframework.web.bind.annotation.DeleteMapping;
9
-import org.springframework.web.bind.annotation.GetMapping;
10
-import org.springframework.web.bind.annotation.PathVariable;
11
-import org.springframework.web.bind.annotation.PostMapping;
12
-import org.springframework.web.bind.annotation.PutMapping;
13
-import org.springframework.web.bind.annotation.RequestBody;
14
-import org.springframework.web.bind.annotation.RequestMapping;
15
-import org.springframework.web.bind.annotation.RestController;
16 3
 import com.ruoyi.common.annotation.Log;
17 4
 import com.ruoyi.common.constant.UserConstants;
18 5
 import com.ruoyi.common.core.controller.BaseController;
@@ -21,6 +8,13 @@ import com.ruoyi.common.core.domain.entity.SysDept;
21 8
 import com.ruoyi.common.enums.BusinessType;
22 9
 import com.ruoyi.common.utils.StringUtils;
23 10
 import com.ruoyi.system.service.ISysDeptService;
11
+import org.apache.commons.lang3.ArrayUtils;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.security.access.prepost.PreAuthorize;
14
+import org.springframework.validation.annotation.Validated;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import java.util.List;
24 18
 
25 19
 /**
26 20
  * 部门信息
@@ -44,6 +38,15 @@ public class SysDeptController extends BaseController
44 38
         List<SysDept> depts = deptService.selectDeptList(dept);
45 39
         return success(depts);
46 40
     }
41
+    /**
42
+     * 获取部门列表
43
+     */
44
+    @GetMapping("/selectList")
45
+    public AjaxResult selectList(SysDept dept)
46
+    {
47
+        List<SysDept> depts = deptService.selectDeptList(dept);
48
+        return success(depts);
49
+    }
47 50
 
48 51
     /**
49 52
      * 查询部门列表(排除节点)

+ 51
- 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsCaseApplicationController.java Просмотреть файл

@@ -3,17 +3,18 @@ package com.ruoyi.web.controller.wisdomarbitrate.mscase;
3 3
 
4 4
 import cn.hutool.core.collection.CollectionUtil;
5 5
 import cn.hutool.core.util.StrUtil;
6
+import com.ruoyi.common.annotation.Anonymous;
6 7
 import com.ruoyi.common.core.controller.BaseController;
7 8
 import com.ruoyi.common.core.domain.AjaxResult;
8 9
 import com.ruoyi.common.core.page.TableDataInfo;
9 10
 import com.ruoyi.common.exception.EsignDemoException;
10 11
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
11 12
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
12
-import com.ruoyi.wisdomarbitrate.domain.vo.mscase.BookingVO;
13
-import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationReq;
14
-import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
15
-import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseAttachVO;
13
+import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
16 14
 import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
15
+import com.ruoyi.wisdomarbitrate.service.mscase.VideoConferenceService;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.validation.annotation.Validated;
17 18
 import org.springframework.web.bind.annotation.*;
18 19
 import org.springframework.web.multipart.MultipartFile;
19 20
 
@@ -31,6 +32,8 @@ import java.util.List;
31 32
 public class MsCaseApplicationController extends BaseController {
32 33
     @Resource
33 34
     private MsCaseApplicationService caseApplicationService;
35
+    @Autowired
36
+    private VideoConferenceService videoService;
34 37
 
35 38
     /**
36 39
      * 分页查询案件列表
@@ -243,4 +246,48 @@ public class MsCaseApplicationController extends BaseController {
243 246
 
244 247
         return caseApplicationService.confirmMediation(attach);
245 248
     }
249
+    /**
250
+     * 获取userSign
251
+     * @param userId
252
+     * @return
253
+     */
254
+    @Anonymous
255
+    @GetMapping("/generateUserSign")
256
+    public AjaxResult generateUserSign(@RequestParam(required = true) String userId){
257
+        if(StrUtil.isEmpty(userId)){
258
+            error("参数校验失败");
259
+        }
260
+        return AjaxResult.success(videoService.generateUserSign(userId));
261
+    }
262
+    /**
263
+     * 生成房间号
264
+     * @return
265
+     */
266
+    @Anonymous
267
+    @GetMapping("/createRoomId")
268
+    public AjaxResult createRoomId(@RequestParam("caseId") Long caseId) {
269
+
270
+        return  success(videoService.createRoomId(caseId));
271
+    }
272
+    /**
273
+     * 预约会议
274
+     * @param reservedConferenceVO
275
+     * @return
276
+     */
277
+    @PostMapping("/reservedConference")
278
+    public AjaxResult reservedConference(@Validated @RequestBody MsReservedConferenceVO reservedConferenceVO) throws Exception {
279
+
280
+        return videoService.reservedConference(reservedConferenceVO);
281
+    }
282
+    /**
283
+     * 根据案件id查询已预约的会议
284
+     * @param caseId
285
+     * @return
286
+     */
287
+    @Anonymous
288
+    @GetMapping("/reserveConferenceList")
289
+    public AjaxResult reserveConferenceList(  @RequestParam("caseId") Long caseId) {
290
+
291
+        return  success(videoService.reserveConferenceList(caseId));
292
+    }
246 293
 }

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

@@ -9,7 +9,6 @@ import com.ruoyi.wisdomarbitrate.domain.vo.mscase.SendRoomNoMessageVO;
9 9
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.VideoCallBackVO;
10 10
 import com.ruoyi.wisdomarbitrate.service.mscase.VideoConferenceService;
11 11
 import org.springframework.beans.factory.annotation.Autowired;
12
-import org.springframework.validation.annotation.Validated;
13 12
 import org.springframework.web.bind.annotation.*;
14 13
 
15 14
 import javax.validation.Valid;
@@ -35,50 +34,8 @@ public class MsVideoConferenceController extends BaseController {
35 34
 
36 35
         return videoService.videoList(caseId);
37 36
     }
38
-    /**
39
-     * 获取userSign
40
-     * @param userId
41
-     * @return
42
-     */
43
-    @Anonymous
44
-    @GetMapping("/generateUserSign")
45
-    public AjaxResult generateUserSign(@RequestParam(required = true) String userId){
46
-        if(StrUtil.isEmpty(userId)){
47
-            error("参数校验失败");
48
-        }
49
-        return AjaxResult.success(videoService.generateUserSign(userId));
50
-    }
51
-    /**
52
-     * 生成房间号
53
-     * @return
54
-     */
55
-    @Anonymous
56
-    @GetMapping("/createRoomId")
57
-    public AjaxResult createRoomId(@RequestParam("caseId") Long caseId) {
58 37
 
59
-        return  success(videoService.createRoomId(caseId));
60
-    }
61
-    /**
62
-     * 根据案件id查询已预约的会议
63
-     * @param caseId
64
-     * @return
65
-     */
66
-    @Anonymous
67
-    @GetMapping("/reserveConferenceList")
68
-    public AjaxResult reserveConferenceList(  @RequestParam("caseId") Long caseId) {
69 38
 
70
-        return  success(videoService.reserveConferenceList(caseId));
71
-    }
72
-    /**
73
-     * 预约会议
74
-     * @param reservedConferenceVO
75
-     * @return
76
-     */
77
-    @PostMapping("/reservedConference")
78
-    public AjaxResult reservedConference(@Validated @RequestBody MsReservedConferenceVO reservedConferenceVO) throws Exception {
79
-
80
-        return videoService.reservedConference(reservedConferenceVO);
81
-    }
82 39
     /**
83 40
      * 从腾讯云下载文件到本地
84 41
      * @param

+ 4
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java Просмотреть файл

@@ -61,7 +61,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
61 61
             "</if> "
62 62
             +
63 63
             "<if test=\"req.hearDateFlag != null \">" +
64
-            "    AND a.mediation_method = '1'" +
64
+            "    AND c.mediation_method = '1'" +
65 65
             "</if> "
66 66
             +
67 67
             "<if test=\"req.startTime != null and req.startTime != ''\">"  +
@@ -95,11 +95,11 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
95 95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
96 96
             "</if> "
97 97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
98
-            "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
98
+            "    AND a.respondent_identity_num = #{req.respondentIdentityNum} AND c1.case_flow_id=#{req.caseFlowId}" +
99 99
             "</if> "
100 100
             +
101 101
             "<if test=\"req.hearDateFlag != null \">" +
102
-            "    AND a.mediation_method = '1'" +
102
+            "    AND c.mediation_method = '1'" +
103 103
             "</if> "
104 104
             +
105 105
 
@@ -133,7 +133,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
133 133
             "</if> "
134 134
             +
135 135
             "<if test=\"req.hearDateFlag != null \">" +
136
-            "    AND a.mediation_method = '1'" +
136
+            "    AND c.mediation_method = '1'" +
137 137
             "</if> "
138 138
             +
139 139
 

+ 43
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Просмотреть файл

@@ -143,15 +143,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
143 143
      */
144 144
     @Override
145 145
     public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
146
-        // admin查询所有案件
147
-        if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
148
-            startPage();
149
-            return msCaseApplicationMapper.list(req, null);
150
-        }
146
+
151 147
         // 根据用户查询角色
152 148
         LoginUser loginUser = SecurityUtils.getLoginUser();
153
-        SysUser sysUser = loginUser.getUser();
154
-        List<SysRole> roles = sysUser.getRoles();
149
+        // 根据id查询用户
150
+        SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
151
+        List<SysRole> roles = loginUser.getUser().getRoles();
155 152
         if (CollectionUtil.isEmpty(roles)) {
156 153
             throw new ServiceException("该用户未指定角色");
157 154
         }
@@ -170,16 +167,47 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
170 167
         if (CollectionUtil.isEmpty(caseFlows)) {
171 168
             throw new ServiceException("该角色为绑定案件流程");
172 169
         }
170
+        Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
171
+        // admin查询所有案件
172
+        if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
173
+            MsCaseFlow caseFlow =null;
174
+            if(req.getHearDateFlag()!=null){
175
+                caseFlow = flowMap.get("caseManagement:list:mediate");
176
+            }else {
177
+                // 根据按钮权限标识符查询待选择调解员流程id
178
+                caseFlow = flowMap.get("caseManagement:list:selectmediator");
179
+            }
180
+            if(caseFlow!=null) {
181
+                req.setCaseFlowId(caseFlow.getId());
182
+            }
183
+            startPage();
184
+
185
+            return msCaseApplicationMapper.list(req, null);
186
+        }
173 187
         for (SysRole role : roles) {
174 188
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
175
-                if(loginUser.getDeptId()!=null) {
176
-                    req.setApplicationOrganId(String.valueOf(loginUser.getDeptId()));
189
+                if(sysUser.getDeptId()!=null) {
190
+                    req.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
177 191
                 }
178 192
                 req.setApplicantFlag(1);
193
+                break;
194
+
179 195
             }
180 196
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
181 197
                 // todo 被申请人案件根据被申请人身份证号查询案件列表
182 198
                 req.setRespondentIdentityNum(sysUser.getIdCard());
199
+                MsCaseFlow caseFlow =null;
200
+                // 查询待调解流程id
201
+                if(req.getHearDateFlag()!=null){
202
+                     caseFlow = flowMap.get("caseManagement:list:mediate");
203
+                }else {
204
+                    // 根据按钮权限标识符查询待选择调解员流程id
205
+                     caseFlow = flowMap.get("caseManagement:list:selectmediator");
206
+                }
207
+                if(caseFlow!=null) {
208
+                    req.setCaseFlowId(caseFlow.getId());
209
+                }
210
+                break;
183 211
             }
184 212
         }
185 213
         startPage();
@@ -948,7 +976,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
948 976
             criteria.andIsNull("type");
949 977
         }
950 978
         criteria.andEqualTo("caseAppliId", vo.getId());
951
-        criteria.andEqualTo("mediatorId", user.getUserId());
979
+     //   criteria.andEqualTo("mediatorId", user.getUserId());
952 980
         int count = msCaseMediatorMapper.selectCountByExample(example);
953 981
         if (count > 0) {
954 982
             // 申请人已预约,更新主表流程节点
@@ -2100,7 +2128,11 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2100 2128
             agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
2101 2129
             userMapper.insertUser(agentUser);
2102 2130
             userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
2103
-        } else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
2131
+        } else if (null == agentUser.getDeptId() ) {
2132
+            // todo 未关联部门,关联部门
2133
+            agentUser.setDeptId(Long.valueOf(affiliate.getApplicationOrganId()));
2134
+            userMapper.updateUser(agentUser);
2135
+        }else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(affiliate.getApplicationOrganId())) {
2104 2136
             if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
2105 2137
                 throw new ServiceException("该申请代理人已在【" + agentUser.getDept().getDeptName() + "】申请机构下存在,请检查填写信息是否正确");
2106 2138
             } else {

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

@@ -274,21 +274,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
274 274
     <update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
275 275
  		update ms_sys_user
276 276
  		<set>
277
- 			dept_id = #{deptId},
278
- 			<if test="userName != null and userName != ''">user_name = #{userName},</if>
279
- 			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
280
- 			id_card = #{idCard},
281
- 			email = #{email},
282
- 			phonenumber = #{phonenumber},
283
- 			sex = #{sex},
284
- 			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
285
- 			<if test="password != null and password != ''">password = #{password},</if>
286
- 			<if test="status != null and status != ''">status = #{status},</if>
287
- 			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
288
- 			<if test="loginDate != null">login_date = #{loginDate},</if>
289
- 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
290
- 			remark = #{remark},
291
- 			specialty = #{specialty},
277
+			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
278
+			<if test="userName != null and userName != ''">user_name = #{userName},</if>
279
+			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
280
+			<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
281
+			<if test="email != null ">email = #{email},</if>
282
+			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
283
+			<if test="sex != null and sex != ''">sex = #{sex},</if>
284
+			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
285
+			<if test="password != null and password != ''">password = #{password},</if>
286
+			<if test="status != null and status != ''">status = #{status},</if>
287
+			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
288
+			<if test="loginDate != null">login_date = #{loginDate},</if>
289
+			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
290
+			<if test="remark != null">remark = #{remark},</if>
291
+			<if test="specialty != null">specialty = #{specialty},</if>
292 292
  			update_time = sysdate()
293 293
  		</set>
294 294
  		where user_id = #{userId}