| 
					
				 | 
			
			
				@@ -42,7 +42,7 @@ namespace OASystem.Infrastructure.Repositories.CRM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<int> NewClientDataId1= new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<int> NewClientDataId2 = new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     string NewClientDataId = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (dto.Userid != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!string.IsNullOrWhiteSpace(dto.Userid)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string sql = string.Format(@"select u1.UsersId,u2.CnName,u1.NewClientDataId from Crm_ClientDataAndUser u1,Sys_Users u2 where u1.UsersId=u2.Id and u1.UsersId in ({0})", dto.Userid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         List<AscribedUser> ascribedUsers = await _sqlSugar.SqlQueryable<AscribedUser>(sql).ToListAsync(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,7 +61,7 @@ namespace OASystem.Infrastructure.Repositories.CRM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             result = new Result() { Code = -1, Msg = "暂无数据" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (dto.Business != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!string.IsNullOrWhiteSpace(dto.Business)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string sql = string.Format(@"select d1.*,d2.Name from Crm_ClientDataAndBusiness d1,Sys_SetData d2 where d1.SetDataId=d2.Id and d1.SetDataId in ({0})", dto.Business); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>(sql).ToListAsync(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -258,7 +258,7 @@ namespace OASystem.Infrastructure.Repositories.CRM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<int> NewClientDataId1 = new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<int> NewClientDataId2 = new List<int>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     string NewClientDataId = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (dto.Userid != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!string.IsNullOrWhiteSpace(dto.Userid)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string sql = string.Format(@"select u1.UsersId,u2.CnName,u1.NewClientDataId from Crm_ClientDataAndUser u1,Sys_Users u2 where u1.UsersId=u2.Id and u1.UsersId in ({0})", dto.Userid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         List<AscribedUser> ascribedUsers = await _sqlSugar.SqlQueryable<AscribedUser>(sql).ToListAsync(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -277,7 +277,7 @@ namespace OASystem.Infrastructure.Repositories.CRM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             result = new Result() { Code = -1, Msg = "暂无数据" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (dto.Business != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!string.IsNullOrWhiteSpace(dto.Business)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         string sql = string.Format(@"select d1.*,d2.Name from Crm_ClientDataAndBusiness d1,Sys_SetData d2 where d1.SetDataId=d2.Id and d1.SetDataId in({0})", dto.Business); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>(sql).ToListAsync(); 
			 |