|  |  | @ -14,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.enums.SqlLike; |  |  |  | import com.baomidou.mybatisplus.core.enums.SqlLike; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; |  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.baomidou.mybatisplus.core.toolkit.StringUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.mipsdl.client.CommonHttpClient; |  |  |  | import com.glxp.mipsdl.client.CommonHttpClient; | 
			
		
	
	
		
		
			
				
					|  |  | @ -280,11 +281,12 @@ public class CtqyyClient extends CommonHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |             IPage<VYpzsPhysicDict> page = vYpzsPhysicDictMapper.selectPage(new Page<VYpzsPhysicDict>(udiwmsProductRequest.getPage(), udiwmsProductRequest.getLimit()), wrapper); |  |  |  |             IPage<VYpzsPhysicDict> page = vYpzsPhysicDictMapper.selectPage(new Page<VYpzsPhysicDict>(udiwmsProductRequest.getPage(), udiwmsProductRequest.getLimit()), wrapper); | 
			
		
	
		
		
			
				
					
					|  |  |  |             List<VYpzsPhysicDict> physicDictEntities = page.getRecords(); |  |  |  |             List<VYpzsPhysicDict> physicDictEntities = page.getRecords(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             List<ThrProductsEntity> thrProductsEntityList = null; |  |  |  |             List<ThrProductsEntity> thrProductsEntityList = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             List<ThrProductsEntity> listNew = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (CollUtil.isNotEmpty(physicDictEntities)) { |  |  |  |             if (CollUtil.isNotEmpty(physicDictEntities)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 //数据处理以thr_products 返回
 |  |  |  |                 //数据处理以thr_products 返回
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 thrProductsEntityList = physicDictEntities.stream().map(dict -> { |  |  |  |                 thrProductsEntityList = physicDictEntities.stream().map(dict -> { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ThrProductsEntity products = new ThrProductsEntity(); |  |  |  |                     ThrProductsEntity products = new ThrProductsEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     products.setCode(dict.getPHYSIC_CODE()); |  |  |  |                     products.setCode(dict.getPHYSIC_SPEC()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     products.setName(dict.getPHYSIC_NAME()); |  |  |  |                     products.setName(dict.getPHYSIC_NAME()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     products.setMeasname(dict.getPACK_UNIT()); |  |  |  |                     products.setMeasname(dict.getPACK_UNIT()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     products.setSpec(dict.getPACK_SPEC()); |  |  |  |                     products.setSpec(dict.getPACK_SPEC()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -297,7 +299,16 @@ public class CtqyyClient extends CommonHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     return products; |  |  |  |                     return products; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }).collect(Collectors.toList()); |  |  |  |                 }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 thrProductsDao.batchInsert(thrProductsEntityList); |  |  |  |                 thrProductsDao.batchInsert(thrProductsEntityList); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 thrProductsEntityList = thrProductsEntityList.stream() |  |  |  |                 listNew = new ArrayList(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 // 删除医保编码数据为空的数据
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 for (ThrProductsEntity thrProductsEntity : thrProductsEntityList) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if(StringUtils.isNotBlank(thrProductsEntity.getYbbm())){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         listNew.add(thrProductsEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 listNew = listNew.stream() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .collect(Collectors.groupingBy(ThrProductsEntity::getYbbm, |  |  |  |                         .collect(Collectors.groupingBy(ThrProductsEntity::getYbbm, | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 LinkedHashMap::new, |  |  |  |                                 LinkedHashMap::new, | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 Collectors.collectingAndThen(Collectors.toList(), list -> list.get(0)))) |  |  |  |                                 Collectors.collectingAndThen(Collectors.toList(), list -> list.get(0)))) | 
			
		
	
	
		
		
			
				
					|  |  | @ -306,14 +317,14 @@ public class CtqyyClient extends CommonHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         .collect(Collectors.toList()); |  |  |  |                         .collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             for (ThrProductsEntity entity : thrProductsEntityList) { |  |  |  |             for (ThrProductsEntity entity : listNew) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 entity.setId(null); |  |  |  |                 entity.setId(null); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 entity.setRemark(entity.getCode()); |  |  |  |                 entity.setRemark(entity.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 entity.setCode(entity.getYbbm()); |  |  |  |                 entity.setCode(entity.getYbbm()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             PageSimpleResponse<ThrProductsEntity> pageSimpleResponse = new PageSimpleResponse<>(); |  |  |  |             PageSimpleResponse<ThrProductsEntity> pageSimpleResponse = new PageSimpleResponse<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             pageSimpleResponse.setTotal(page.getTotal()); |  |  |  |             pageSimpleResponse.setTotal(page.getTotal()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             pageSimpleResponse.setList(thrProductsEntityList); |  |  |  |             pageSimpleResponse.setList(listNew); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.success(pageSimpleResponse); |  |  |  |             return ResultVOUtils.success(pageSimpleResponse); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         log.error("解析长泰区医院医疗类型,返回结果:{}", udiwmsProductRequest.getProductType()); |  |  |  |         log.error("解析长泰区医院医疗类型,返回结果:{}", udiwmsProductRequest.getProductType()); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |