PBOM发布时,pbom在工作表时,当创建人为本人或版本大于当前版本则覆盖
This commit is contained in:
parent
ed45236c00
commit
96f7923e26
|
|
@ -85,7 +85,7 @@ public abstract class EBomToPbomBase {
|
|||
|
||||
//当子级为F项或Z项时-无需转的父级物料
|
||||
protected Set<String> childDelMaterialNos = new HashSet<>();
|
||||
private BomNewPbomParentEntity ;
|
||||
|
||||
|
||||
public abstract void convert();
|
||||
|
||||
|
|
@ -188,6 +188,8 @@ public abstract class EBomToPbomBase {
|
|||
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
|
||||
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
||||
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
||||
//当bom创建人为本人 或 版本大于当前版本则覆盖
|
||||
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
|
||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||
// this.delParentRowIds.add(oldParent.getRowId());
|
||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||
|
|
@ -197,7 +199,7 @@ public abstract class EBomToPbomBase {
|
|||
oldParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
this.pBomParentResult.add(oldParent);
|
||||
return oldParent;
|
||||
// }
|
||||
}
|
||||
|
||||
} else {
|
||||
// 降parentVo 及其子节点标记为不转换
|
||||
|
|
|
|||
|
|
@ -192,14 +192,16 @@ public abstract class FormalEBomToPbomBase {
|
|||
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
|
||||
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
||||
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||
oldParent.setCreatedTime(LocalDateTime.now());
|
||||
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
||||
oldParent.setDeptName(SessionUtil.getDepartName());
|
||||
oldParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
this.pBomParentResult.add(oldParent);
|
||||
return oldParent;
|
||||
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) {
|
||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||
oldParent.setCreatedTime(LocalDateTime.now());
|
||||
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
||||
oldParent.setDeptName(SessionUtil.getDepartName());
|
||||
oldParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||
this.pBomParentResult.add(oldParent);
|
||||
return oldParent;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 降parentVo 及其子节点标记为不转换
|
||||
|
|
|
|||
Loading…
Reference in New Issue