Commit d7185534 by 泽锋 李

fix

parent 3838d5bc
......@@ -380,6 +380,27 @@ namespace AutoTurnOver.Services
data.logistics_code = logisticsData.Line_Code;
}
}
//空运则自动选择一个最便宜的渠道
if (data.bp_sendtype == 3)
{
var base_wa = _connection.QueryFirstOrDefault<string>(" select t2.`code` from dc_base_warehouse as t1 left join dc_base_country as t2 on t1.area_name = t2.`name` where warehouse_code=@warehouse_code ", new { warehouse_code = item.Key.warehouse_code });
// 查询物流方案
var logisticsData = ApiUtility.RealTimeShipLogisticsList(new Models.ApiDto.LmsShipLogisticsRequstDto
{
endCountries = base_wa,
character_skus = item.FirstOrDefault().bailun_sku,
startPoint = "3",
transport_type = 3,
has_min_freight_unit_price = true,
has_history_order = 30
}).Where(s => s.min_freight_unit_price > 10).OrderBy(s=>s.min_freight_unit_price).FirstOrDefault();
if (logisticsData != null)
{
data.logistics_code = logisticsData.Line_Code;
}
}
data.bi_buyplandetail = item.GroupBy(s=>s.bailun_sku).Select(s => new bi_buyplandetail
{
bd_count = s.Sum(g=> g.quantity_actual > 0 ? g.quantity_actual : g.quantity_final_advise),
......
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