|
|
|
@ -113,6 +113,7 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
|
//var result = tenantDb.Queryable<SeaExport>()
|
|
|
|
|
var statusList = tenantDb.Queryable<BookingStatus>().Select<BookingStatusRes>().ToList();
|
|
|
|
|
var ctnPrices = tenantDb.Queryable<BusinessCtnPrice>().ToList();
|
|
|
|
|
var result = query.Where(a => (a.IsRefund == false && a.IsChangeETD == false))
|
|
|
|
|
.InnerJoin<BusinessFeeStatus>((a, b) => a.Id == b.BusinessId)
|
|
|
|
|
//.LeftJoin<SysOrg>((a, b, c) => a.SaleOrgId == c.Id, "shippingweb8_dev.sys_org")
|
|
|
|
@ -120,6 +121,12 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
.Select((a, b) => new SeaExportRes()
|
|
|
|
|
{
|
|
|
|
|
//SaleDeptName = c.OrgName,
|
|
|
|
|
QuotePrice = SqlFunc.Subqueryable<BusinessCtnPrice>()
|
|
|
|
|
.Where(s => s.BusinessId == a.Id)
|
|
|
|
|
.Select(s => s.QuotePrice),
|
|
|
|
|
FloorPrice = SqlFunc.Subqueryable<BusinessCtnPrice>()
|
|
|
|
|
.Where(s => s.BusinessId == a.Id)
|
|
|
|
|
.Select(s => s.FloorPrice)
|
|
|
|
|
},
|
|
|
|
|
true)//true表示 其余字段自动映射,根据字段名字
|
|
|
|
|
//.Select<SeaExportRes>()
|
|
|
|
@ -127,6 +134,9 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
.Mapper(it =>
|
|
|
|
|
{
|
|
|
|
|
it.BookingStatus = statusList.Where(x => x.BusinessId == it.Id).ToList();
|
|
|
|
|
//var ctnPrice = ctnPrices.First(x => x.BusinessId == it.Id);
|
|
|
|
|
//it.QuotePrice = ctnPrice?.QuotePrice;
|
|
|
|
|
//it.FloorPrice = ctnPrice?.FloorPrice;
|
|
|
|
|
//it.BookingStatus = tenantDb.Queryable<BookingStatus>().Where(x => x.BusinessId == it.Id).Select<BookingStatusRes>().ToList();
|
|
|
|
|
//it.StatusLog =
|
|
|
|
|
})
|
|
|
|
|