From f205478b888c5d4902bff7776d78c9824cc03c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LML=E4=B8=B6?= Date: Sat, 18 May 2024 14:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/controller/busi/spot/MesSpotCheckOrderController.java | 5 ++++- .../pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/spot/MesSpotCheckOrderController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/spot/MesSpotCheckOrderController.java index 6ba1eb9..bc477e2 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/spot/MesSpotCheckOrderController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/spot/MesSpotCheckOrderController.java @@ -70,7 +70,10 @@ public class MesSpotCheckOrderController { if (StringUtils.isEmpty(model.getProduceSn())) { throw new ImppBusiException("扫描条码不能为空"); } - return ResultBean.success("查询成功").setResultList(spotCheckOrderService.scanProduceSn(model, AuthUtil.getOrganizeCode())); + if (CollectionUtils.isEmpty(model.getOrderPartList())) { + throw new ImppBusiException("点检明细零件不能为空"); + } + return ResultBean.success("扫描产品条码成功").setResultList(spotCheckOrderService.scanProduceSn(model, AuthUtil.getOrganizeCode())); } catch (ImppBusiException imppException) { return ResultBean.fail(imppException); } catch (Exception e) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java index f898a37..e499cf0 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java @@ -89,7 +89,7 @@ public class MesSpotCheckOrderService implements IMesSpotCheckOrderService { } } - if (flg) { + if (!flg) { throw new ImppBusiException(String.format("扫描的条码【%s】对应的物料号【%s】在点检单中不存在", produceSn.getProductSn(), produceSn.getPartNo())); }