Commit 984731f4 by 泽锋 李

新增空运票数占比跟空运数量占比

parent 44173074
...@@ -1346,6 +1346,8 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime ...@@ -1346,6 +1346,8 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime
new transfer_profit_dto{field_name ="freight_price_ocean_30_difference", remarks = "30天预测销量实际-海运金额汇总", name ="30天预测销量实际-海运金额汇总",days = new List<transfer_profit_dto.day_dto>()}, new transfer_profit_dto{field_name ="freight_price_ocean_30_difference", remarks = "30天预测销量实际-海运金额汇总", name ="30天预测销量实际-海运金额汇总",days = new List<transfer_profit_dto.day_dto>()},
new transfer_profit_dto{field_name ="freight_price_air_30_difference",remarks ="30天预测销量空运-实际金额汇总" ,name ="30天预测销量空运-实际金额汇总",days = new List<transfer_profit_dto.day_dto>()}, new transfer_profit_dto{field_name ="freight_price_air_30_difference",remarks ="30天预测销量空运-实际金额汇总" ,name ="30天预测销量空运-实际金额汇总",days = new List<transfer_profit_dto.day_dto>()},
new transfer_profit_dto{field_name ="freight_price_air_ocean_30_difference", remarks = "30天预测销量空运-海运金额汇总", name ="30天预测销量空运-海运金额汇总",days = new List<transfer_profit_dto.day_dto>()}, new transfer_profit_dto{field_name ="freight_price_air_ocean_30_difference", remarks = "30天预测销量空运-海运金额汇总", name ="30天预测销量空运-海运金额汇总",days = new List<transfer_profit_dto.day_dto>()},
new transfer_profit_dto{field_name ="order_count_3_radio", remarks = "空运调拨票数占比", name ="空运调拨票数占比",days = new List<transfer_profit_dto.day_dto>()},
new transfer_profit_dto{field_name ="product_count_3_radio", remarks = "空运调拨数量占比", name ="空运调拨数量占比",days = new List<transfer_profit_dto.day_dto>()},
}; };
...@@ -1404,6 +1406,18 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime ...@@ -1404,6 +1406,18 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime
// 预测未来 // 预测未来
if (this_time_end >= now) if (this_time_end >= now)
{ {
var average_warehouse_data = _connection.QueryFirstOrDefault<dc_average_warehouse>(" select * from dc_average_warehouse where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku limit 1 ", new
{
warehouse_code = result.warehouse_code,
bailun_sku = result.bailun_sku
}) ?? new dc_average_warehouse { };
modalData.product_count = average_warehouse_data.product_count;
modalData.product_count_3 = average_warehouse_data.product_count_3;
modalData.order_count = average_warehouse_data.order_count;
modalData.order_count_3 = average_warehouse_data.order_count_3;
modalData.order_count_3_radio = modalData.order_count<=0?0 : modalData.order_count_3 / modalData.order_count;
modalData.product_count_3_radio = modalData.product_count <= 0?0 : modalData.product_count_3 / modalData.product_count;
var dc_base_transfer_freight_data = _connection.QueryFirstOrDefault<dc_base_transfer_freight>(" select * from dc_base_transfer_freight where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku limit 1 ", new var dc_base_transfer_freight_data = _connection.QueryFirstOrDefault<dc_base_transfer_freight>(" select * from dc_base_transfer_freight where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku limit 1 ", new
{ {
warehouse_code = result.warehouse_code, warehouse_code = result.warehouse_code,
...@@ -2017,6 +2031,8 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime ...@@ -2017,6 +2031,8 @@ where t1.gmt_modified>=@btime and t1.gmt_modified<=@etime
{ {
return; return;
} }
// 查询利润数据 // 查询利润数据
var profit_data = TransferProfitList(bailun_sku, warehouse_code, DateTime.Now).today_data; var profit_data = TransferProfitList(bailun_sku, warehouse_code, DateTime.Now).today_data;
profit_data.ocean_purchase = Math.Max(0, profit_data.quantity_final_advise_ocean - profit_data.turnover); profit_data.ocean_purchase = Math.Max(0, profit_data.quantity_final_advise_ocean - profit_data.turnover);
...@@ -2173,14 +2189,17 @@ order by t1.gmt_modified asc ...@@ -2173,14 +2189,17 @@ order by t1.gmt_modified asc
} }
else else
{ {
sql = @" select ta.*,t4.product_code,t4.weight,t4.sku_title_cn as 'product_name' from dc_report_profit_analysis as ta sql = @" select ta.*,t4.product_code,t4.weight,t4.sku_title_cn as 'product_name',t5.`stock` as 'fba_storage_capacity',
t5.`stock` - (ifnull(t6.quantity_transfer_temp_schedule,0) + ifnull(t6.quantity_transfer_temporary_storage,0) + ifnull(t6.quantity_transfer_plan,0) + ifnull(t6.quantity_purchase,0) ) as 'storage_capacity'
from dc_report_profit_analysis as ta
left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and dat.bailun_sku = ta.bailun_sku left join dc_auto_turnover as dat on dat.warehouse_code = ta.warehouse_code and dat.bailun_sku = ta.bailun_sku
left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku
left join dc_base_storage_capacity as t5 on ta.bailun_sku = t5.bailun_sku and ta.warehouse_code = t5.warehouse_code
left join dc_mid_transit as t6 on ta.bailun_sku = t6.bailun_sku and ta.warehouse_code = t6.warehouse_code
"; ";
} }
var sqlCount = @" var sqlCount = @"
select select
count(1) count(1)
......
...@@ -5,7 +5,38 @@ using System.Text; ...@@ -5,7 +5,38 @@ using System.Text;
namespace AutoTurnOver.Models.Report namespace AutoTurnOver.Models.Report
{ {
public class transfer_profit_modal_dto public class transfer_profit_modal_dto
{ { /// <summary>
/// 累积调拨数量
/// </summary>
public decimal product_count { get; set; }
/// <summary>
/// 累积调拨票数
/// </summary>
public decimal order_count { get; set; }
/// <summary>
/// 累积调拨数量(空运)
/// </summary>
public decimal product_count_3 { get; set; }
/// <summary>
/// 累积调拨数量占比(空运)
/// </summary>
public decimal product_count_3_radio { get; set; }
/// <summary>
/// 累积调拨票数(空运)
/// </summary>
public decimal order_count_3 { get; set; }
/// <summary>
/// 累积调拨票数占比(空运)
/// </summary>
public decimal order_count_3_radio { get; set; }
/// <summary> /// <summary>
/// 实际建议周转数 /// 实际建议周转数
/// </summary> /// </summary>
......
...@@ -293,6 +293,36 @@ namespace AutoTurnOver.Models ...@@ -293,6 +293,36 @@ namespace AutoTurnOver.Models
/// </summary> /// </summary>
[Description(@"海运建议采购金额")] [Description(@"海运建议采购金额")]
public decimal ocean_purchase_amount { get; set; } public decimal ocean_purchase_amount { get; set; }
/// <summary>
/// 累积调拨数量
/// </summary>
[Description(@"累积调拨数量")]
public decimal product_count { get; set; }
/// <summary>
/// 累积调拨票数
/// </summary>
[Description(@"累积调拨票数")]
public decimal order_count { get; set; }
/// <summary>
/// 累积调拨数量(空运)
/// </summary>
[Description(@"累积调拨数量(空运)")]
public decimal product_count_3 { get; set; }
/// <summary>
/// 累积调拨数量占比(空运)
/// </summary>
[Description(@"累积调拨数量占比(空运)")]
public decimal product_count_3_radio { get; set; }
/// <summary>
/// 累积调拨票数(空运)
/// </summary>
[Description(@"累积调拨票数(空运)")]
public decimal order_count_3 { get; set; }
/// <summary>
/// 累积调拨票数占比(空运)
/// </summary>
[Description(@"累积调拨票数占比(空运)")]
public decimal order_count_3_radio { get; set; }
public DateTime update_time { get; set;} public DateTime update_time { get; set;}
...@@ -314,6 +344,10 @@ namespace AutoTurnOver.Models ...@@ -314,6 +344,10 @@ namespace AutoTurnOver.Models
public string product_code { get; set; } public string product_code { get; set; }
public decimal? weight { get; set; } public decimal? weight { get; set; }
public string product_name { get; set; } public string product_name { get; set; }
public decimal? storage_capacity { get; set; }
public decimal? fba_storage_capacity { get; set; }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment