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) {