From b47d12d0a927b2aab43a6c0f6458a9de7748a7b9 Mon Sep 17 00:00:00 2001 From: zpl Date: Fri, 15 Oct 2021 10:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=93=8D=E4=BD=9C=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=97=B6=EF=BC=8C=E5=88=A4=E8=AF=BB=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=B7=A5=E6=97=B6=E6=98=AF=E5=90=A6=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/service/impl/PodTemplateServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index ba3ba163..c5c99084 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -38,6 +38,7 @@ import com.foreverwin.mesnac.production.service.PodTemplateService; import com.foreverwin.mesnac.production.service.SfcCrossService; import com.foreverwin.mesnac.production.service.SfcHoldLogService; import com.foreverwin.modular.core.exception.BaseException; +import com.foreverwin.modular.core.exception.BusinessException; import com.foreverwin.modular.core.meext.MEServices; import com.foreverwin.modular.core.util.CommonMethods; import com.sap.me.production.AssembleComponentsRequest; @@ -356,6 +357,9 @@ public class PodTemplateServiceImpl implements PodTemplateService { SfcDispatchDto sfcdispatch = new SfcDispatchDto(); sfcdispatch.setHandle(HandleEnum.SFC_DISPATCH.getHandle(site, dispatchNo)); sfcdispatch = sfcDispatchCommonService.findSfcDispatchBySfc(sfcdispatch); + if (sfcdispatch.getProdHours() == null){ + throw BusinessException.build("产品条码["+ sfcdispatch.getSfc() +"]的标准工时为空,无法报工!"); + } sendErp(sfc, stepId, qty, BigDecimal.ZERO, qty.multiply(sfcdispatch.getProdHours())); } } catch (Exception e) {