账册信息增加限制于本公司

temp
ddlucky 1 year ago
parent 1498bff483
commit 294908fbdc

@ -14,10 +14,45 @@ using VOL.Core.Utilities;
using System.Linq.Expressions;
using VOL.Core.Extensions;
using Microsoft.EntityFrameworkCore;
using ConvertHelper;
using System.Collections.Generic;
using System;
using VOL.Core.ManageUser;
namespace VOL.WMS.Services
{
public partial class INFO_ACCBOOKService
{
public override PageGridData<INFO_ACCBOOK> GetPageData(PageDataOptions options)
{
//if (UserContext.Current.UserInfo.LimitInCompany)
//{
// options.WheresAddCompany(UserContext.Current.UserInfo.CompanyId);
//}
QueryRelativeExpression = (IQueryable<INFO_ACCBOOK> queryable) =>
{
var list = queryable.DataFilter();
if (list[0].Count > 0)
{
queryable = queryable.Where(list[0].AsExpression<INFO_ACCBOOK>(Query.Condition.AndAlso));
}
//if (list[1].Count > 0)
//{
// queryable = queryable.Where(list[1].AsExpression<INFO_ACCBOOK>(Query.Condition.OrElse));
//}
return queryable;
};
var _r = base.GetPageData(options);
return _r;
}
}
}

Loading…
Cancel
Save