修改了特殊案件与群众上报案件选择职能部门时过滤掉没有绑定专管员的类型
This commit is contained in:
parent
65a5afa26f
commit
912a185b8f
@ -81,4 +81,17 @@ public class DictAppController extends AbstractController {
|
||||
return dictService.listCaseTypeBind(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查找绑定职能部门的案件类型及子项(APP特殊案件用)", notes = "查找绑定职能部门的案件类型及子项")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "dictParentId", value = "字典上级ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-bind-case-type-all/{dictParentId}")
|
||||
public List<DictDTO> listBindCaseTypeAll(@PathVariable("dictParentId") String dictParentId) throws SearchException {
|
||||
Map<String, Object> params = getParams();
|
||||
params.put("dictParentId", dictParentId);
|
||||
return dictService.listBindCaseTypeAll(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -105,4 +105,11 @@ public interface IDictDao {
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> listBindDept(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询职能部门下所有专管员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> listBindDeptUser(Map<String, Object> params);
|
||||
}
|
||||
|
@ -134,4 +134,11 @@ public interface IDictService {
|
||||
* @return
|
||||
*/
|
||||
List<DictDTO> listCaseTypeBind(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查找绑定职能部门的案件类型及子项(APP特殊案件用)
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<DictDTO> listBindCaseTypeAll(Map<String, Object> params);
|
||||
}
|
||||
|
@ -79,6 +79,19 @@ public class DictServiceImpl extends AbstractService implements IDictService {
|
||||
return dictDTOs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictDTO> listBindCaseTypeAll(Map<String, Object> params) {
|
||||
// 查找所有绑定部门的案件类型父级列表
|
||||
List<DictDTO> dictDTOS = listCaseTypeParentBind(params);
|
||||
for (DictDTO item : dictDTOS){
|
||||
params.clear();
|
||||
params.put("dictParentId", item.getDictId());
|
||||
List<DictDTO> subDTOs = listCaseTypeBind(params);
|
||||
item.setSubDicts(subDTOs);
|
||||
}
|
||||
return dictDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictDTO getDict(Map<String, Object> params) throws SearchException {
|
||||
return dictDao.getDict(params);
|
||||
@ -185,7 +198,16 @@ public class DictServiceImpl extends AbstractService implements IDictService {
|
||||
params.put("caseTypeIds",StringUtils.join(caseTypeIds, ","));
|
||||
List<Map<String, Object>> deptList = dictDao.listBindDept(params);
|
||||
if(deptList != null && deptList.size() > 0){
|
||||
bindDictList.add(item);
|
||||
List<String> deptIds = new ArrayList<>();
|
||||
for (Map<String, Object> deptItem :deptList){
|
||||
deptIds.add(deptItem.get("department_id").toString());
|
||||
}
|
||||
// 查询部门集合中是否有专管员
|
||||
params.put("deptIds",StringUtils.join(deptIds, ","));
|
||||
List<Map<String, Object>> deptUserMap = dictDao.listBindDeptUser(params);
|
||||
if(deptUserMap != null && deptUserMap.size() > 0){
|
||||
bindDictList.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return bindDictList;
|
||||
@ -204,7 +226,16 @@ public class DictServiceImpl extends AbstractService implements IDictService {
|
||||
params.put("caseTypeIds",StringUtils.join(caseTypeIds, ","));
|
||||
List<Map<String, Object>> deptList = dictDao.listBindDept(params);
|
||||
if(deptList != null && deptList.size() > 0){
|
||||
bindDictList.add(item);
|
||||
List<String> deptIds = new ArrayList<>();
|
||||
for (Map<String, Object> deptItem :deptList){
|
||||
deptIds.add(deptItem.get("department_id").toString());
|
||||
}
|
||||
// 查询部门集合中是否有专管员
|
||||
params.put("deptIds",StringUtils.join(deptIds, ","));
|
||||
List<Map<String, Object>> deptUserMap = dictDao.listBindDeptUser(params);
|
||||
if(deptUserMap != null && deptUserMap.size() > 0){
|
||||
bindDictList.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return bindDictList;
|
||||
|
@ -223,4 +223,20 @@
|
||||
where is_delete = '0'
|
||||
AND FIND_IN_SET(case_type, #{caseTypeIds})
|
||||
</select>
|
||||
|
||||
<!-- 查询部门集合中是否有专管员 -->
|
||||
<!-- t3.role_id = 'bc405346-8714-4ded-89ac-9cc4d755f66a' 关联专管员角色-->
|
||||
<select id="listBindDeptUser" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.user_name
|
||||
FROM
|
||||
sys_department_user t1
|
||||
LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id AND is_delete = '0'
|
||||
LEFT JOIN sys_role_user t3 ON t3.user_id = t2.user_id
|
||||
WHERE
|
||||
FIND_IN_SET(t1.department_id, #{deptIds})
|
||||
AND t2.user_name IS NOT NULL
|
||||
AND t3.role_id = 'bc405346-8714-4ded-89ac-9cc4d755f66a'
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user