EBOM-转PBOM时,直发包,发货前包-直接覆盖工作表的PBOM
This commit is contained in:
parent
5c0032ded1
commit
7bb2bce81d
|
|
@ -191,7 +191,7 @@ public abstract class EBomToPbomBase {
|
||||||
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
||||||
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
||||||
//当bom创建人为本人 或 版本大于当前版本则覆盖
|
//当bom创建人为本人 或 版本大于当前版本则覆盖
|
||||||
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
|
if (VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.equalsValue(parentVo.getVirtualPartType()) || VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.equalsValue(parentVo.getVirtualPartType()) || oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
|
||||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||||
// this.delParentRowIds.add(oldParent.getRowId());
|
// this.delParentRowIds.add(oldParent.getRowId());
|
||||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ public abstract class FormalEBomToPbomBase {
|
||||||
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
|
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
|
||||||
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
|
||||||
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
|
||||||
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) {
|
if (VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.equalsValue(parentVo.getVirtualPartType()) || VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.equalsValue(parentVo.getVirtualPartType()) || oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) {
|
||||||
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
|
||||||
oldParent.setSourceRowId(parentVo.getBomRowId());
|
oldParent.setSourceRowId(parentVo.getBomRowId());
|
||||||
oldParent.setCreatedTime(LocalDateTime.now());
|
oldParent.setCreatedTime(LocalDateTime.now());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue