diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs index 1b4ce5b4..4a35a320 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/SeaExportRes.cs @@ -1538,4 +1538,12 @@ public class SeaExportRes /// [Description("货好时间")] public Nullable GoodsCompleteTime { get; set; } + /// + /// 报价 + /// + public int? QuotePrice { get; set; } + /// + /// 底价 + /// + public int? FloorPrice { get; set; } } \ No newline at end of file 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 aa78f579..28583a7e 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -113,6 +113,7 @@ public partial class SeaExportService : ISeaExportService var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); //var result = tenantDb.Queryable() var statusList = tenantDb.Queryable().Select().ToList(); + var ctnPrices = tenantDb.Queryable().ToList(); var result = query.Where(a => (a.IsRefund == false && a.IsChangeETD == false)) .InnerJoin((a, b) => a.Id == b.BusinessId) //.LeftJoin((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() + .Where(s => s.BusinessId == a.Id) + .Select(s => s.QuotePrice), + FloorPrice = SqlFunc.Subqueryable() + .Where(s => s.BusinessId == a.Id) + .Select(s => s.FloorPrice) }, true)//true表示 其余字段自动映射,根据字段名字 //.Select() @@ -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().Where(x => x.BusinessId == it.Id).Select().ToList(); //it.StatusLog = })