fix(ebom): 修复工作表搜索问题

This commit is contained in:
曹鹏飞 2024-05-26 20:08:53 +08:00
parent d182fe1c61
commit ebe8c35165
2 changed files with 2 additions and 5 deletions

View File

@ -2221,7 +2221,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
roots.forEach(this::buildChildren);
//从子级开始查找
List<BomNewEbomParentVO> boms = this.getBaseMapper().getBom(query.getMaterialNo(), query.getDrawingNo());
boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0));
boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0) || Objects.equals(c.getStatus(), EBomStatusEnum.PUBLISHED.getValue()));
boms.forEach(this::buildChildren);
roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0 && b.getUserRootIs() == 0 && b.getRootIsForWaitReview() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList()));

View File

@ -402,13 +402,10 @@
AND status IN (1,3) AND (root_is=1 OR user_root_is=1 OR root_is_for_wait_review=1) AND
created_by=#{userCode}
</if>
<if test="userJob==1 and query.dataType==0">
<if test="userJob==1">
AND ((root_is=1 OR user_root_is=1) AND status=2) OR (status IN (1,3) AND (root_is=1 OR user_root_is=1 OR
root_is_for_wait_review=1) AND created_by=#{userCode})
</if>
<if test="userJob==1 and query.dataType==1">
AND (root_is=1 OR user_root_is=1) AND status=4
</if>
<if test="query.deviseName!=null and query.deviseName!=''">
AND devise_name=#{query.deviseName}
</if>