commit by yzf

master
Yang 3 years ago
parent 6055386b33
commit 92f6fdf923

@ -58,10 +58,11 @@ namespace FactorySystemBll
try
{
List<string> funcVal = db.Queryable<TBasicCode>().Where(s => s.FType == (int)Constant.BasicCode. && s.F1 == tType && s.FState == 1).Select(s => s.FValue).ToList();
List<TUser> users = db.Queryable<TUser, TRole_Right>((a, b) => new JoinQueryInfos(JoinType.Left, a.FRoleID == b.FRoleID))
.Where((a, b) => a.FState == 1 && a.FDeleted != 1 && b.FType == funcType && funcVal.Contains(b.FFunctionID.ToString()))
.Where(string.Format("a.FFactoryID in({0})", factoryId))
.GroupBy("a.FID,a.FFactoryID,a.FName,a.FUser").Select<TUser>("a.FID,a.FFactoryID,a.FName,a.FUser").ToList();
List<TUser> users = db.Queryable<TUser, TRole_Right, FPower>((a, b, c) => new JoinQueryInfos(JoinType.Left, a.FRoleID == b.FRoleID,
JoinType.Left, a.FID == int.Parse(c.FUserID)))
.Where((a, b) => a.FState == 1 && a.FDeleted != 1 && b.FType == funcType && funcVal.Contains(b.FFunctionID.ToString()))
.Where(factoryId<=0 ? "1=1" : string.Format("c.FFactoryID in({0})", factoryId))
.GroupBy("a.FID,c.FFactoryID,a.FName,a.FUser").Select<TUser>("a.FID,c.FFactoryID,a.FName,a.FUser").ToList();
if (users.Count > 0)
{

Loading…
Cancel
Save