文案调整

This commit is contained in:
wangliwen 2022-07-13 10:47:21 +08:00
parent 31cdc17236
commit 61ab58b704
1 changed files with 22 additions and 16 deletions

View File

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