fix: pbom正式表分工厂页面数据按ordernnum排序

This commit is contained in:
曹鹏飞 2024-04-15 17:19:59 +08:00
parent eb3d2da8bf
commit b4880ab912
2 changed files with 10 additions and 3 deletions

View File

@ -116,9 +116,13 @@ public class PBomDetailTask extends RecursiveTask<List<BomNewPbomParentVO>> {
}
if (CollUtil.isNotEmpty(bomDetail)) {
List<Long> childBowIds = bomDetail.stream().filter(u -> u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
List<Long> childBowIds = bomDetail.stream().map(BomNewPbomParentVO::getBomRowId).filter(bomRowId -> bomRowId > 0).collect(Collectors.toList());
if (CollUtil.isNotEmpty(childBowIds)) {
List<BomNewPbomChildEntity> children = SpringUtil.getBean(BomNewPbomChildService.class).lambdaQuery().in(BomNewPbomChildEntity::getParentRowId, childBowIds).list();
List<BomNewPbomChildEntity> children = SpringUtil.getBean(BomNewPbomChildService.class)
.lambdaQuery()
.in(BomNewPbomChildEntity::getParentRowId, childBowIds)
.orderByAsc(BomNewPbomChildEntity::getOrderNumber)
.list();
List<BomNewPbomParentVO> bom = Convert.toList(BomNewPbomParentVO.class, children);
PBomDetailTask task = new PBomDetailTask(bom, countLevelState,levelNum);

View File

@ -138,7 +138,10 @@
</select>
<select id="getParentChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
select * from t_bom_new_pbom_child where parent_row_id=#{parentRowId}
select *
from t_bom_new_pbom_child
where parent_row_id = #{parentRowId}
order by order_number
</select>
<!--bom发布-->
<update id="bomRelease">