From 9ac650e1df8e292afe3de7cd79d26caeaf72cb5d Mon Sep 17 00:00:00 2001 From: qiuyt Date: Mon, 17 Feb 2025 15:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E6=AF=94=E4=BE=8B=E9=80=89?= =?UTF-8?q?=E5=85=A5=E5=92=8C=E7=BC=96=E8=BE=91=E7=A1=AE=E8=AE=A4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=AF=BC=E8=87=B4=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=20=E9=98=BF=E9=87=8C=E5=8D=95=E6=8D=AE=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=BC=80=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoOrderReviewController.java | 2 +- .../api/service/basic/UdiContrastService.java | 27 ++++++++++++------- .../basic/impl/UdiProductServiceImpl.java | 2 +- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java index 85c2417e..48ebcdb4 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java @@ -491,7 +491,7 @@ public class IoOrderReviewController extends BaseController { Set set = new HashSet<>(codeList); alihealthYljgUploadinoutbillReqeust.setTrace_codes(String.join(",", codeList)); // 单据上传先注释了 -// BaseResponse baseResponseUploadinoutbill = alihealthYljgUtils.yljgUploadinoutbill(alihealthYljgUploadinoutbillReqeust,orderEntity.getFromCorp()); + BaseResponse baseResponseUploadinoutbill = alihealthYljgUtils.yljgUploadinoutbill(alihealthYljgUploadinoutbillReqeust,orderEntity.getFromCorp()); log.error("要查询阿里关联关系的码===" + set); String erpId = orderEntity.getFromCorp(); for (String code : set) { diff --git a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java index 86aca5e2..1ae4637a 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiContrastService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiContrastService.java @@ -405,16 +405,7 @@ public class UdiContrastService { } - - /** - * 处理药品数据 - * - * @param thrProductsEntity - * @param ybDrug - * @param thirdAliDrugList - */ - public void disposeDrugData(BasicProductsCreateDto basicProductsCreateDto, ThrProductsEntity thrProductsEntity - , YbDrug ybDrug, List thirdAliDrugList,UdiRelevanceEntity udiRelevanceEntity) { + public UdiProductEntity disposeDrugDataNew(ThrProductsEntity thrProductsEntity,UdiRelevanceEntity udiRelevanceEntity, YbDrug ybDrug){ UdiProductEntity udiProductEntity = new UdiProductEntity(); BeanUtils.copyProperties(thrProductsEntity, udiProductEntity); // 数据处理 @@ -461,9 +452,23 @@ public class UdiContrastService { //商品条码 essentialDrugMarkName sptm // udiProductEntity.setSptm(ybDrug.getBusinessLicense()); udiProductEntity.setPrepnUnit(ybDrug.getRealityMedicinemodel()); + + return udiProductEntity; + } + /** + * 处理药品数据 + * + * @param thrProductsEntity + * @param ybDrug + * @param thirdAliDrugList + */ + public void disposeDrugData(BasicProductsCreateDto basicProductsCreateDto, ThrProductsEntity thrProductsEntity + , YbDrug ybDrug, List thirdAliDrugList,UdiRelevanceEntity udiRelevanceEntity) { if (thirdAliDrugList != null && thirdAliDrugList.size() > 0) { List codeRelArrayList = new ArrayList<>(); for (int i = 0; i < thirdAliDrugList.size(); i++) { + UdiProductEntity udiProductEntity = disposeDrugDataNew(thrProductsEntity,udiRelevanceEntity,ybDrug); + ThirdAliDrug thirdAliDrug = thirdAliDrugList.get(i); udiProductEntity.setNameCode(thirdAliDrug.getNameCode()); // 数据处理 @@ -548,6 +553,8 @@ public class UdiContrastService { } } else { + UdiProductEntity udiProductEntity = disposeDrugDataNew(thrProductsEntity,udiRelevanceEntity,ybDrug); + udiProductService.insertUdiInfo(udiProductEntity); } diff --git a/src/main/java/com/glxp/api/service/basic/impl/UdiProductServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/UdiProductServiceImpl.java index 21a4d4da..4268f993 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/UdiProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/UdiProductServiceImpl.java @@ -300,7 +300,7 @@ public class UdiProductServiceImpl implements UdiProductService { for (UdiProductEntity udiProductEntity : udiProductEntities) { addProductRequest.setNameCode(udiProductEntity.getNameCode()); addProductRequest.setId(udiProductEntity.getId()); - BeanUtils.copyProperties(addProductRequest, udiProductEntity); + BeanUtils.copyProperties(addProductRequest, udiProductEntity,"packRatio"); udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc()); udiProductEntity.setProductsType(2); udiProductEntity.setGgxh(addProductRequest.getSpec());