|  |  |  | @ -8,10 +8,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
			
		
	
		
			
				
					|  |  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.res.BaseResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.constant.ConstantStatus; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.basic.BasicProductsDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.basic.SupEvaluateDetailMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.basic.UdiProductDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.basic.UdiRelevanceDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.thrsys.ThirdAliDrugMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.thrsys.ThrProductsDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.basic.SupEvaluateDetailEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.basic.UdiEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.basic.UdiProductEntity; | 
			
		
	
	
		
			
				
					|  |  |  | @ -643,22 +648,30 @@ public class UdiProductService extends ServiceImpl<UdiProductDao, UdiProductEnti | 
			
		
	
		
			
				
					|  |  |  |  |     private YbDrugService ybDrugService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private UdiContrastService udiContrastService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private UdiRelevanceService udiRelevanceService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public void saveOrUpadateLevelDrugAli(ThirdAliDrugRequest thirdAliDrugRequest) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse saveOrUpadateLevelDrugAli(ThirdAliDrugRequest thirdAliDrugRequest) { | 
			
		
	
		
			
				
					|  |  |  |  |         Integer detailSort=0; | 
			
		
	
		
			
				
					|  |  |  |  |         ThirdAliDrug thirdAliDrugServiceOne = thirdAliDrugService.getOne( | 
			
		
	
		
			
				
					|  |  |  |  |                 new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrugRequest.getNameCodeRow()).last("limit 1") | 
			
		
	
		
			
				
					|  |  |  |  |         ); | 
			
		
	
		
			
				
					|  |  |  |  |         String str = ""; | 
			
		
	
		
			
				
					|  |  |  |  |         if (thirdAliDrugServiceOne != null) { | 
			
		
	
		
			
				
					|  |  |  |  |             List<ThirdAliDrug> thirdAliDrugList = thirdAliDrugService.list( | 
			
		
	
		
			
				
					|  |  |  |  |                     new QueryWrapper<ThirdAliDrug>().eq(org.apache.commons.lang3.StringUtils.isNotBlank( thirdAliDrugServiceOne.getBzgg()),"bzgg", thirdAliDrugServiceOne.getBzgg()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .eq(org.apache.commons.lang3.StringUtils.isNotBlank( thirdAliDrugServiceOne.getPackRatio()),"packRatio", thirdAliDrugServiceOne.getPackRatio()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .eq(org.apache.commons.lang3.StringUtils.isNotBlank( thirdAliDrugRequest.getCpmctymc()),"cpmctymc", thirdAliDrugRequest.getCpmctymc()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .eq(org.apache.commons.lang3.StringUtils.isNotBlank( thirdAliDrugRequest.getManufacturer()),"manufacturer", thirdAliDrugRequest.getManufacturer()) | 
			
		
	
		
			
				
					|  |  |  |  |                     new QueryWrapper<ThirdAliDrug>().eq(StringUtils.isNotBlank( thirdAliDrugServiceOne.getBzgg()),"bzgg", thirdAliDrugServiceOne.getBzgg()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .eq(StringUtils.isNotBlank( thirdAliDrugServiceOne.getPackRatio()),"packRatio", thirdAliDrugServiceOne.getPackRatio()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .like(StringUtils.isNotBlank( thirdAliDrugRequest.getCpmctymc()),"cpmctymc", thirdAliDrugRequest.getCpmctymc()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .like(StringUtils.isNotBlank( thirdAliDrugRequest.getManufacturer()),"manufacturer", thirdAliDrugRequest.getManufacturer()) | 
			
		
	
		
			
				
					|  |  |  |  |                             .eq(StringUtils.isNotBlank( thirdAliDrugRequest.getApprovalNum()),"approvalNum", thirdAliDrugRequest.getApprovalNum()) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             ); | 
			
		
	
		
			
				
					|  |  |  |  |             if (thirdAliDrugList != null && thirdAliDrugList.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                 udiProductDao.delete(new QueryWrapper<UdiProductEntity>() | 
			
		
	
		
			
				
					|  |  |  |  |                         .eq("uuid",thirdAliDrugRequest.getUuid()) | 
			
		
	
		
			
				
					|  |  |  |  |                         .isNull("nameCode") | 
			
		
	
		
			
				
					|  |  |  |  |                 ); | 
			
		
	
		
			
				
					|  |  |  |  |                 ThrProductsEntity thrProductsEntity = thrProductsService.selectByCode(thirdAliDrugRequest.getYbbm()); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (ThirdAliDrug thirdAliDrug : thirdAliDrugList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     ThrInsDrugFeeRequest thrInsDrugFeeRequest = new ThrInsDrugFeeRequest(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -783,11 +796,24 @@ public class UdiProductService extends ServiceImpl<UdiProductDao, UdiProductEnti | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                     udiProductService.insertUdiInfo(udiProductEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                 try { | 
			
		
	
		
			
				
					|  |  |  |  |                     udiRelevanceEntity.setDetailSort(Integer.valueOf(thirdAliDrugList.get(0).getPhysicDetailType())); | 
			
		
	
		
			
				
					|  |  |  |  |                     detailSort =  udiRelevanceEntity.getDetailSort(); | 
			
		
	
		
			
				
					|  |  |  |  |                 }catch (Exception e){ | 
			
		
	
		
			
				
					|  |  |  |  |                     log.error("明细分类转换出现错误"+e.getMessage()); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |                 udiRelevanceService.update(udiRelevanceEntity,new QueryWrapper<UdiRelevanceEntity>() | 
			
		
	
		
			
				
					|  |  |  |  |                         .eq("uuid",thirdAliDrugRequest.getUuid()) | 
			
		
	
		
			
				
					|  |  |  |  |                 ); | 
			
		
	
		
			
				
					|  |  |  |  |                 return ResultVOUtils.success(detailSort); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | //        }
 | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.error("获取错误"); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |