|  |  | @ -210,17 +210,19 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 		boolean sync = true; |  |  |  | 		boolean sync = true; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String[] tnames = t.split("/"); |  |  |  | 		String[] tnames = t.split("/"); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String lastUpdateTime = getUpdateTime(tnames[0]); |  |  |  | 		String lastUpdateTime = getUpdateTime(tnames[2]); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		Date nowUpdateTime = new Date(); |  |  |  | 		Date nowUpdateTime = new Date(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		if(!StringUtils.isEmpty(tnames[0])) { |  |  |  | 		if(!StringUtils.isEmpty(tnames[0])) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 			 |  |  |  | 			 | 
			
		
	
		
		
			
				
					
					|  |  |  | 			List<Map<String, String>> keyList = dbDao.listKeyMysql(tnames[2]); |  |  |  | 			List<Map<String, String>> keyList = dbDao.listKeyMysql(tnames[2]); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			String keyColumn = keyList!=null&&keyList.size()>0 ? keyList.get(0).get("columnName").toString() : "id"; |  |  |  | 			String keyColumn = keyList!=null&&keyList.size()>0 ? keyList.get(0).get("columnName").toString() : "id"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Map<String,Object> map = new HashMap<String,Object>(); |  |  |  | 			Map<String,Object> map = new HashMap<String,Object>(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			String sqlWhere = "not exists (select fkId from idc_record where type='"+tnames[2]+"' and fkId="+tnames[2]+"."+keyColumn+")"; |  |  |  | 			 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			String sqlWhere = ""; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			if(!StringUtils.isEmpty(tnames[6])) { |  |  |  | 			if(!StringUtils.isEmpty(tnames[6])) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 				sqlWhere+=" and "+tnames[6]+">=cast('"+lastUpdateTime+"' as datetime)"; |  |  |  | 				sqlWhere+=" "+tnames[6]+">=cast('"+lastUpdateTime+"' as datetime)"; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 			} else { |  |  |  | 			} else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				sqlWhere = "not exists (select fkId from idc_record where type='"+tnames[2]+"' and fkId="+tnames[2]+"."+keyColumn+")"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 				map.put("isEnd", "1"); |  |  |  | 				map.put("isEnd", "1"); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			} |  |  |  | 			} | 
			
		
	
		
		
			
				
					
					|  |  |  | 			map.put("sqlWhere", sqlWhere); |  |  |  | 			map.put("sqlWhere", sqlWhere); | 
			
		
	
	
		
		
			
				
					|  |  | @ -523,20 +525,21 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 							} |  |  |  | 							} | 
			
		
	
		
		
			
				
					
					|  |  |  | 							recordSql+=!StringUtils.isEmpty(recordSql) ? "," : ""; |  |  |  | 							recordSql+=!StringUtils.isEmpty(recordSql) ? "," : ""; | 
			
		
	
		
		
			
				
					
					|  |  |  | 							recordSql+="('"+UUID.randomUUID().toString().replaceAll("-", "")+"','"+tableName+"','"+list.get(m).get(keyColumn)+"','"+isEnd+"',now())"; |  |  |  | 							recordSql+="('"+UUID.randomUUID().toString().replaceAll("-", "")+"','"+tableName+"','"+list.get(m).get(keyColumn)+"','"+isEnd+"',now())"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 							if(childNum>-1&¶ms.get("masterLinkColumn")!=null&&!StringUtils.isEmpty(params.get("masterLinkColumn").toString())&& |  |  |  | 							if(childNum>-1) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									params.get("subLinkColumn")!=null&&!StringUtils.isEmpty(params.get("subLinkColumn").toString())) { |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 								for(int z=0;z<childNum+1;z++) { |  |  |  | 								for(int z=0;z<childNum+1;z++) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 									String[] chidTnames = childs[z].split("/"); |  |  |  | 									String[] chidTnames = childs[z].split("/"); | 
			
		
	
		
		
			
				
					
					|  |  |  | 									String keyValue = list.get(i).get(params.get("masterLinkColumn")).toString(); |  |  |  | 									if(!StringUtils.isEmpty(chidTnames[4])&&!StringUtils.isEmpty(chidTnames[5])) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									Map<String,Object> childMap = new HashMap<>(); |  |  |  | 										String keyValue = list.get(i).get(chidTnames[4]).toString(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									childMap.put(params.get("subLinkColumn").toString(), keyValue); |  |  |  | 										Map<String,Object> childMap = new HashMap<>(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									List<Map<String,Object>> childList = getList(chidTnames[2],childMap); |  |  |  | 										childMap.put(chidTnames[5], keyValue); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									list.get(m).put("tableName"+z, chidTnames[2]); |  |  |  | 										List<Map<String,Object>> childList = getList(chidTnames[2],childMap); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 									list.get(m).put("data"+z, childList); |  |  |  | 										list.get(m).put("tableName"+z, chidTnames[2]); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 										list.get(m).put("data"+z, childList); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 									} | 
			
		
	
		
		
			
				
					
					|  |  |  | 								} |  |  |  | 								} | 
			
		
	
		
		
			
				
					
					|  |  |  | 							} |  |  |  | 							} | 
			
		
	
		
		
			
				
					
					|  |  |  | 						} |  |  |  | 						} | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 						data.replace("data", list); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 						orderNum++; |  |  |  | 						orderNum++; | 
			
		
	
		
		
			
				
					
					|  |  |  | 						 |  |  |  | 						 | 
			
		
	
		
		
			
				
					
					|  |  |  | 						if(isUpload) { |  |  |  | 						if(isUpload) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |