bug修复

This commit is contained in:
luoliming 2024-01-10 22:48:41 +08:00
parent 0a08f2f208
commit 15fadbdd3a
2 changed files with 7 additions and 8 deletions

View File

@ -622,12 +622,6 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
*/
public boolean realesePbom(Long bomRowId) {
BomNewPbomParentEntity parent = this.getById(bomRowId);
VUtils.isTure(Objects.isNull(parent)).throwMessage("所选BOM-不存在");
if (parent.getMaterialNo().startsWith("31")) {
String orderNo = crmService.getOrderNo(parent.getMaterialNo());
parent.setOrderNo(orderNo);
}
try {
List<BomNewPbomParentVO> allBom = getAllBom(bomRowId, 0);
List<Long> bomRowIds = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
@ -635,7 +629,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
bomRowIds.add(bomRowId);
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);
//保存订单号
this.updateById(parent);
// this.updateById(parent);
} catch (Exception ex) {
throw new NflgBusinessException(STATE.BusinessError, "发布Pbom失败" + ex.getMessage());
}

View File

@ -41,6 +41,8 @@ public class CheckEBomException {
@Setter
List<Integer> unCheckExcept;
private Boolean checkWaring=false;
public static void checkMaterialNoInMain1(List<String> materialNos) {
// List<String> materialNos = dto.getDatas().stream().map(u -> u.getMaterialNo()).collect(Collectors.toList());
@ -66,6 +68,7 @@ public class CheckEBomException {
convert.setParentRowId(0L);
convert.setLevelNumber(BigDecimal.ZERO);
allBomDetail.add(convert);
checkWaring=true;
// allBomDetail = SpringUtil.getBean(BomNewEbomParentService.class).buildBomTreeContainSelf(bomRowId);
@ -177,7 +180,9 @@ public class CheckEBomException {
}
// checkCircularDependency(checkEBomExceptionDTOS);
//bom异常-黄色警号
initExceptionYellowWarn(allBomDetail);
if(checkWaring) {
initExceptionYellowWarn(allBomDetail);
}
}
/**