fix: 修复导入SAP时的一个bug
This commit is contained in:
parent
9140da0752
commit
f4aae74c93
|
|
@ -174,7 +174,7 @@ public class BomNewEbomExportToSAP {
|
|||
BomNewEbomParentEntity p = bomNewEbomParentService.lambdaQuery()
|
||||
.select(BomNewEbomParentEntity::getRowId, BomNewEbomParentEntity::getMaterialNo
|
||||
, BomNewEbomParentEntity::getMaterialDesc, BomNewEbomParentEntity::getUserRootIs
|
||||
, BomNewEbomParentEntity::getSource)
|
||||
, BomNewEbomParentEntity::getSource, BomNewEbomParentEntity::getSapState)
|
||||
.eq(BomNewEbomParentEntity::getMaterialNo, c.getMaterialNo())
|
||||
// .eq(BomNewEbomParentEntity::getUserRootIs, 0)
|
||||
.eq(BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
||||
|
|
@ -182,7 +182,7 @@ public class BomNewEbomExportToSAP {
|
|||
.orderByDesc(BomNewEbomParentEntity::getCurrentVersion)
|
||||
.last(" limit 1")
|
||||
.one();
|
||||
if (Objects.nonNull(p) && p.getSapState() >= SapStatusEnum.PUB_ERROR.getValue()) {
|
||||
if (Objects.nonNull(p) && Objects.nonNull(p.getSapState()) && p.getSapState() >= SapStatusEnum.PUB_ERROR.getValue()) {
|
||||
liPIds.add(p.getRowId());
|
||||
}
|
||||
return p;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
|||
.orderByDesc(BomNewPbomParentEntity::getCurrentVersion)
|
||||
.last(" limit 1")
|
||||
.one();
|
||||
if (Objects.nonNull(parent) && parent.getSapState() >= SapStatusEnum.PUB_ERROR.getValue()) {
|
||||
if (Objects.nonNull(parent) && Objects.nonNull(parent.getSapState()) && parent.getSapState() >= SapStatusEnum.PUB_ERROR.getValue()) {
|
||||
liPIds.add(parent.getRowId());
|
||||
}
|
||||
return parent;
|
||||
|
|
|
|||
Loading…
Reference in New Issue