|
@@ -47,7 +47,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
|
|
|
#region 负责人
|
|
|
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);
|
|
|
+ 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}) and u1.IsDel = 0", dto.Userid);
|
|
|
List<AscribedUser> ascribedUsers = await _sqlSugar.SqlQueryable<AscribedUser>(sql).ToListAsync();
|
|
|
if (ascribedUsers.Count != 0)
|
|
|
{
|
|
@@ -70,7 +70,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
|
|
|
#region 业务归属
|
|
|
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);
|
|
|
+ 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}) and d1.isdel = 0", dto.Business);
|
|
|
List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>(sql).ToListAsync();
|
|
|
if (AscribedDepartment.Count != 0)
|
|
|
{
|
|
@@ -294,7 +294,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
|
|
|
List<dynamic> _ServiceClass = new List<dynamic>();
|
|
|
List<Sys_SetData> ServiceClass = _sqlSugar.Queryable<Sys_SetData>()
|
|
|
.Where(u => u.STid == 36 && u.IsDel == 0).ToList();
|
|
|
- foreach (Sys_SetData item in province)
|
|
|
+ foreach (Sys_SetData item in ServiceClass)
|
|
|
{
|
|
|
var data = new
|
|
|
{
|