rev:修改单据查询
This commit is contained in:
@@ -177,14 +177,16 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
if (!CollectionUtils.isEmpty(pmFormDataDtos)){
|
||||
List<String> parents = pmFormDataDtos.stream().map(PmFormDataDto::getId).collect(Collectors.toList());
|
||||
List<PmFormDataDto> childs = this.baseMapper.selectChilds(parents);
|
||||
Map<String, List<PmFormDataDto>> childMap = childs.stream().collect(Collectors.groupingBy(PmFormDataDto::getParent_id));
|
||||
for (PmFormDataDto dataDto : pmFormDataDtos) {
|
||||
List<PmFormDataDto> children = childMap.get(dataDto.getId());
|
||||
for (PmFormDataDto child : children) {
|
||||
String productArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(productArea);
|
||||
if (!CollectionUtils.isEmpty(childs)){
|
||||
Map<String, List<PmFormDataDto>> childMap = childs.stream().collect(Collectors.groupingBy(PmFormDataDto::getParent_id));
|
||||
for (PmFormDataDto dataDto : pmFormDataDtos) {
|
||||
List<PmFormDataDto> children = childMap.get(dataDto.getId());
|
||||
for (PmFormDataDto child : children) {
|
||||
String productArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(productArea);
|
||||
}
|
||||
dataDto.setChildren(children);
|
||||
}
|
||||
dataDto.setChildren(children);
|
||||
}
|
||||
}
|
||||
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PmFormDataDto> dtoPage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPages(), page.getPageSize(), page.getTotal());
|
||||
|
||||
Reference in New Issue
Block a user