From e33e19ec997f51145fec823ff72f3300a483a75c Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Mon, 1 Jul 2024 17:47:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=200701-=E6=98=AF=E5=90=A6=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=89=AB=E7=A0=81=E5=89=8D=E5=88=A4=E6=96=AD=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E6=98=AF=E5=90=A6=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoCodeTempController.java | 9 ++++++--- .../inout/IoOrderDetailBizController.java | 19 +++++++++++-------- .../impl/IoOrderDetailBizServiceImpl.java | 3 +++ 3 files changed, 20 insertions(+), 11 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 783557171..26d9264c8 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -407,9 +407,10 @@ public class IoCodeTempController extends BaseController { // return ResultVOUtils.error(500, "单据只允许录入不需要扫码耗材" + ",请检查后重试!"); // } // } - //是否校验耗材材质 1:高值耗材;2.普通耗材 - if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { - } + if (bussinessTypeEntity != null) { + //是否校验耗材材质 1:高值耗材;2.普通耗材 + if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { + } if (IntUtil.value(udiInfoEntity.getHcType()) != 1) { return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); } @@ -418,6 +419,8 @@ public class IoCodeTempController extends BaseController { return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); } } + } + String orderId = addOrderRequest.getBillNo(); 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 08277c3c6..b3e8191c5 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -231,17 +231,20 @@ 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 (bussinessTypeEntity != null){ + //是否校验耗材材质 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 91ca2958e..53ee58909 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 @@ -302,6 +302,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { // } // } + if (bussinessTypeEntity != null){ //是否校验耗材材质 1:高值耗材;2.普通耗材 if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) { if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) { @@ -312,6 +313,8 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { throw new JsonException("单据只允许录入普通耗材\" + \",请检查后重试!"); } } + } + if (udiRelevanceResponse.getPurType() == 2) {