Merge branch 'dev'

This commit is contained in:
wangliwen 2022-11-18 08:59:22 +08:00
commit 22600ddedc
6 changed files with 49 additions and 0 deletions

View File

@ -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());
}
}

View File

@ -47,4 +47,6 @@ public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntit
Integer getDeptInfrastructureApply(Long deptId);
List<Long> getInstanceIdByResId(Long id);
List<Map> getApplyDeptList();
}

View File

@ -51,4 +51,11 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
* @return
*/
Integer getDeptInfrastructureApply(Long deptId);
/**
* 获取申请能力部门列表
* @return
*/
Object getApplyDeptList();
}

View File

@ -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();
}
}

View File

@ -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>

View File

@ -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>