ebom-pbom版本对齐问题
This commit is contained in:
parent
cb8abd0349
commit
ec497a742c
|
|
@ -1200,6 +1200,9 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
// newPBom.setCurrentVersion(VersionUtil.getNextVersion(""));
|
// newPBom.setCurrentVersion(VersionUtil.getNextVersion(""));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(StrUtil.isNotBlank(newPBom.getEbomVersion()) ){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//旧bom除T项之外
|
//旧bom除T项之外
|
||||||
List<BomNewPbomParentVO> oldBomDetail = this.getBaseMapper().getParentChild(oldParent.getRowId());
|
List<BomNewPbomParentVO> oldBomDetail = this.getBaseMapper().getParentChild(oldParent.getRowId());
|
||||||
List<BomNewPbomParentVO> oldBomNoTChildren = oldBomDetail.stream().filter(u -> !EBomConstant.PROJECT_TYPE_T.equalsIgnoreCase(u.getProjectType())).collect(Collectors.toList());
|
List<BomNewPbomParentVO> oldBomNoTChildren = oldBomDetail.stream().filter(u -> !EBomConstant.PROJECT_TYPE_T.equalsIgnoreCase(u.getProjectType())).collect(Collectors.toList());
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,10 @@ public abstract class FormalEBomToPbomBase {
|
||||||
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
oldParent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
oldParent.setDeptName(SessionUtil.getDepartName());
|
oldParent.setDeptName(SessionUtil.getDepartName());
|
||||||
oldParent.setDeptRowId(SessionUtil.getDepartRowId());
|
oldParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||||
|
if(StrUtil.isNotBlank(parentVo.getCurrentVersion()) && VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
|
||||||
|
oldParent.setCurrentVersion(parentVo.getCurrentVersion());
|
||||||
|
oldParent.setEbomVersion(parentVo.getCurrentVersion());
|
||||||
|
}
|
||||||
this.pBomParentResult.add(oldParent);
|
this.pBomParentResult.add(oldParent);
|
||||||
return oldParent;
|
return oldParent;
|
||||||
}
|
}
|
||||||
|
|
@ -316,6 +320,11 @@ public abstract class FormalEBomToPbomBase {
|
||||||
pBomParent.setCreatedBy(SessionUtil.getUserCode());
|
pBomParent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
pBomParent.setSource(PbomSourceEnum.FROM_EBOM.getValue());
|
pBomParent.setSource(PbomSourceEnum.FROM_EBOM.getValue());
|
||||||
pBomParent.setSourceStatus(PbomSourceStatusEnum.EBOM.getValue());
|
pBomParent.setSourceStatus(PbomSourceStatusEnum.EBOM.getValue());
|
||||||
|
//EBOM版本大于pbom版本则用EBOm版本
|
||||||
|
if(oldParent!=null && VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
|
||||||
|
pBomParent.setCurrentVersion(parentVo.getCurrentVersion());
|
||||||
|
pBomParent.setCurrentVersion(parentVo.getCurrentVersion());
|
||||||
|
}
|
||||||
if (Objects.nonNull(oldParent)) {
|
if (Objects.nonNull(oldParent)) {
|
||||||
oldParent.setExpireEndTime(LocalDateTime.now());
|
oldParent.setExpireEndTime(LocalDateTime.now());
|
||||||
oldParent.setLastVersionIs(0);
|
oldParent.setLastVersionIs(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue