feat: 生成虚拟包前进行异常检查,有异常时不能生成虚拟包
This commit is contained in:
parent
6423a67ebe
commit
4fb0a338de
|
|
@ -71,6 +71,12 @@ public class BomNewEbomGenerateVirtualPackageServiceFor31Impl implements IBomNew
|
|||
BomNewEbomParentEntity root = ebomParentService.getById(query.getParentRowId());
|
||||
VUtils.isTure(Objects.isNull(root)).throwMessage("无效的数据");
|
||||
|
||||
//异常检查
|
||||
ebomParentService.batchCheckAndSaveEBomException(Collections.singletonList(root.getRowId()));
|
||||
|
||||
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue())
|
||||
&& !Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()))
|
||||
.throwMessage("请先解决异常再生成发货包");
|
||||
VUtils.isTure(root.getMaterialNo().startsWith("21")).throwMessage("21编码接口调用错误");
|
||||
VUtils.isTure(!root.getMaterialNo().startsWith("31")).throwMessage("该编码的物料不能生成发货包:" + root.getMaterialNo());
|
||||
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
// VUtils.isTure(root.getVirtrualPackageEnum() > 0).throwMessage("已生成过虚拟包,不能2次生成");
|
||||
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue())
|
||||
&& !Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()))
|
||||
.throwMessage("异常状态下不允许生成虚拟包");
|
||||
.throwMessage("请先解决异常再生成发货包");
|
||||
LogRecordContext.putVariable("gvbom", root);
|
||||
|
||||
BomNewEbomParentVO parent = Convert.convert(BomNewEbomParentVO.class, root);
|
||||
|
|
|
|||
Loading…
Reference in New Issue