optimize: 导入SAP时,先获取所有bom,然后将来源是SAP的bom丢弃,其余的导入到SAP中

This commit is contained in:
曹鹏飞 2024-08-16 17:24:45 +08:00
parent 9e37fcd9ef
commit 2c7db34d4a
1 changed files with 3 additions and 2 deletions

View File

@ -164,9 +164,10 @@ public class BomNewEbomExportToSAP {
private BomNewEbomParentEntity getParent(BomNewEbomChildEntity c) {
BomNewEbomParentEntity p = bomNewEbomParentService.lambdaQuery()
.select(BomNewEbomParentEntity::getRowId, BomNewEbomParentEntity::getMaterialNo
, BomNewEbomParentEntity::getMaterialDesc, BomNewEbomParentEntity::getUserRootIs)
, BomNewEbomParentEntity::getMaterialDesc, BomNewEbomParentEntity::getUserRootIs
, BomNewEbomParentEntity::getSource)
.eq(BomNewEbomParentEntity::getMaterialNo, c.getMaterialNo())
.eq(BomNewEbomParentEntity::getUserRootIs, 0)
// .eq(BomNewEbomParentEntity::getUserRootIs, 0)
.eq(BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
// .ne(BomNewEbomParentEntity::getSource, EBomSourceEnum.FROM_SAP.getValue())
.orderByDesc(BomNewEbomParentEntity::getCurrentVersion)