Commit 07fcd23f by 泽锋 李

修改 海外仓可用库存 算法

parent ad017cbe
...@@ -1333,7 +1333,7 @@ sum(case when t2.hq_type='第三方仓库' and t2.area_id=6 then t1.quantity_pur ...@@ -1333,7 +1333,7 @@ sum(case when t2.hq_type='第三方仓库' and t2.area_id=6 then t1.quantity_pur
sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t3.usable_stock else 0 end) as 'haiwai_us_usable_stock', -- 海外仓us仓 可配库存 sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t3.usable_stock else 0 end) as 'haiwai_us_usable_stock', -- 海外仓us仓 可配库存
sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t1.quantity_purchase + t1.quantity_transfer else 0 end) as 'haiwai_us_transfer', -- 海外仓us仓 在途库存 sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t1.quantity_purchase + t1.quantity_transfer else 0 end) as 'haiwai_us_transfer', -- 海外仓us仓 在途库存
sum(case when t2.hq_type='FBA仓' then t3.usable_stock else 0 end) as 'fba_usable_stock', -- fba 可用库存 sum(case when t2.hq_type='FBA仓' then t3.usable_stock else 0 end) as 'fba_usable_stock', -- fba 可用库存
sum(case when t2.hq_type in ('第三方仓库','FBA仓') then t3.usable_stock else 0 end) as 'haiwai_usable_stock', -- 海外仓可用库存 sum(case when t2.hq_type in ('第三方仓库','FBA仓') then t3.usable_stock + t1.quantity_purchase + t1.quantity_transfer else 0 end) as 'haiwai_usable_stock', -- 海外仓可用库存
sum(case when t1.warehouse_code='GZBLWH' then t5.history_sevenday_sales else 0 end) as 'guangzhou01_history_sevenday_sales', -- 广州01 日均 sum(case when t1.warehouse_code='GZBLWH' then t5.history_sevenday_sales else 0 end) as 'guangzhou01_history_sevenday_sales', -- 广州01 日均
sum(case when t2.hq_type='第三方仓库' and t2.area_id=6 then t5.history_sevenday_sales else 0 end) as 'haiwai_uk_history_sevenday_sales', -- 海外仓uk仓 日均 sum(case when t2.hq_type='第三方仓库' and t2.area_id=6 then t5.history_sevenday_sales else 0 end) as 'haiwai_uk_history_sevenday_sales', -- 海外仓uk仓 日均
sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t5.history_sevenday_sales else 0 end) as 'haiwai_us_history_sevenday_sales', -- 海外仓us仓 日均 sum(case when t2.hq_type='第三方仓库' and t2.area_id=7 then t5.history_sevenday_sales else 0 end) as 'haiwai_us_history_sevenday_sales', -- 海外仓us仓 日均
......
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_auto_stock_monitor_dto
{
public int id { get; set; }
public decimal? unit_price { get; set; }
public string bailun_sku { get; set; }
/// <summary>
/// 国内仓总缺货
/// </summary>
public decimal? china_quantity_out_stock { get; set; }
/// <summary>
/// 国外仓总缺货
/// </summary>
public decimal? not_china_quantity_out_stock { get; set; }
/// <summary>
/// 广州01 可用库存
/// </summary>
public decimal? guangzhou01_usable_stock { get; set; }
/// <summary>
/// 广州01 在途
/// </summary>
public decimal? guangzhou01_transfer_stock { get; set; }
/// <summary>
/// 广州01总库存金额
/// </summary>
public decimal? guangzhou01_stock_amount { get {
return ((guangzhou01_transfer_stock ?? 0) + (guangzhou01_usable_stock ?? 0)) * (unit_price ?? 0);
} }
/// <summary>
/// 海外仓uk仓 可配库存
/// </summary>
public decimal? haiwai_uk_usable_stock { get; set; }
/// <summary>
/// 海外仓uk仓 在途库存
/// </summary>
public decimal? haiwai_uk_transfer { get; set; }
/// <summary>
/// 海外仓us仓 可配库存
/// </summary>
public decimal haiwai_us_usable_stock { get; set; }
/// <summary>
/// 海外仓us仓 在途库存
/// </summary>
public decimal? haiwai_us_transfer { get; set; }
/// <summary>
/// fba 可用库存
/// </summary>
public decimal? fba_usable_stock { get; set; }
/// <summary>
/// 海外仓可用库存
/// </summary>
public decimal? haiwai_usable_stock { get; set; }
/// <summary>
/// 广州01 日均
/// </summary>
public decimal? guangzhou01_history_sevenday_sales { get; set; }
/// <summary>
/// 海外仓uk仓 日均
/// </summary>
public decimal? haiwai_uk_history_sevenday_sales { get; set; }
/// <summary>
/// 海外仓us仓 日均
/// </summary>
public decimal? haiwai_us_history_sevenday_sales { get; set; }
/// <summary>
/// fba 仓 日均
/// </summary>
public decimal? haiwai_fba_history_sevenday_sales { 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