【批量替代BOM】PBOM列表工厂字段

This commit is contained in:
10001392 2024-10-29 15:24:53 +08:00
parent 4715a6a8fb
commit d7bd61f7f4
2 changed files with 7 additions and 0 deletions

View File

@ -90,4 +90,9 @@ public class BaseBomVO {
@ApiModelProperty(value = "版本过期时间")
private LocalDateTime expireEndTime;
/**
* 工厂
*/
@ApiModelProperty(value = "工厂")
private String factory;
}

View File

@ -174,6 +174,7 @@ public class BatchBomService {
baseBomVO.setExpireEndTime(parent.getExpireEndTime());
baseBomVO.setDeviseUserCode(parent.getDeviseUserCode());
baseBomVO.setDeviseName(parent.getDeviseName());
baseBomVO.setFactory(parent.getFacCode());
Optional<BomNewPbomChildEntity> first = pbomChildEntities.stream().filter(item -> item.getParentRowId().equals(parent.getRowId())).findFirst();
if (first.isPresent()) {
BomNewPbomChildEntity pbomChild = first.get();
@ -539,6 +540,7 @@ public class BatchBomService {
for (BaseBomVO baseBomVO: baseBomVOList) {
BomNewPbomParentEntity draftParent = bomNewPbomParentService.lambdaQuery()
.eq(BomNewPbomParentEntity::getMaterialNo, baseBomVO.getParentMaterialNo())
.eq(BomNewPbomParentEntity::getFacCode, baseBomVO.getFactory())
.lt(BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
.one();
if (ObjectUtil.isNotEmpty(draftParent)) {