Commit 7635f458 by 泽锋 李

采购建议持久存储周转数据

parent df742f3a
...@@ -514,8 +514,34 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware ...@@ -514,8 +514,34 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
//ImportShoujiShortageDetailed(mainID); //ImportShoujiShortageDetailed(mainID);
//备份周转数据
CopyTurnoverData(mainID);
}
public static void CopyTurnoverData(int advId)
{
_connection.Execute(@"update dc_auto_purchase_advise_detailed as t1,
dc_auto_turnover as t2,
dc_base_sku as t3
set t1.`fixed_unit_price` = t3.unit_price,
t1.`fixed_history_sevenday_sales`=t2.history_sevenday_sales ,
t1.`fixed_history_fourteenday_sales`=t2.history_fourteenday_sales,
t1.`fixed_history_thirtyday_sales`=t2.history_thirtyday_sales,
t1.`fixed_daily_weighted_sales` =t2.daily_weighted_sales,
t1.`fixed_quantity_safe_inventory`=t2.quantity_safe_inventory ,
t1.`fixed_quantity_out_stock` =t2.quantity_out_stock,
t1.`fixed_turnover_sales`=t2.turnover_sales ,
t1.`fixed_turnover_date_sales`=0,
t1.`fixed_sales_explain_details` =t2.sales_explain_details,
t1.`fixed_turnover_inbound` =t2.turnover_inbound,
t1.`fixed_quantity_inventory`=t2.quantity_inventory ,
t1.`fixed_moq`= t2.quantity_minimum_order,
t1.`fixed_stock_up_sales`=t2.stock_up_sales ,
t1.`fixed_dc_auto_sales_forecast_title` = t2.dc_auto_sales_forecast_title
where t1.main_id=@advId and t1.bailun_sku = t2.bailun_sku and t1.warehouse_code =t2.warehouse_code
and t1.bailun_sku =t3.bailun_sku
",new { advId });
} }
public static void ImportDetailedTemp(int mainID, DateTime date) public static void ImportDetailedTemp(int mainID, DateTime date)
......
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