海运出口列表添加QuotePrice FloorPrice

dev
cjy 4 weeks ago
parent 1752f89777
commit e85113d410

@ -1538,4 +1538,12 @@ public class SeaExportRes
/// </summary>
[Description("货好时间")]
public Nullable<DateTime> GoodsCompleteTime { get; set; }
/// <summary>
/// 报价
/// </summary>
public int? QuotePrice { get; set; }
/// <summary>
/// 底价
/// </summary>
public int? FloorPrice { get; set; }
}

@ -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 =
})

Loading…
Cancel
Save