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