From 04e7942d04e3f5aa28a74359437527de1039b464 Mon Sep 17 00:00:00 2001 From: yxw Date: Fri, 20 Sep 2024 12:56:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=81=E7=89=87=E5=8E=9F=E6=9D=90=E6=96=99?= =?UTF-8?q?=E9=98=B2=E9=94=99=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/controller/busi/MesCutRawErrorProofingController.java | 5 +++++ .../apiservice/serviceimpl/busi/MesCutRawErrorProofingService.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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());