diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index f100da85..a055bc52 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -96,14 +96,16 @@ public partial class SeaExportService : ISeaExportService public async Task> GetListByPage(PageRequest request) { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); - - //var query = commonService.GetVisibleDataRuleFilter(tenantDb); + //启用海运出口列表可视数据权限 + var query = commonService.GetVisibleDataRuleFilter(tenantDb); var orgList = db.Queryable().Where(x => x.Status == StatusEnum.Enable); //序列化查询条件 var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); - var result = tenantDb.Queryable() - .InnerJoin((a, b) => a.Id == b.BusinessId) + //var result = tenantDb.Queryable() + var statusList = tenantDb.Queryable().Select().ToList(); + var result = query + .InnerJoin((a, b) => a.Id == b.BusinessId) //.LeftJoin((a, b, c) => a.SaleOrgId == c.Id, "shippingweb8_dev.sys_org") //.LeftJoin((a, b, c) => a.SaleDeptId == c.Id, "shippingweb8_dev.sys_org") .Select((a, b) => new SeaExportRes() @@ -115,9 +117,9 @@ public partial class SeaExportService : ISeaExportService .MergeTable() .Mapper(it => { - - it.BookingStatus = tenantDb.Queryable().Where(x => x.BusinessId == it.Id).Select().ToList(); - + it.BookingStatus = statusList.Where(x => x.BusinessId == it.Id).ToList(); + //it.BookingStatus = tenantDb.Queryable().Where(x => x.BusinessId == it.Id).Select().ToList(); + }) .Where(whereList); //.ToQueryPageAsync(request.PageCondition);