fix(ebom): 工作表搜索时只搜索草稿数据
This commit is contained in:
parent
5cfc095c29
commit
8719140089
|
|
@ -86,7 +86,7 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
|
|||
|
||||
List<BomNewEbomParentVO> getChildren(Long bomRowId, int type);
|
||||
|
||||
List<BomNewEbomParentVO> getBom(String materialNo, String drawingNo);
|
||||
List<BomNewEbomParentVO> getBom(Integer state, String materialNo, String drawingNo);
|
||||
|
||||
List<BomNewEbomParentVO> getVOById(Long parentRowId);
|
||||
|
||||
|
|
|
|||
|
|
@ -2241,7 +2241,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
.collect(Collectors.toList());
|
||||
roots.forEach(this::buildChildren);
|
||||
//从子级开始查找
|
||||
List<BomNewEbomParentVO> boms = this.getBaseMapper().getBom(query.getMaterialNo(), query.getDrawingNo());
|
||||
List<BomNewEbomParentVO> boms = this.getBaseMapper().getBom(0, query.getMaterialNo(), query.getDrawingNo());
|
||||
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()));
|
||||
|
|
|
|||
|
|
@ -464,6 +464,12 @@
|
|||
<if test="drawingNo!=null and drawingNo!=''">
|
||||
AND b.drawing_no = #{drawingNo}
|
||||
</if>
|
||||
<if test="state==0">
|
||||
AND a.status < 4
|
||||
</if>
|
||||
<if test="state==1">
|
||||
AND a.status = 4
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY b.order_number
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue