Commit d46fd2aa by 泽锋 李

FIX

parent 53ce6053
...@@ -535,11 +535,11 @@ set t1.`fixed_unit_price` = t3.unit_price, ...@@ -535,11 +535,11 @@ set t1.`fixed_unit_price` = t3.unit_price,
t1.`fixed_turnover_inbound` =t2.turnover_inbound, t1.`fixed_turnover_inbound` =t2.turnover_inbound,
t1.`fixed_quantity_inventory`=t2.quantity_inventory , t1.`fixed_quantity_inventory`=t2.quantity_inventory ,
t1.`fixed_moq`= t2.quantity_minimum_order, t1.`fixed_moq`= t2.quantity_minimum_order,
t1.`fixed_stock_up_sales`=t2.stock_up_sales , t1.`fixed_stock_up_sales`=t2.stock_up_days ,
t1.`fixed_dc_auto_sales_forecast_title` = t2.dc_auto_sales_forecast_title 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 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 and t1.bailun_sku =t3.bailun_sku
",new { advId }); ", new { advId });
// 周转期的预测销量需要自行计算 // 周转期的预测销量需要自行计算
var datas = _connection.Query<dc_auto_purchase_advise_detailed>(" select * from dc_auto_purchase_advise_detailed where main_id=@main_id ", new { main_id = advId }, commandTimeout: 0).AsList(); var datas = _connection.Query<dc_auto_purchase_advise_detailed>(" select * from dc_auto_purchase_advise_detailed where main_id=@main_id ", new { main_id = advId }, commandTimeout: 0).AsList();
...@@ -549,6 +549,7 @@ set t1.`fixed_unit_price` = t3.unit_price, ...@@ -549,6 +549,7 @@ set t1.`fixed_unit_price` = t3.unit_price,
{ {
try try
{ {
item.fixed_stock_up_sales = Math.Max((int)(item.fixed_stock_up_sales??0M)-1,0);
item.fixed_turnover_date_sales = (int)item.fixed_sales_explain_details.ToObj<List<decimal>>()[item.turnover_days + 7 - 1]; item.fixed_turnover_date_sales = (int)item.fixed_sales_explain_details.ToObj<List<decimal>>()[item.turnover_days + 7 - 1];
_connection.Execute("update dc_auto_purchase_advise_detailed set fixed_turnover_date_sales=@fixed_turnover_date_sales where id=@id ",new { id= item.id}); _connection.Execute("update dc_auto_purchase_advise_detailed set fixed_turnover_date_sales=@fixed_turnover_date_sales where id=@id ",new { id= item.id});
} }
......
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