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) {