diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java index 49809aab..05e5b660 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java @@ -326,11 +326,8 @@ public class BomNewPbomParentService extends ServiceImpl materialNos = parentChild.stream().map(BaseMaterialVO::getMaterialNo).collect(Collectors.toList()); if (CollUtil.isNotEmpty(materialNos)) { List list = this.lambdaQuery().in(BomNewPbomParentEntity::getMaterialNo, materialNos) - // .eq(PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()), BomNewPbomParentEntity::getLastVersionIs, 1) - // .lt(!PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()),BomNewPbomParentEntity::getStatus,PBomStatusEnum.PUBLISH.getValue()) - // .eq(PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()),BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue()) - .eq(PBomStatusEnum.PUBLISH.getValue() > parent.getStatus(), BomNewPbomParentEntity::getLastVersionIs, 1) - .ge(PBomStatusEnum.PUBLISH.getValue() <= parent.getStatus(), BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue()) + .eq(type.equals(0), BomNewPbomParentEntity::getLastVersionIs, 1) + .ge(type.equals(1), BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue()) .eq(BomNewPbomParentEntity::getFacCode,parent.getFacCode()) .list();