feat: ebom工作表精确搜索排序
This commit is contained in:
parent
5956c61075
commit
39ed6810eb
|
|
@ -2077,7 +2077,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
if (StrUtil.isBlank(query.getMaterialNo()) && StrUtil.isBlank(query.getDrawingNo())) {
|
if (StrUtil.isBlank(query.getMaterialNo()) && StrUtil.isBlank(query.getDrawingNo())) {
|
||||||
//列表搜索
|
//列表搜索
|
||||||
return result;
|
return result;
|
||||||
} else {
|
}
|
||||||
//根据编号或图号搜索
|
//根据编号或图号搜索
|
||||||
//从顶级开始查找
|
//从顶级开始查找
|
||||||
List<BomNewEbomParentVO> roots = result.getRecords().stream()
|
List<BomNewEbomParentVO> roots = result.getRecords().stream()
|
||||||
|
|
@ -2104,6 +2104,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
results.sort((r1, r2) -> r1.getBomRowId() >= r2.getBomRowId() ? r1.getBomRowId() > r2.getBomRowId() ? 1 : 0 : -1);
|
||||||
|
|
||||||
Page<BomNewEbomParentVO> pageResult = new Page<>();
|
Page<BomNewEbomParentVO> pageResult = new Page<>();
|
||||||
pageResult.setPages(1);
|
pageResult.setPages(1);
|
||||||
pageResult.setCurrent(1);
|
pageResult.setCurrent(1);
|
||||||
|
|
@ -2111,7 +2113,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
pageResult.setRecords(results);
|
pageResult.setRecords(results);
|
||||||
return pageResult;
|
return pageResult;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void merge(BomNewEbomParentVO v1, BomNewEbomParentVO v2) {
|
private void merge(BomNewEbomParentVO v1, BomNewEbomParentVO v2) {
|
||||||
v1.getChildNodes().addAll(v2.getChildNodes());
|
v1.getChildNodes().addAll(v2.getChildNodes());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue