后台管理能力统计-能力使用统计查询申请部门列表接口修改-只查询有申请记录的部门
This commit is contained in:
parent
7e54dcebba
commit
5e403b6ae6
|
@ -213,10 +213,13 @@ public class TAbilityApplicationController {
|
|||
put("apply_flag", applyFlag); // 限定
|
||||
}
|
||||
};
|
||||
|
||||
/* 2022-11-16 去除对用户角色的判断,在后台能力统计处都可以看到申请详情
|
||||
// 非超级管理员,只出本人
|
||||
if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) {
|
||||
params.put("user_id", user == null ? null : user.getId());
|
||||
}
|
||||
*/
|
||||
List<TAbilityApplicationDTO> applicationDTOS = tAbilityApplicationService.list(params);
|
||||
Map<String, List<TAbilityApplicationDTO>> result = applicationDTOS.stream().collect(Collectors.groupingBy(t -> {
|
||||
SysDeptDTO sysDeptDTO = t.getResourceOwnerDept();
|
||||
|
@ -443,4 +446,11 @@ public class TAbilityApplicationController {
|
|||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("getApplyDeptList")
|
||||
@ApiOperation("/获取申请部门列表")
|
||||
@LogOperation("/获取申请部门列表")
|
||||
public Result getApplyDeptList() {
|
||||
return new Result().ok(tAbilityApplicationService.getApplyDeptList());
|
||||
}
|
||||
|
||||
}
|
|
@ -47,4 +47,6 @@ public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntit
|
|||
Integer getDeptInfrastructureApply(Long deptId);
|
||||
|
||||
List<Long> getInstanceIdByResId(Long id);
|
||||
|
||||
List<Map> getApplyDeptList();
|
||||
}
|
|
@ -51,4 +51,11 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
|
|||
* @return
|
||||
*/
|
||||
Integer getDeptInfrastructureApply(Long deptId);
|
||||
|
||||
/**
|
||||
* 获取申请能力部门列表
|
||||
* @return
|
||||
*/
|
||||
Object getApplyDeptList();
|
||||
|
||||
}
|
|
@ -25,6 +25,7 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityApplicationDao, TAbilityApplicationEntity, TAbilityApplicationDTO> implements TAbilityApplicationService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationServiceImpl.class);
|
||||
private TAbilityApplicationDao abilityApplicationDao;
|
||||
|
||||
@Override
|
||||
public QueryWrapper<TAbilityApplicationEntity> getWrapper(Map<String, Object> params) {
|
||||
|
@ -131,5 +132,10 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
return baseDao.getDeptInfrastructureApply(deptId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getApplyDeptList() {
|
||||
return abilityApplicationDao.getApplyDeptList();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -292,4 +292,27 @@
|
|||
<select id="getInstanceIdByResId" resultType="java.lang.Long">
|
||||
SELECT instance_id FROM t_ability_application WHERE resource_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getApplyDeptList" resultType="java.util.Map">
|
||||
SELECT DISTINCT
|
||||
sd.id,
|
||||
sd.NAME
|
||||
FROM
|
||||
t_ability_application taa,
|
||||
sys_dept sd,
|
||||
sys_user su
|
||||
WHERE 1 = 1
|
||||
AND taa.user_id = su.id
|
||||
AND su.dept_id = sd.id
|
||||
AND taa.del_flag = 0
|
||||
UNION
|
||||
SELECT
|
||||
sd.id,
|
||||
tmb.dept
|
||||
FROM
|
||||
sys_dept sd,
|
||||
t_meetingroom_book tmb
|
||||
WHERE
|
||||
sd.NAME = tmb.dept
|
||||
</select>
|
||||
</mapper>
|
|
@ -2322,6 +2322,7 @@
|
|||
1 = 1
|
||||
AND tdr.del_flag = 0
|
||||
AND tdr.dept_id = #{deptId}
|
||||
AND tdr.type = '应用资源'
|
||||
<if test="key != null and key != ''">
|
||||
AND tdr.name like CONCAT('%', #{key}, '%')
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue