From 7594fa138e776ecc68d1291fd32160b1bb061312 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Mon, 10 Jul 2023 15:30:54 +0800 Subject: [PATCH] =?UTF-8?q?ms=E4=B8=8A=E4=BC=A0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/inout/IoAddInoutService.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java index 1c22a971..bd698209 100644 --- a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java @@ -12,22 +12,17 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.Constant; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.dao.inout.IoOrderDetailCodeDao; -import com.glxp.api.entity.basic.BasicBussinessTypeEntity; -import com.glxp.api.entity.basic.BasicCorpEntity; -import com.glxp.api.entity.basic.UdiEntity; -import com.glxp.api.entity.basic.UdiRlSupEntity; +import com.glxp.api.entity.basic.*; import com.glxp.api.entity.inout.*; import com.glxp.api.entity.inv.InvProductDetailEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; +import com.glxp.api.exception.JsonException; import com.glxp.api.req.basic.FilterCompanyProductRelevanceRequest; import com.glxp.api.entity.inout.PdaCodeEntity; import com.glxp.api.req.inout.PostOrderRequest; import com.glxp.api.req.udims.PostUdimsOrderRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.service.basic.BasicCorpService; -import com.glxp.api.service.basic.IBasicBussinessTypeService; -import com.glxp.api.service.basic.UdiRelevanceService; -import com.glxp.api.service.basic.UdiRlSupService; +import com.glxp.api.service.basic.*; import com.glxp.api.service.inv.InvProductDetailService; import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.util.CustomUtil; @@ -36,6 +31,7 @@ import com.glxp.api.util.GennerOrderUtils; import com.glxp.api.util.OrderNoTypeBean; import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.UdiCalCountUtil; +import com.glxp.api.util.udi.UdiInfoUtil; import org.springframework.beans.BeanUtils; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @@ -702,6 +698,9 @@ public class IoAddInoutService { return ioOrderDetailCodeEntity; } + @Resource + private UdiProductService udiProductService; + /** * udims上传单据 @@ -745,6 +744,10 @@ public class IoAddInoutService { for (int index = 0; index < msCodeEntities.size(); index++) { IoCodeTempEntity codeEnttity = new IoCodeTempEntity(); BeanUtil.copyProperties(msCodeEntities.get(index), codeEnttity); + UdiProductEntity uuid = udiProductService.findByNameCode(codeEnttity.getNameCode()); + if (uuid==null){ + throw new JsonException(500,"未找到对应耗材字典"); + } codeEnttity.setAction(orderSaveRequest.getAction()); codeEnttity.setMainAction(orderSaveRequest.getMainAction()); codeEnttity.setDeptCode(orderSaveRequest.getDeptCode());