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