List<String> ids = list.stream().map(ContractModificationBasicInfoDTO::getUuid).collect(Collectors.toList());
//构造树形结构
List<ReportDetailDTO> dtos = ICostTreeBuilder.buildTree(financialReportDetailList.stream().map(item -> {
item.setSort(item.getContractType());
return entityToDTO(item);
}).sorted(Comparator.comparing(ReportDetailDTO::getCode)).collect(Collectors.toList()));
List<WorkflowToDoInfo> todoWorkflows = workflowListResponse.getMyCCWorkflowList().stream().map(item -> {
GeneralResponse generalResponse = workflowInstanceService.getInstanceStatus(item.getRequestId(),userId);
JSONObject json=(JSONObject) JSONObject.toJSON(generalResponse.getData());
item.setTaskAssigneeID(json.get("taskAssigneeID").toString());
item.setTaskAssigneeName(json.get("taskAssigneeName").toString());
return item;
}).collect(Collectors.toList());
workflowListResponse.setTodoWorkflows(todoWorkflows);
private CompletedBidSectionInfoDTO entityToDTO(BidProcessSection entity) {
final CompletedBidSectionInfoDTO infoDTO = new CompletedBidSectionInfoDTO();
BeanUtils.copyProperties(entity, infoDTO);
infoDTO.setBidType(entity.getBidType() == null ? 0 : (int) entity.getBidType());
// 貌似字段带了 json 数据库查询会返回 null
if (StringUtils.isBlank(infoDTO.getFileInfoJson())) {
infoDTO.setFileInfoJson(entity.getBidFileInfo());
}
return infoDTO;
}
学不学,不学就穷死!!!