Commit c3db4f5a by 泽锋 李

fix

parent a9480b22
......@@ -85,13 +85,14 @@ where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and t1.bailun_o
{
var weekDatas = week_coefficient_datas.Where(s => s.week == i);
var avg = weekDatas.Select(s => s.coefficient).Average();
//var has_val = weekDatas.Select(s => s.coefficient).Average();
var data = new dc_base_week_coefficient()
{
bailun_sku = item.bailun_sku,
warehouse_code = item.warehouse_code,
bailun_sku_warehouse_code = $"{item.bailun_sku}{item.warehouse_code}",
week = i,
coefficient = (avg==0?1: avg),
coefficient = avg,
update_date = DateTime.Now,
formula = "(" + string.Join("+", weekDatas.Select(s=>s.formula)) + " ) / "+ weekDatas.Count()
};
......
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