Commit 3777a12c by 泽锋 李

fix

parent d56242ac
......@@ -195,21 +195,23 @@ and t1.gmt_modified>=@btime and ifnull(t4.head_transport,'')!='空运'
}
sql += " order by t1.start_time desc ;";
List<replace_logistics_outofstock_dto> ouDatas = _connection.Query<replace_logistics_outofstock_dto>(sql, parameters).ToList();
foreach (var item in ouDatas)
{
// 如果采购都没到货就已经缺货了,调拨天数切换已经没有意义了
item.surplus_allocation_days = (decimal)(item.start_time.AddDays(0 - (item.inspection_delivery + item.payment_before_delivery + item.supplier_delivery)) - now).TotalDays;
if (item.surplus_allocation_days >= 1)
{
item.country_code = _connection.QueryFirstOrDefault<string>(" select `code` from dc_base_country where `name`=@name limit 1 ", new { name = item.area_name });
if (!string.IsNullOrWhiteSpace(item.country_code))
{
datas.Add(item);
}
}
}
return datas;
return ouDatas;
//foreach (var item in ouDatas)
//{
// // 如果采购都没到货就已经缺货了,调拨天数切换已经没有意义了
// item.surplus_allocation_days = (decimal)(item.start_time.AddDays(0 - (item.inspection_delivery + item.payment_before_delivery + item.supplier_delivery)) - now).TotalDays;
// if (item.surplus_allocation_days >= 1)
// {
// item.country_code = _connection.QueryFirstOrDefault<string>(" select `code` from dc_base_country where `name`=@name limit 1 ", new { name = item.area_name });
// if (!string.IsNullOrWhiteSpace(item.country_code))
// {
// datas.Add(item);
// }
// }
//}
//return datas;
}
......
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