【批量替代BOM】PBOM列表工厂字段
This commit is contained in:
parent
4715a6a8fb
commit
d7bd61f7f4
|
|
@ -90,4 +90,9 @@ public class BaseBomVO {
|
||||||
@ApiModelProperty(value = "版本过期时间")
|
@ApiModelProperty(value = "版本过期时间")
|
||||||
private LocalDateTime expireEndTime;
|
private LocalDateTime expireEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工厂
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "工厂")
|
||||||
|
private String factory;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@ public class BatchBomService {
|
||||||
baseBomVO.setExpireEndTime(parent.getExpireEndTime());
|
baseBomVO.setExpireEndTime(parent.getExpireEndTime());
|
||||||
baseBomVO.setDeviseUserCode(parent.getDeviseUserCode());
|
baseBomVO.setDeviseUserCode(parent.getDeviseUserCode());
|
||||||
baseBomVO.setDeviseName(parent.getDeviseName());
|
baseBomVO.setDeviseName(parent.getDeviseName());
|
||||||
|
baseBomVO.setFactory(parent.getFacCode());
|
||||||
Optional<BomNewPbomChildEntity> first = pbomChildEntities.stream().filter(item -> item.getParentRowId().equals(parent.getRowId())).findFirst();
|
Optional<BomNewPbomChildEntity> first = pbomChildEntities.stream().filter(item -> item.getParentRowId().equals(parent.getRowId())).findFirst();
|
||||||
if (first.isPresent()) {
|
if (first.isPresent()) {
|
||||||
BomNewPbomChildEntity pbomChild = first.get();
|
BomNewPbomChildEntity pbomChild = first.get();
|
||||||
|
|
@ -539,6 +540,7 @@ public class BatchBomService {
|
||||||
for (BaseBomVO baseBomVO: baseBomVOList) {
|
for (BaseBomVO baseBomVO: baseBomVOList) {
|
||||||
BomNewPbomParentEntity draftParent = bomNewPbomParentService.lambdaQuery()
|
BomNewPbomParentEntity draftParent = bomNewPbomParentService.lambdaQuery()
|
||||||
.eq(BomNewPbomParentEntity::getMaterialNo, baseBomVO.getParentMaterialNo())
|
.eq(BomNewPbomParentEntity::getMaterialNo, baseBomVO.getParentMaterialNo())
|
||||||
|
.eq(BomNewPbomParentEntity::getFacCode, baseBomVO.getFactory())
|
||||||
.lt(BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
|
.lt(BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
|
||||||
.one();
|
.one();
|
||||||
if (ObjectUtil.isNotEmpty(draftParent)) {
|
if (ObjectUtil.isNotEmpty(draftParent)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue