|
|
@ -328,11 +328,21 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
public async Task<DataResult<SeaExportListRes>> GetListByPage(PageRequest request)
|
|
|
|
public async Task<DataResult<SeaExportListRes>> GetListByPage(PageRequest request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var orgList = db.Queryable<SysOrg>().Where(x => x.Status == StatusEnum.Enable);
|
|
|
|
//序列化查询条件
|
|
|
|
//序列化查询条件
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
var result = tenantDb.Queryable<SeaExport>()
|
|
|
|
var result = tenantDb.Queryable<SeaExport>()
|
|
|
|
.InnerJoin<BusinessFeeStatus>((a, b) => a.Id == b.BusinessId)
|
|
|
|
.InnerJoin<BusinessFeeStatus>((a, b) => a.Id == b.BusinessId)
|
|
|
|
.Select<SeaExportRes>()
|
|
|
|
.LeftJoin<SysOrg>((a, b, c) => a.SaleOrgId == c.Id, "shippingweb8_dev.sys_org")
|
|
|
|
|
|
|
|
.LeftJoin<SysOrg>((a, b, c, d) => a.SaleOrgId == d.Id, "shippingweb8_dev.sys_org")
|
|
|
|
|
|
|
|
.Select((a, b, c, d) => new SeaExportRes()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SaleOrgName = c.OrgName,
|
|
|
|
|
|
|
|
SaleDeptName = d.OrgName,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
true)//true表示 其余字段自动映射,根据字段名字
|
|
|
|
|
|
|
|
//.Select<SeaExportRes>()
|
|
|
|
.MergeTable()
|
|
|
|
.MergeTable()
|
|
|
|
.Mapper(it =>
|
|
|
|
.Mapper(it =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|