1、变更记录暂时先取消
This commit is contained in:
parent
6069836320
commit
d10e070038
|
|
@ -897,35 +897,36 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
//标记跟节点
|
//标记跟节点
|
||||||
upRootMark(parent);
|
upRootMark(parent);
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getVirtualPackageCompositionResult())) {
|
// if (CollUtil.isNotEmpty(eBomToPBom.getVirtualPackageCompositionResult())) {
|
||||||
//先删除
|
// //先删除
|
||||||
Set<String> delSet = eBomToPBom.getVirtualPackageCompositionResult().stream().map(u -> StrUtil.join("-", u.getVirtualPackageMaterialNo(), u.getParentMaterialNo())).collect(Collectors.toSet());
|
// Set<String> delSet = eBomToPBom.getVirtualPackageCompositionResult().stream().map(u -> StrUtil.join("-", u.getVirtualPackageMaterialNo(), u.getParentMaterialNo())).collect(Collectors.toSet());
|
||||||
for (String s : delSet) {
|
// for (String s : delSet) {
|
||||||
String[] split = StrUtil.split(s, "-");
|
// String[] split = StrUtil.split(s, "-");
|
||||||
virtualPackageCompositionService.getBaseMapper().delByVnoAndParentNo(split[0], split[1]);
|
// virtualPackageCompositionService.getBaseMapper().delByVnoAndParentNo(split[0], split[1]);
|
||||||
}
|
// }
|
||||||
virtualPackageCompositionService.saveOrUpdateBatch(eBomToPBom.getVirtualPackageCompositionResult());
|
// virtualPackageCompositionService.saveOrUpdateBatch(eBomToPBom.getVirtualPackageCompositionResult());
|
||||||
} else {
|
// }
|
||||||
//记录变更影响
|
// else {
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeResult())) {
|
// //记录变更影响
|
||||||
|
// if (CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeResult())) {
|
||||||
List<String> vNos = eBomToPBom.getUpgradeChangeResult().stream().map(u -> StrUtil.join(u.getMaterialNo(), u.getRelMaterialNo())).collect(Collectors.toList());
|
//
|
||||||
if (CollUtil.isNotEmpty(vNos)) {
|
// List<String> vNos = eBomToPBom.getUpgradeChangeResult().stream().map(u -> StrUtil.join(u.getMaterialNo(), u.getRelMaterialNo())).collect(Collectors.toList());
|
||||||
upgradeChangeService.getBaseMapper().delByVNo(vNos);
|
// if (CollUtil.isNotEmpty(vNos)) {
|
||||||
}
|
// upgradeChangeService.getBaseMapper().delByVNo(vNos);
|
||||||
upgradeChangeService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeResult());
|
// }
|
||||||
}
|
// upgradeChangeService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeResult());
|
||||||
if (CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeDetailResult())) {
|
// }
|
||||||
|
// if (CollUtil.isNotEmpty(eBomToPBom.getUpgradeChangeDetailResult())) {
|
||||||
//先删除
|
//
|
||||||
Set<String> delSet = eBomToPBom.getUpgradeChangeDetailResult().stream().map(u -> StrUtil.join("-", u.getVirtualPackageMaterialNo(), u.getParentMaterialNo())).collect(Collectors.toSet());
|
// //先删除
|
||||||
for (String s : delSet) {
|
// Set<String> delSet = eBomToPBom.getUpgradeChangeDetailResult().stream().map(u -> StrUtil.join("-", u.getVirtualPackageMaterialNo(), u.getParentMaterialNo())).collect(Collectors.toSet());
|
||||||
String[] split = StrUtil.split(s, "-");
|
// for (String s : delSet) {
|
||||||
updateDetailService.getBaseMapper().delByVnoAndParentNo(split[0], split[1]);
|
// String[] split = StrUtil.split(s, "-");
|
||||||
}
|
// updateDetailService.getBaseMapper().delByVnoAndParentNo(split[0], split[1]);
|
||||||
updateDetailService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeDetailResult());
|
// }
|
||||||
}
|
// updateDetailService.saveOrUpdateBatch(eBomToPBom.getUpgradeChangeDetailResult());
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
List<Long> bomRowIds = bomTree.stream().filter(u -> u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
|
List<Long> bomRowIds = bomTree.stream().filter(u -> u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(bomRowIds)) {
|
if (CollUtil.isNotEmpty(bomRowIds)) {
|
||||||
this.getBaseMapper().updateStateBatchByRowIds(EBomStatusEnum.PUBLISHED.getValue(), bomRowIds);
|
this.getBaseMapper().updateStateBatchByRowIds(EBomStatusEnum.PUBLISHED.getValue(), bomRowIds);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue