diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesCutRawErrorProofingController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesCutRawErrorProofingController.java index 8e06df8..3a221fa 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesCutRawErrorProofingController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesCutRawErrorProofingController.java @@ -8,6 +8,7 @@ import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.impp.framework.boot.exception.ImppBusiException; import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; import cn.estsh.impp.framework.boot.util.ResultBean; +import cn.estsh.impp.framework.boot.util.ValidatorBean; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; @@ -59,6 +60,10 @@ public class MesCutRawErrorProofingController { @ApiOperation(value = "查询条码长度") public ResultBean queryLengthByScanSn(MesCutRawErrorProofingModel model) { try { + + ValidatorBean.checkNotNull(model.getSn(), "查询条码不能为空"); + ValidatorBean.checkNotNull(model.getOrganizeCode(), "工厂代码不能为空"); + return ResultBean.success("查询成功").setResultObject(cutRawErrorProofingService.queryLengthBySn(model)); } catch (ImppBusiException imppException) { return ResultBean.fail(imppException); 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 898451a..2037832 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 @@ -216,7 +216,7 @@ public class MesCutRawErrorProofingService implements IMesCutRawErrorProofingSer if (materialSnDb == null) MesPcnException.throwMesBusiException("条码【%s】不存在", model.getSn()); - if (model.getSubLength() == null) MesPcnException.throwMesBusiException("条码【%s】为填减去长度", model.getSn()); + if (model.getSubLength() == null) MesPcnException.throwMesBusiException("条码【%s】未输入减去长度", model.getSn()); if (materialSnDb.getSurplusLength() < model.getSubLength()) MesPcnException.throwMesBusiException("条码【%s】减去长度【%s】大于剩余长度【%s】", model.getSn(), materialSnDb.getSurplusLength(), model.getSubLength());