Commit 5bcce937 by 泽锋 李

非jit异常导出,新增sku供应商交期sku调拨交期

parent 9d493335
......@@ -35,7 +35,9 @@ t2.history_thirtyday_sales,
t6.usable_stock,
t3.moq,
t6.`character`,
t2.turnover_days
t2.turnover_days,
t3.supplier_delivery as 'sku_supplier_delivery',
t3.transfer_delivery as 'sku_transfer_delivery'
from
dc_auto_forecast_fluctuation as t1
inner JOIN dc_auto_turnover as t2 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
......
......@@ -3728,14 +3728,17 @@ where t1.bailun_sku = t2.bailun_sku and t1.bailun_sku = t3.bailun_sku and t1.wee
{
var btime3 = DateTime.Now.AddMonths(-3);
_connection.Execute(@"-- 刷新首次采购时间
-- 刷新首次采购时间
set session transaction isolation level read uncommitted;
start transaction;
update dc_base_stock as t1,
(select t1.bailun_sku,t1.warehouse_into_code as 'warehouse_code',min(t1.create_time) as 'min_time' from dc_base_purchase_details as t1
where `status`!=-1 and t1.create_time>=@btime
GROUP BY t1.bailun_sku,t1.warehouse_into_code) as t2
(select t1.bailun_sku,(case when t1.isallot=0 then t1.warehouse_from_code else t1.warehouse_into_code end) as 'warehouse_code',min(t1.create_time) as 'min_time' from dc_base_purchase_details as t1
where `status`!=-1 -- and t1.create_time>=@btime
GROUP BY t1.bailun_sku,(case when t1.isallot=0 then t1.warehouse_from_code else t1.warehouse_into_code end)) as t2
set t1.first_purchase_date = t2.min_time
where t1.bailun_sku = t2.bailun_sku and t1.warehouse_code=t2.warehouse_code and t1.first_purchase_date is null ;
", new { btime = btime3 },commandTimeout: 0);
_connection.Execute(@"-- 刷新首次调拨时间
......
......@@ -83,6 +83,8 @@ namespace AutoTurnOver.Models
public class dc_auto_forecast_fluctuation_dto: dc_auto_forecast_fluctuation {
public decimal sku_supplier_delivery { get; set; }
public decimal sku_transfer_delivery { get; set; }
public decimal turnover_days { get; set; }
public decimal moq { get; set; }
/// <summary>
......
......@@ -70,7 +70,7 @@ namespace AutoTurnOver.Controllers
string[] cols = new string[] { "Sku","中文名称","仓库编码","仓库名称","最近3日日均","最近7日日均","最近14日日均","最近30日日均","异常类型","开始时间",
"总缺货数","在途数量","采购员","预计到货","bi 采购单号","供应商","逾期状态",
"结束时间","是否确认","确认人","预计解决时间",
"处理方案","是否解决","监控状态","实时库存","moq","供应链类型","供应链长度"
"处理方案","是否解决","监控状态","实时库存","moq","供应链类型","供应链长度","sku供应商交期","sku调拨交期"
};
foreach (var item in cols)
{
......@@ -81,6 +81,8 @@ namespace AutoTurnOver.Controllers
{
DataRow row = table.NewRow();
row["sku供应商交期"] = itemData.sku_supplier_delivery;
row["sku调拨交期"] = itemData.sku_transfer_delivery;
row["供应链长度"] = itemData.turnover_days;
row["Sku"] = itemData.bailun_sku;
row["中文名称"] = itemData.sku_title_cn;
......
......@@ -25,7 +25,8 @@ namespace ResetOutofstock
//report.ResetLastweekData();
//report.ResetOmsOutofstock();
//report.PurchaseWeekBackUp();
//report.PurchaseWeekBackUp();
//report.PurchaseWeekBackUp();
}
catch (Exception ex)
{
......
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