Commit be72fdec by lizefeng

非jit异常监控,新增实时库存字段

parent 45eb6066
......@@ -31,14 +31,15 @@ t4.deliver_name,
t2.history_sevenday_sales,
t2.history_fourteenday_sales,
t2.history_thirtyday_sales,
( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status'
( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status',
t6.usable_stock
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
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku
left join dc_auto_purchase_ontheway as t4 on t1.bailun_sku = t4.bailun_sku and t1.warehouse_code = t4.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_base_stock as t6 on t1.bailun_sku = t6.bailun_sku and t1.warehouse_code = t6.warehouse_code
where 1 = 1
";
}
......@@ -48,11 +49,12 @@ where 1 = 1
select t1.*,t3.sku_title_cn,
t2.history_sevenday_sales,
t2.history_fourteenday_sales,
t2.history_thirtyday_sales, ( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status' from dc_auto_forecast_fluctuation as t1
t2.history_thirtyday_sales, ( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status', t6.usable_stock 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
left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_base_stock as t6 on t1.bailun_sku = t6.bailun_sku and t1.warehouse_code = t6.warehouse_code
where 1 = 1
";
}
......
......@@ -138,6 +138,11 @@ namespace AutoTurnOver.Models
/// 是否停止监控
/// </summary>
public int monitor_status { get; set; }
/// <summary>
/// 可配库存
/// </summary>
public decimal? usable_stock { get; set; }
}
public class dc_auto_forecast_fluctuation_search_dto
......
......@@ -65,7 +65,7 @@ namespace AutoTurnOver.Controllers
string[] cols = new string[] { "Sku","中文名称","仓库编码","仓库名称","最近3日日均","最近7日日均","最近14日日均","最近30日日均","异常类型","开始时间",
"总缺货数","在途数量","采购员","预计到货","bi 采购单号","供应商","逾期状态",
"结束时间","是否确认","确认人","预计解决时间",
"处理方案","是否解决","监控状态"
"处理方案","是否解决","监控状态","实时库存"
};
foreach (var item in cols)
{
......@@ -103,6 +103,7 @@ namespace AutoTurnOver.Controllers
row["处理方案"] = itemData.remark;
row["是否解决"] = itemData.has_solve == 1 ? "是" : "否";
row["监控状态"] = itemData.monitor_status==1?"停止监控":"正常监控";
row["实时库存"] = itemData.usable_stock;
table.Rows.Add(row);
}
......
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