|  |  | @ -7,6 +7,7 @@ import cn.hutool.json.JSONUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.alibaba.fastjson.TypeReference; |  |  |  | import com.alibaba.fastjson.TypeReference; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.common.res.BaseResponse; |  |  |  | import com.glxp.api.common.res.BaseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.common.util.ResultVOUtils; |  |  |  | import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.auth.AuthAliUser; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.thrsys.*; |  |  |  | import com.glxp.api.entity.thrsys.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.exception.JsonException; |  |  |  | import com.glxp.api.exception.JsonException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.http.sync.SpGetHttpClient; |  |  |  | import com.glxp.api.http.sync.SpGetHttpClient; | 
			
		
	
	
		
		
			
				
					|  |  | @ -17,6 +18,7 @@ import com.glxp.api.req.thrsys.ThrInsDrugFeeRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.thrsys.ThrInsMaterialFeeRequest; |  |  |  | import com.glxp.api.req.thrsys.ThrInsMaterialFeeRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.PageSimpleResponse; |  |  |  | import com.glxp.api.res.PageSimpleResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.alihealth.AlihealthKytSinglerelationResponse; |  |  |  | import com.glxp.api.res.alihealth.AlihealthKytSinglerelationResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.service.auth.AuthAliUserService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.thrsys.*; |  |  |  | import com.glxp.api.service.thrsys.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.*; |  |  |  | import com.glxp.api.util.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import lombok.extern.slf4j.Slf4j; |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
	
		
		
			
				
					|  |  | @ -74,6 +76,8 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  |     YbDrugService ybDrugService; |  |  |  |     YbDrugService ybDrugService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     private SpGetHttpClient spGetHttpClient; |  |  |  |     private SpGetHttpClient spGetHttpClient; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     private AuthAliUserService authAliUserService; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public boolean isExit(String originUuid, String mainId, String thirdSys) { |  |  |  |     public boolean isExit(String originUuid, String mainId, String thirdSys) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -284,7 +288,7 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (thrProductsEntity.getYbbm() != null) { |  |  |  |         if (thrProductsEntity.getYbbm() != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             //判断药品还是器械
 |  |  |  |             //判断药品还是器械
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (thrProductsEntity.getProductType() == 2) { |  |  |  |             if (thrProductsEntity.getProductType() == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 String error=null; |  |  |  |                 String error = null; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 ThrInsDrugFeeRequest thrInsDrugFeeRequest = new ThrInsDrugFeeRequest(); |  |  |  |                 ThrInsDrugFeeRequest thrInsDrugFeeRequest = new ThrInsDrugFeeRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 thrInsDrugFeeRequest.setMedCatalogCode(thrProductsEntity.getYbbm()); |  |  |  |                 thrInsDrugFeeRequest.setMedCatalogCode(thrProductsEntity.getYbbm()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 YbDrugDetailFilterRequest ybHcflDetailFilterRequest = new YbDrugDetailFilterRequest(); |  |  |  |                 YbDrugDetailFilterRequest ybHcflDetailFilterRequest = new YbDrugDetailFilterRequest(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -296,7 +300,7 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 UdiProductEntity udiProductEntity = new UdiProductEntity(); |  |  |  |                 UdiProductEntity udiProductEntity = new UdiProductEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 BeanUtils.copyProperties(thrProductsEntity, udiProductEntity); |  |  |  |                 BeanUtils.copyProperties(thrProductsEntity, udiProductEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 YbDrug ybDrug=new YbDrug(); |  |  |  |                 YbDrug ybDrug = new YbDrug(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // 数据处理
 |  |  |  |                 // 数据处理
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 udiProductEntity.setId(IdUtil.getSnowflakeNextId()); |  |  |  |                 udiProductEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -323,8 +327,8 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (list != null && list.size() > 0) { |  |  |  |                 if (list != null && list.size() > 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ybDrug = list.get(0); |  |  |  |                     ybDrug = list.get(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     // 数据做处理好查询阿里接口
 |  |  |  |                     // 数据做处理好查询阿里接口
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if(ybDrug.getApprovalCode().contains("(")){ |  |  |  |                     if (ybDrug.getApprovalCode().contains("(")) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         String[] charArr  = ybDrug.getRegisteredProductName().split("\\("); |  |  |  |                         String[] charArr = ybDrug.getRegisteredProductName().split("\\("); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         ybDrug.setApprovalCode(charArr[0]); |  |  |  |                         ybDrug.setApprovalCode(charArr[0]); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -353,7 +357,6 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } else { |  |  |  |                 } else { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 List<ThirdAliDrug> thirdAliDrugList = thirdAliDrugService.list( |  |  |  |                 List<ThirdAliDrug> thirdAliDrugList = thirdAliDrugService.list( | 
			
		
	
		
		
			
				
					
					|  |  |  |                         new QueryWrapper<ThirdAliDrug>() |  |  |  |                         new QueryWrapper<ThirdAliDrug>() | 
			
		
	
	
		
		
			
				
					|  |  | @ -363,103 +366,112 @@ public class UdiContrastService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (CollUtil.isNotEmpty(thirdAliDrugList)) { |  |  |  |                 if (CollUtil.isNotEmpty(thirdAliDrugList)) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } else { |  |  |  |                 } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     AuthAliUser authAliUser = authAliUserService.getOne(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     AlihealthThirdAliDrugInsertReqeust alihealthThirdAliDrugInsertReqeust = new AlihealthThirdAliDrugInsertReqeust(); |  |  |  |                     AlihealthThirdAliDrugInsertReqeust alihealthThirdAliDrugInsertReqeust = new AlihealthThirdAliDrugInsertReqeust(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthThirdAliDrugInsertReqeust.setErpId("73157692795424"); |  |  |  |                     alihealthThirdAliDrugInsertReqeust.setErpId(authAliUser.getErpid()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthThirdAliDrugInsertReqeust.setAppSecret("5231c601505706a9d49823c3dfe2cb01"); |  |  |  |                     alihealthThirdAliDrugInsertReqeust.setAppSecret(authAliUser.getAppsecret()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust(); |  |  |  |                     AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setPhysic_name(udiProductEntity.getCpmctymc()); |  |  |  |                     alihealthKytDrugrescodeReqeust.setPhysic_name(udiProductEntity.getCpmctymc()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setApproval_licence_no(udiProductEntity.getZczbhhzbapzbh()); |  |  |  |                     alihealthKytDrugrescodeReqeust.setApproval_licence_no(udiProductEntity.getZczbhhzbapzbh()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setPage_size(100); |  |  |  |                     alihealthKytDrugrescodeReqeust.setPage_size(100); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setPage(1); |  |  |  |                     alihealthKytDrugrescodeReqeust.setPage(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setApp_key("31721223"); |  |  |  |                     alihealthKytDrugrescodeReqeust.setApp_key(authAliUser.getAppkey()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     alihealthKytDrugrescodeReqeust.setRef_ent_id("ef99b78bd9c54c1284f813149c858fb0"); |  |  |  |                     alihealthKytDrugrescodeReqeust.setRef_ent_id(authAliUser.getRefentid()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     alihealthThirdAliDrugInsertReqeust.setAlihealthKytDrugrescodeReqeust(alihealthKytDrugrescodeReqeust); |  |  |  |                     alihealthThirdAliDrugInsertReqeust.setAlihealthKytDrugrescodeReqeust(alihealthKytDrugrescodeReqeust); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     BaseResponse baseResponse = spGetHttpClient.thirdAliDrugList(alihealthThirdAliDrugInsertReqeust); |  |  |  |                     try { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     if (baseResponse.getCode() == 20000) { |  |  |  |                         BaseResponse baseResponse = spGetHttpClient.thirdAliDrugList(alihealthThirdAliDrugInsertReqeust); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |                         if (baseResponse.getCode() == 20000) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         try { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             thirdAliDrugService.addOrUpdate((List) baseResponse.getData()); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             thirdAliDrugList = thirdAliDrugService.list( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     new QueryWrapper<ThirdAliDrug>() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                             .eq(StringUtils.isNotEmpty(udiProductEntity.getCpmctymc()), "cpmctymc", udiProductEntity.getCpmctymc()) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                             .eq(StringUtils.isNotEmpty(udiProductEntity.getZczbhhzbapzbh()), "approvalNum", udiProductEntity.getZczbhhzbapzbh()) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                         }catch (Exception e){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             log.info("供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage()); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                            udiProductEntity.setBasicPrductRemak8("供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage());
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                            error = "供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage();
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductService.insertUdiInfo(udiProductEntity); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             if (thirdAliDrugService.addOrUpdate((List) baseResponse.getData())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 thirdAliDrugList = thirdAliDrugService.list( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                         new QueryWrapper<ThirdAliDrug>() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                                 .eq(StringUtils.isNotEmpty(udiProductEntity.getCpmctymc()), "cpmctymc", udiProductEntity.getCpmctymc()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                                 .eq(StringUtils.isNotEmpty(udiProductEntity.getZczbhhzbapzbh()), "approvalNum", udiProductEntity.getZczbhhzbapzbh()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 log.info("供应商平台获取阿里和国家库码段信息===未查到产品信息"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 udiProductService.insertUdiInfo(udiProductEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } else { |  |  |  |                             } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         log.info("供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage()); |  |  |  | 
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             log.info("供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  | //                        udiProductEntity.setBasicPrductRemak8("供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage());
 |  |  |  | //                        udiProductEntity.setBasicPrductRemak8("供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage());
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                        error = "供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage();
 |  |  |  | //                        error = "供应商平台获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage();
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             udiProductService.insertUdiInfo(udiProductEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } catch (Exception e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         log.info("供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //                            udiProductEntity.setBasicPrductRemak8("供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage());
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //                            error = "供应商平台获取阿里和国家库码段信息出现错误===" + e.getMessage();
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductService.insertUdiInfo(udiProductEntity); |  |  |  |                         udiProductService.insertUdiInfo(udiProductEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for (int i = 0; i < thirdAliDrugList.size(); i++) { |  |  |  |                 for (int i = 0; i < thirdAliDrugList.size(); i++) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         ThirdAliDrug thirdAliDrug = thirdAliDrugList.get(i); |  |  |  |                     ThirdAliDrug thirdAliDrug = thirdAliDrugList.get(i); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         List<Integer> integers = new ArrayList<>(); |  |  |  |                     List<Integer> integers = new ArrayList<>(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         if (StrUtil.isNotEmpty(thirdAliDrug.getPackRatio())) { |  |  |  |                     if (StrUtil.isNotEmpty(thirdAliDrug.getPackRatio())) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             integers = DimaUtil.calculateLevels(thirdAliDrug.getPackRatio()); |  |  |  |                         integers = DimaUtil.calculateLevels(thirdAliDrug.getPackRatio()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                     } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPackLevel(thirdAliDrug.getPackLevel()); |  |  |  |                     udiProductEntity.setPackLevel(thirdAliDrug.getPackLevel()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         try { |  |  |  |                     try { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductEntity.setBhxjsl(integers.get(IntUtil.value(thirdAliDrug.getPackLevel()) - 1)); |  |  |  |                         udiProductEntity.setBhxjsl(integers.get(IntUtil.value(thirdAliDrug.getPackLevel()) - 1)); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } catch (IndexOutOfBoundsException e) { |  |  |  |                     } catch (IndexOutOfBoundsException e) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             e.printStackTrace(); |  |  |  |                         e.printStackTrace(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             Log.error("计算包装级别出错" + thirdAliDrug.getPackLevel() + "---" + integers + "-----" + thirdAliDrug.toString()); |  |  |  |                         Log.error("计算包装级别出错" + thirdAliDrug.getPackLevel() + "---" + integers + "-----" + thirdAliDrug.toString()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductEntity.setBhxjsl(0); |  |  |  |                         udiProductEntity.setBhxjsl(0); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                     } | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setNameCode(thirdAliDrug.getNameCode()); |  |  |  |                     udiProductEntity.setNameCode(thirdAliDrug.getNameCode()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         // 数据处理
 |  |  |  |                     // 数据处理
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPrepnSpec(thirdAliDrug.getFormSpec()); |  |  |  |                     udiProductEntity.setPrepnSpec(thirdAliDrug.getFormSpec()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setZczbhhzbapzbh(thirdAliDrug.getApprovalNum()); |  |  |  |                     udiProductEntity.setZczbhhzbapzbh(thirdAliDrug.getApprovalNum()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setCpmctymc(thirdAliDrug.getCpmctymc()); |  |  |  |                     udiProductEntity.setCpmctymc(thirdAliDrug.getCpmctymc()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setSpmc(thirdAliDrug.getSpmc()); |  |  |  |                     udiProductEntity.setSpmc(thirdAliDrug.getSpmc()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setBzgg(thirdAliDrug.getBzgg()); |  |  |  |                     udiProductEntity.setBzgg(thirdAliDrug.getBzgg()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | //                        udiProductEntity.setMatrial(ybDrug.getMaterialName());
 |  |  |  | //                        udiProductEntity.setMatrial(ybDrug.getMaterialName());
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                        udiProductEntity.setPackMatrial(ybDrug.getMaterialName());
 |  |  |  | //                        udiProductEntity.setPackMatrial(ybDrug.getMaterialName());
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //                        udiProductEntity.setMedicareType(setMedicareType(ybDrug.getProductInsuranceType()));
 |  |  |  | //                        udiProductEntity.setMedicareType(setMedicareType(ybDrug.getProductInsuranceType()));
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         //最小产品单位
 |  |  |  |                     //最小产品单位
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPackUnit(thirdAliDrug.getPackUnitName()); |  |  |  |                     udiProductEntity.setPackUnit(thirdAliDrug.getPackUnitName()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //设置最小产品数量
 |  |  |  |                     //设置最小产品数量
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | //                        udiProductEntity.setBhxjsl(ybDrug.getFactor());
 |  |  |  | //                        udiProductEntity.setBhxjsl(ybDrug.getFactor());
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         //设置包装级别
 |  |  |  |                     //设置包装级别
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPackLevel(1 + ""); |  |  |  |                     udiProductEntity.setPackLevel(1 + ""); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //生产厂家
 |  |  |  |                     //生产厂家
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setManufactory(thirdAliDrug.getManufacturer()); |  |  |  |                     udiProductEntity.setManufactory(thirdAliDrug.getManufacturer()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //商品条码 essentialDrugMarkName sptm
 |  |  |  |                     //商品条码 essentialDrugMarkName sptm
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | //                    udiProductEntity.setSptm(ybDrug.getBusinessLicense());
 |  |  |  | //                    udiProductEntity.setSptm(ybDrug.getBusinessLicense());
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPrepnUnit(thirdAliDrug.getPrepnUnitName()); |  |  |  |                     udiProductEntity.setPrepnUnit(thirdAliDrug.getPrepnUnitName()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         if (IntUtil.value(thirdAliDrug.getPackLevel()) == 1) { |  |  |  |                     if (IntUtil.value(thirdAliDrug.getPackLevel()) == 1) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductEntity.setXjdw(ybDrug.getMinUnit()); |  |  |  |                         udiProductEntity.setXjdw(ybDrug.getMinUnit()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             if (DimaUtil.trMinCount(thirdAliDrug.getBzgg()) != null) { |  |  |  |                         if (DimaUtil.trMinCount(thirdAliDrug.getBzgg()) != null) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 udiProductEntity.setBhxjsl(DimaUtil.trMinCount(thirdAliDrug.getBzgg())); |  |  |  |                             udiProductEntity.setBhxjsl(DimaUtil.trMinCount(thirdAliDrug.getBzgg())); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             } else |  |  |  |                         } else | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 udiProductEntity.setBhxjsl(ybDrug.getFactor()); |  |  |  |                             udiProductEntity.setBhxjsl(ybDrug.getFactor()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                     } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         if (thirdAliDrug.getPackLevel() != null && !thirdAliDrug.getPackLevel().equals("0")) { |  |  |  |                     if (thirdAliDrug.getPackLevel() != null && !thirdAliDrug.getPackLevel().equals("0")) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductEntity.setDiType(IntUtil.value(thirdAliDrug.getPackLevel()) == 1 ? 1 : 4); |  |  |  |                         udiProductEntity.setDiType(IntUtil.value(thirdAliDrug.getPackLevel()) == 1 ? 1 : 4); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } else { |  |  |  |                     } else { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                             udiProductEntity.setDiType(1); |  |  |  |                         udiProductEntity.setDiType(1); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                     } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setXjdw(thirdAliDrug.getPrepnUnitName()); |  |  |  |                     udiProductEntity.setXjdw(thirdAliDrug.getPrepnUnitName()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setPackUnit(thirdAliDrug.getPackUnitName()); |  |  |  |                     udiProductEntity.setPackUnit(thirdAliDrug.getPackUnitName()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductEntity.setId(IdUtil.getSnowflakeNextId()); |  |  |  |                     udiProductEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         udiProductService.insertUdiInfo(udiProductEntity); |  |  |  |                     udiProductService.insertUdiInfo(udiProductEntity); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  | //                setLevel(udiRelevanceEntity.getUuid());
 |  |  |  | //                setLevel(udiRelevanceEntity.getUuid());
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |