bom-生成多个版本问题
This commit is contained in:
parent
07b4f1bc17
commit
607ed9d581
|
|
@ -66,7 +66,7 @@ public class EBomDetailTask extends RecursiveTask<List<BomNewEbomParentVO>> {
|
||||||
detailVO.setDeptName(ebomParentEntity.getDeptName());
|
detailVO.setDeptName(ebomParentEntity.getDeptName());
|
||||||
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
detailVO.setDeviseName(ebomParentEntity.getDeviseName());
|
||||||
detailVO.setBomExist(ebomParentEntity.getBomExist());
|
detailVO.setBomExist(ebomParentEntity.getBomExist());
|
||||||
|
detailVO.setStatus(ebomParentEntity.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public class EBomToPBom {
|
||||||
check();
|
check();
|
||||||
//bom 提层
|
//bom 提层
|
||||||
liftingLayer();
|
liftingLayer();
|
||||||
List<BomNewEbomParentVO> parentList = result.stream().filter(u -> u.getBomRowId() > 0).collect(Collectors.toList());
|
List<BomNewEbomParentVO> parentList = result.stream().filter(u -> u.getBomRowId() > 0 && u.getStatus()<PBomStatusEnum.PUBLISH.getValue()).collect(Collectors.toList());
|
||||||
List<String> hasConvert=new ArrayList<>();
|
List<String> hasConvert=new ArrayList<>();
|
||||||
|
|
||||||
for (String facCode : facCodes) {
|
for (String facCode : facCodes) {
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
|
||||||
|
|
||||||
|
|
||||||
//处理子级
|
//处理子级
|
||||||
List<BomOriginalListVO> bomParents = bomDetail.stream().filter(u -> u.getBomRowId() > 0).collect(Collectors.toList());
|
List<BomOriginalListVO> bomParents = bomDetail.stream().filter(u -> u.getBomRowId() > 0 && ( OriginalStatusEnum.UN_CONVERT.equalsValue(u.getStatus()) || OriginalStatusEnum.REFERENCE.equalsValue(u.getStatus())) ).collect(Collectors.toList());
|
||||||
for (BomOriginalListVO childParent : bomParents) {
|
for (BomOriginalListVO childParent : bomParents) {
|
||||||
hanlerDo(childParent);
|
hanlerDo(childParent);
|
||||||
this.hasHandlerParentIds.add(childParent.getBomRowId());
|
this.hasHandlerParentIds.add(childParent.getBomRowId());
|
||||||
|
|
@ -315,7 +315,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
|
||||||
if(parentMap.containsKey(parentEnt.getMaterialNo())){
|
if(parentMap.containsKey(parentEnt.getMaterialNo())){
|
||||||
return parentMap.get(parentEnt.getMaterialNo()).getRowId();
|
return parentMap.get(parentEnt.getMaterialNo()).getRowId();
|
||||||
}
|
}
|
||||||
BomNewEbomParentEntity ebom = SpringUtil.getBean(BomNewEbomParentService.class).lambdaQuery().eq(BomNewEbomParentEntity::getMaterialNo, parentEnt.getMaterialNo()).eq(BomNewEbomParentEntity::getLastVersionIs, 1).one();
|
BomNewEbomParentEntity ebom = SpringUtil.getBean(BomNewEbomParentService.class).lambdaQuery().eq(BomNewEbomParentEntity::getMaterialNo, parentEnt.getMaterialNo()).last(" order by current_version desc limit 1").one();
|
||||||
BomNewEbomParentEntity eBomParent = new BomNewEbomParentEntity();
|
BomNewEbomParentEntity eBomParent = new BomNewEbomParentEntity();
|
||||||
BeanUtil.copyProperties(parentEnt, eBomParent, "materialGetType");
|
BeanUtil.copyProperties(parentEnt, eBomParent, "materialGetType");
|
||||||
eBomParent.setRowId(parentEnt.getEBomRowId() > 0 ? parentEnt.getEBomRowId() : IdWorker.getId());
|
eBomParent.setRowId(parentEnt.getEBomRowId() > 0 ? parentEnt.getEBomRowId() : IdWorker.getId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue