From bb7cdfa80bc94b9cf6ee12d78e659f6868583177 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Tue, 4 Jun 2024 14:32:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=200604=E5=A2=9E=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E9=9C=80=E8=A6=81=E6=89=AB=E7=A0=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoCodeTempController.java | 18 +++++++++-------- .../inout/IoOrderDetailBizController.java | 20 ++++++++++--------- .../impl/IoOrderDetailBizServiceImpl.java | 20 +++++++++++-------- 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index 3566da28a..1d8e06220 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -398,14 +398,16 @@ public class IoCodeTempController extends BaseController { } } - //是否校验耗材材质 1:高值耗材;2.普通耗材 - if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { - if (IntUtil.value(udiInfoEntity.getHcType()) != 1) { - return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); - } - } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { - if (IntUtil.value(udiInfoEntity.getHcType()) != 2) { - return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); + if (udiInfoEntity.getRequireScanCode() == 1){ + //是否校验耗材材质 1:高值耗材;2.普通耗材 + if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { + if (IntUtil.value(udiInfoEntity.getHcType()) != 1) { + return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); + } + } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { + if (IntUtil.value(udiInfoEntity.getHcType()) != 2) { + return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); + } } } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 996c36249..7cf18ec3f 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -219,17 +219,19 @@ public class IoOrderDetailBizController extends BaseController { } } - - //是否校验耗材材质 1:高值耗材;2.普通耗材 - if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { - if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) { - return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); - } - } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { - if (IntUtil.value(udiRelevanceResponse.getHcType()) != 2) { - return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); + if (udiRelevanceResponse.getRequireScanCode() == 1) { + //是否校验耗材材质 1:高值耗材;2.普通耗材 + if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { + if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) { + return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); + } + } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { + if (IntUtil.value(udiRelevanceResponse.getHcType()) != 2) { + return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); + } } } + // todo 查询产品是否已经通过认证 // BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); // if (bussinessTypeEntity.getCheckCertExpire() == 2 && udiRelevanceResponse.isNeedCert()) { diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index 43cc04ab9..f37f4e867 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -289,17 +289,21 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { throw new JsonException("单据只允许录入" + msg + ",当前录入产品为" + msg2 + ",请检查后重试!"); } } - //是否校验耗材材质 1:高值耗材;2.普通耗材 - if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { - if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) { - throw new JsonException("单据只允许录入高值耗材" + ",请检查后重试!"); - } - } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { - if (IntUtil.value(udiRelevanceResponse.getHcType()) != 2) { - throw new JsonException("单据只允许录入普通耗材\" + \",请检查后重试!"); + + if (udiRelevanceResponse.getRequireScanCode() == 1){ + //是否校验耗材材质 1:高值耗材;2.普通耗材 + if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { + if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) { + throw new JsonException("单据只允许录入高值耗材" + ",请检查后重试!"); + } + } else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) { + if (IntUtil.value(udiRelevanceResponse.getHcType()) != 2) { + throw new JsonException("单据只允许录入普通耗材\" + \",请检查后重试!"); + } } } + if (udiRelevanceResponse.getPurType() == 2) { if (StrUtil.isEmpty(item.getZczbhhzbapzbh())) { throw new JsonException("预验收产品必须填写预验收批次号");