@ -454,8 +456,15 @@ public class ClientInfoService : ServiceBase, IClientInfoService
userids.Add(User.UserId);
}
#endregion
varquery=queryData.Where(c=>c.Status==StatusEnum.Enable.ToEnumInt()||SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(c0=>userids.Contains(c.CreateBy.ToString())).Any())//TenantDb.Queryable<InfoClient>()
//干系人合集
varexp=Expressionable.Create<InfoClient>();
exp=exp.Or(c=>SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(c0=>userids.Contains(c0.CreateBy.ToString())).Any());
@ -216,13 +218,19 @@ public class ClientCommonService : IClientCommonService
}
}
}
if(userids.Count==0)
if(userids.Count==0)
{
userids.Add(user.UserId);
}
//干系人合集
varexp=Expressionable.Create<InfoClient>();
exp=exp.Or(c=>SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(c0=>userids.Contains(c0.CreateBy.ToString())).Any());
@ -1296,8 +1306,15 @@ public class ClientCommonService : IClientCommonService
{
userids.Add(user.UserId);
}
//干系人合集
varexp=Expressionable.Create<InfoClient>();
exp=exp.Or(c=>SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(c0=>userids.Contains(c0.CreateBy.ToString())).Any());
vardata=awaitquery//tenantDb.Queryable<InfoClient>()//.Where(a=> tenantDb.Ado.SqlQuery<dynamic>(sql, new SugarParameter($"@ClientId", a.Id)).Contains(user.UserId))
vardata=awaitqueryData0//tenantDb.Queryable<InfoClient>()//.Where(a=> tenantDb.Ado.SqlQuery<dynamic>(sql, new SugarParameter($"@ClientId", a.Id)).Contains(user.UserId))
.Where((a,b)=>a.Status==StatusEnum.Enable.ToEnumInt()||SqlFunc.Subqueryable<InfoClientStakeholder>().Where("SYSDATE() BETWEEN StartDate and EndDate").Where(c=>c.ClientId==a.Id&&userids.Contains(c.CreateBy.ToString())).Any())