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());