问题修复
This commit is contained in:
parent
d4803fdfb4
commit
37c720c3fc
|
|
@ -124,7 +124,7 @@ public class EbomApi extends BaseApi {
|
||||||
@ApiOperation("生成虚拟包")
|
@ApiOperation("生成虚拟包")
|
||||||
@LogRecord(success = "生成虚拟包:物料编码:{{#gvbom.materialNo}} 版本:{{#gvbom.currentVersion}},操作结果:{{#_ret}}",
|
@LogRecord(success = "生成虚拟包:物料编码:{{#gvbom.materialNo}} 版本:{{#gvbom.currentVersion}},操作结果:{{#_ret}}",
|
||||||
bizNo = "{{#paramDto.bomRowId}}", type = "生成虚拟包")
|
bizNo = "{{#paramDto.bomRowId}}", type = "生成虚拟包")
|
||||||
public ResultVO<Boolean> generateVirtualPackage(@RequestBody VirtualPackageParamDto paramDto) {
|
public ResultVO<Boolean> generateVirtualPackage(@RequestBody VirtualPackageParamDto paramDto) throws IOException {
|
||||||
VUtils.isTure(CollUtil.isEmpty(paramDto.getVirtualPackageValue())).throwMessage("请选择要生成的虚拟包");
|
VUtils.isTure(CollUtil.isEmpty(paramDto.getVirtualPackageValue())).throwMessage("请选择要生成的虚拟包");
|
||||||
|
|
||||||
//检查-是否已
|
//检查-是否已
|
||||||
|
|
|
||||||
|
|
@ -644,8 +644,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
* @param paramDto
|
* @param paramDto
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void generateVirtualPackage(VirtualPackageParamDto paramDto) {
|
public void generateVirtualPackage(VirtualPackageParamDto paramDto) throws IOException {
|
||||||
try {
|
// try {
|
||||||
BomNewEbomParentEntity root = this.getById(paramDto.getBomRowId());
|
BomNewEbomParentEntity root = this.getById(paramDto.getBomRowId());
|
||||||
VUtils.isTure(Objects.isNull(root)).throwMessage("Bom不存在");
|
VUtils.isTure(Objects.isNull(root)).throwMessage("Bom不存在");
|
||||||
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()))
|
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()))
|
||||||
|
|
@ -678,9 +678,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
// } catch (Exception ex) {
|
||||||
throw new NflgBusinessException(STATE.BusinessError, ex.getMessage());
|
// throw new NflgBusinessException(STATE.BusinessError, ex.getMessage());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -595,7 +595,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BomNewPbomParentVO> getAllocationFactoryBomTree(AllocationFactoryBomQuery param) throws ExecutionException, InterruptedException {
|
public List<BomNewPbomParentVO> getAllocationFactoryBomTree(AllocationFactoryBomQuery param) throws ExecutionException, InterruptedException {
|
||||||
List<BomNewPbomParentVO> allBom = getAllBom(param.getBomRowId(), 0);
|
List<BomNewPbomParentVO> allBom = getAllBom(param.getBomRowId(), 1);
|
||||||
materialMainService.intiMaterialInfo(allBom, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
materialMainService.intiMaterialInfo(allBom, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
return CTreePBomUtils.toTree(param.getBomRowId(), allBom, BomNewPbomParentVO::getParentRowId, BomNewPbomParentVO::getBomRowId);
|
return CTreePBomUtils.toTree(param.getBomRowId(), allBom, BomNewPbomParentVO::getParentRowId, BomNewPbomParentVO::getBomRowId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class VirtualPackageFor21 extends VirtualPackageBase {
|
||||||
|
|
||||||
|
|
||||||
BomNewEbomParentEntity makingPackage=null;
|
BomNewEbomParentEntity makingPackage=null;
|
||||||
if((parent.getVirtrualPackageEnum()| VirtualPackageTypeEnum.MAKING_PACKAGE.getValue())!=VirtualPackageTypeEnum.MAKING_PACKAGE.getValue()) {
|
if((parent.getVirtrualPackageEnum()& VirtualPackageTypeEnum.MAKING_PACKAGE.getValue())!=VirtualPackageTypeEnum.MAKING_PACKAGE.getValue()) {
|
||||||
//构建构建发货包下制作包
|
//构建构建发货包下制作包
|
||||||
makingPackage = buildParentVirtualPackage( parent.getRowId(), VirtualPackageTypeEnum.MAKING_PACKAGE,"001");
|
makingPackage = buildParentVirtualPackage( parent.getRowId(), VirtualPackageTypeEnum.MAKING_PACKAGE,"001");
|
||||||
//构建构建发货包下直发
|
//构建构建发货包下直发
|
||||||
|
|
@ -69,6 +69,7 @@ public class VirtualPackageFor21 extends VirtualPackageBase {
|
||||||
}
|
}
|
||||||
List<BomNewEbomParentVO> child = getChild();
|
List<BomNewEbomParentVO> child = getChild();
|
||||||
//将产品子级放制作包下
|
//将产品子级放制作包下
|
||||||
|
if(Objects.nonNull(makingPackage)) {
|
||||||
for (BomNewEbomParentVO item : child) {
|
for (BomNewEbomParentVO item : child) {
|
||||||
|
|
||||||
BomNewEbomChildEntity itemUp = new BomNewEbomChildEntity();
|
BomNewEbomChildEntity itemUp = new BomNewEbomChildEntity();
|
||||||
|
|
@ -77,6 +78,7 @@ public class VirtualPackageFor21 extends VirtualPackageBase {
|
||||||
this.childResult.add(itemUp);
|
this.childResult.add(itemUp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
parent.setVirtrualPackageEnum(virtualPackageValue.stream().collect(Collectors.summingInt(u->u)));
|
parent.setVirtrualPackageEnum(virtualPackageValue.stream().collect(Collectors.summingInt(u->u)));
|
||||||
parentResult.add(parent);
|
parentResult.add(parent);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue