fix(dqbom): 优化查询条件
This commit is contained in:
parent
14fa056416
commit
a77936dc42
|
|
@ -584,7 +584,7 @@ public class DQBomService {
|
|||
p.setReleaseTime(LocalDateTime.now());
|
||||
p.setReleaseUserName(SessionUtil.getUserName());
|
||||
p.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
p.setSource(2);
|
||||
p.setSource(PbomSourceEnum.FROM_DQBOM.getValue());
|
||||
});
|
||||
bomNewPbomParentService.saveBatch(pparents);
|
||||
}
|
||||
|
|
@ -600,8 +600,10 @@ public class DQBomService {
|
|||
wrapper.ne(BomNewDQbomParentEntity::getRowId, parent.getRowId());
|
||||
dQBomParentService.getBaseMapper().delete(wrapper);
|
||||
|
||||
BomNewPbomParentEntity pp = bomNewPbomParentService.lambdaQuery().eq(BomNewPbomParentEntity::getMaterialNo, parent.getMaterialNo())
|
||||
.orderByDesc(BomNewPbomParentEntity::getRowId)
|
||||
BomNewPbomParentEntity pp = bomNewPbomParentService.lambdaQuery()
|
||||
.eq(BomNewPbomParentEntity::getMaterialNo, parent.getMaterialNo())
|
||||
.eq(BomNewPbomParentEntity::getFacCode, FactoryCodeEnum.FACTORY_1010.getValue())
|
||||
.orderByDesc(BomNewPbomParentEntity::getCurrentVersion)
|
||||
.last(" limit 1")
|
||||
.one();
|
||||
if (!Objects.isNull(pp)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue