文案调整

This commit is contained in:
wangliwen 2022-07-13 10:46:09 +08:00
parent 60f4e1ae14
commit bd13ed4b62
1 changed files with 22 additions and 16 deletions

View File

@ -83,22 +83,28 @@ public class TAbilityApplicationController {
params.put("abilityprocess_v2", Boolean.TRUE); // 是否根据流程 abilityprocess_v2 来分页
params.put("user_id", user == null ? null : user.getId());
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
page.getList().stream().map(index -> {
List<TAbilityApplicationDTO> dtos =
tAbilityApplicationService.getByInstanceId(index.getInstanceId());
if (!dtos.isEmpty()) {
dtos.stream()
.limit(1l)
.forEach(dto -> {
BeanUtils.copyProperties(dto, index);
if (StringUtils.isNotEmpty(index.getCameraList())) {
index.setSystem("申请摄像头列表:" + index.getSystem() + " 等,共" + dtos.size() + "");
return;
}
});
}
return index;
}).collect(Collectors.toList());
List<TAbilityApplicationDTO> list =
page.getList().stream().map(index -> {
List<TAbilityApplicationDTO> dtos =
tAbilityApplicationService.getByInstanceId(index.getInstanceId());
if (!dtos.isEmpty()) {
dtos.stream()
.limit(1l)
.forEach(dto -> {
BeanUtils.copyProperties(dto, index);
if (StringUtils.isNotEmpty(index.getCameraList())) {
if (dtos.size() > 1) {
index.setSystem("视频资源申请:(" + index.getSystem() + "" + dtos.size() + "个摄像头)");
} else {
index.setSystem("视频资源申请:" + index.getSystem());
}
return;
}
});
}
return index;
}).collect(Collectors.toList());
page.setList(list);
return new Result<PageData<TAbilityApplicationDTO>>().ok(page);
}