Compare commits
2 Commits
d8bff2e17e
...
3ccdca54c5
Author | SHA1 | Date |
---|---|---|
wangliwen | 3ccdca54c5 | |
wangliwen | 8ff33d570e |
|
@ -286,7 +286,7 @@ public class TAbilityApplicationController {
|
||||||
@GetMapping("getByApplyFlag/{applyFlag}")
|
@GetMapping("getByApplyFlag/{applyFlag}")
|
||||||
@ApiOperation("根据申请标识获取能力申请信息")
|
@ApiOperation("根据申请标识获取能力申请信息")
|
||||||
@LogOperation("根据申请标识获取能力申请信息")
|
@LogOperation("根据申请标识获取能力申请信息")
|
||||||
public Result<TAbilityApplicationV2DTO> getByApplyFlag(@PathVariable("applyFlag") String applyFlag) {
|
public Result<TAbilityApplicationV2DTO> getByApplyFlag(@PathVariable("applyFlag") String applyFlag, @RequestParam Map<String, Object> requestParams) {
|
||||||
final UserDetail user = SecurityUser.getUser();
|
final UserDetail user = SecurityUser.getUser();
|
||||||
Map<String, Object> params = new HashMap<String, Object>() {
|
Map<String, Object> params = new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
|
@ -309,6 +309,14 @@ public class TAbilityApplicationController {
|
||||||
return sysDeptDTO.getName();
|
return sysDeptDTO.getName();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
if (requestParams.containsKey("resourceDeptName") && StringUtils.isNotEmpty(requestParams.get("resourceDeptName").toString())) { // 限制只出该资源所属部门的申请情况
|
||||||
|
Map<String, List<TAbilityApplicationDTO>> finalResult = result;
|
||||||
|
result = new HashMap<String, List<TAbilityApplicationDTO>>() {{
|
||||||
|
put(requestParams.get("resourceDeptName").toString(), finalResult.get(requestParams.get("resourceDeptName").toString()));
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
||||||
if (applicationDTOS.isEmpty()) {
|
if (applicationDTOS.isEmpty()) {
|
||||||
return new Result<TAbilityApplicationV2DTO>().ok(null);
|
return new Result<TAbilityApplicationV2DTO>().ok(null);
|
||||||
}
|
}
|
||||||
|
@ -322,8 +330,9 @@ public class TAbilityApplicationController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Map<String, List<TAbilityApplicationDTO>> finalResult1 = result;
|
||||||
Map<String, List<Map<String, Object>>> re = result.keySet().stream().map(index -> {
|
Map<String, List<Map<String, Object>>> re = result.keySet().stream().map(index -> {
|
||||||
final List<TAbilityApplicationDTO> tAbilityApplicationDTOList = result.get(index);
|
final List<TAbilityApplicationDTO> tAbilityApplicationDTOList = finalResult1.get(index);
|
||||||
if (tAbilityApplicationDTOList.isEmpty()) {
|
if (tAbilityApplicationDTOList.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue