|  |  |  | @ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.date.DateUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.io.FileUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.thread.ThreadUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.ObjectUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.XmlUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.alibaba.fastjson.JSONObject; | 
			
		
	
	
		
			
				
					|  |  |  | @ -39,6 +40,7 @@ import com.glxp.api.service.basic.ProductInfoService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.basic.UdiProductService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.sync.SyncDataSetService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.HttpClient; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.StringUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.alihealth.AlihealthUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.alihealth.AlihealthYljgUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.udi.FilterUdiUtils; | 
			
		
	
	
		
			
				
					|  |  |  | @ -394,11 +396,14 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode | 
			
		
	
		
			
				
					|  |  |  |  |                     return; | 
			
		
	
		
			
				
					|  |  |  |  |                 List<RelCodeBatch> navList = this.list(new LambdaQueryWrapper<RelCodeBatch>() | 
			
		
	
		
			
				
					|  |  |  |  |                         .eq(RelCodeBatch::getCurCode, parentCode)); | 
			
		
	
		
			
				
					|  |  |  |  | //            codeTempEntity.getSupId()
 | 
			
		
	
		
			
				
					|  |  |  |  |                 //todo  if(navList)是空的  1.查供应商key;2:根据parentCode查阿里接口;3:根据返回结果,再次查询
 | 
			
		
	
		
			
				
					|  |  |  |  |                 if (navList == null || navList.size() == 0) { | 
			
		
	
		
			
				
					|  |  |  |  |                     CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(codeTempEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                     if(ObjectUtil.isNotNull(customerInfoEntity) | 
			
		
	
		
			
				
					|  |  |  |  |                             && StringUtils.isNotEmpty(customerInfoEntity.getAppKey()) | 
			
		
	
		
			
				
					|  |  |  |  |                             && StringUtils.isNotEmpty(customerInfoEntity.getAppSecret()) | 
			
		
	
		
			
				
					|  |  |  |  |                             && StringUtils.isNotEmpty(customerInfoEntity.getRefEntId()) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     ){ | 
			
		
	
		
			
				
					|  |  |  |  |                         AlihealthRelCodeInsertReqeust alihealthRelCodeInsertReqeust = new AlihealthRelCodeInsertReqeust(); | 
			
		
	
		
			
				
					|  |  |  |  |                         alihealthRelCodeInsertReqeust.setAppKey(customerInfoEntity.getAppKey()); | 
			
		
	
		
			
				
					|  |  |  |  |                         alihealthRelCodeInsertReqeust.setAppSecret(customerInfoEntity.getAppSecret()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -418,7 +423,6 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeBatch.setCreateUser(alihealthRelCodeInsertReqeust.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeBatch.setCreateTime(new Date()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeBatchService.save(relCodeBatch); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             } else { | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeBatchService.update(relCodeBatch, new QueryWrapper<RelCodeBatch>().eq("productCode", relCodeBatch.getProductCode())); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
	
		
			
				
					|  |  |  | @ -431,7 +435,6 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode | 
			
		
	
		
			
				
					|  |  |  |  |                                     curCodeList.add(relCodeDetail.getCurCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 } | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeDetailService.remove(new QueryWrapper<RelCodeDetail>().in("curCode", curCodeList)); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                                 relCodeDetailService.saveBatch(list); | 
			
		
	
		
			
				
					|  |  |  |  |                             } | 
			
		
	
		
			
				
					|  |  |  |  |                             // 插入成功就重新查询一下
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -442,6 +445,7 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |                 if ((udiProductEntity != null && "1".equals(udiProductEntity.getPackLevel())) | 
			
		
	
		
			
				
					|  |  |  |  |                         || (CollUtil.isNotEmpty(navList)) | 
			
		
	
		
			
				
					|  |  |  |  |                 ) { | 
			
		
	
	
		
			
				
					|  |  |  | 
 |