diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesCutRawErrorProofingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesCutRawErrorProofingService.java index 2037832..b4d70f5 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesCutRawErrorProofingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesCutRawErrorProofingService.java @@ -25,6 +25,7 @@ import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; @@ -200,6 +201,7 @@ public class MesCutRawErrorProofingService implements IMesCutRawErrorProofingSer DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(model.getSn(), MesPcnExtConstWords.SN, packBean); MesMaterialSn materialSnDb = materialSnRepository.getByProperty(packBean); + if(Objects.isNull(materialSnDb)) MesPcnException.throwMesBusiException("条码【%s】不存在", model.getSn()); MesCutUpdateRawLengthModel result = new MesCutUpdateRawLengthModel(); BeanUtils.copyProperties(materialSnDb, result); return result;