Commit 7bc82d01 by 泽锋 李

fix

parent 4b35172e
...@@ -4087,17 +4087,19 @@ where t1.is_delete=0 and t1.is_temp_data=1 and t1.is_exception=0 and t2.hq_type ...@@ -4087,17 +4087,19 @@ where t1.is_delete=0 and t1.is_temp_data=1 and t1.is_exception=0 and t2.hq_type
foreach (var item in temp_p_datas.GroupBy(s=>s.purchase_id)) foreach (var item in temp_p_datas.GroupBy(s=>s.purchase_id))
{ {
// 查询是否已经调拨 // 查询是否已经调拨
var exists_trans = _connection.QueryFirstOrDefault<int>(" select count(1) from dc_base_transfer_info as t_tran where t_tran.purchasecode like @purchasecode ",new { purchasecode = $"%{item.Key}%"}); //var exists_trans = _connection.QueryFirstOrDefault<int>(" select count(1) from dc_base_transfer_info as t_tran where t_tran.purchasecode like @purchasecode ",new { purchasecode = $"%{item.Key}%"});
if (exists_trans <= 0) //if (exists_trans <= 0)
//{
//}
foreach (var itemSku in item.AsEnumerable())
{ {
foreach (var itemSku in item.AsEnumerable()) itemSku.transfer_order_id = "v - " + itemSku.purchase_id;
{ // 查询历史调拨天数
itemSku.transfer_order_id = "v - "+itemSku.purchase_id; var tran_days = _connection.QueryFirstOrDefault<int?>(" select transfer_delivery+transfer_bale_delivery+abroad_inbound_delivery from dc_auto_turnover where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ", new { bailun_sku = itemSku.bailun_sku, warehouse_code = itemSku.warehouse_code }) ?? 0;
// 查询历史调拨天数 itemSku.expectarrivaltime = DateTime.Now.AddDays(tran_days);
var tran_days = _connection.QueryFirstOrDefault<int?>(" select transfer_delivery+transfer_bale_delivery+abroad_inbound_delivery from dc_auto_turnover where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ", new { bailun_sku = itemSku.bailun_sku , warehouse_code = itemSku.warehouse_code })??0; datas.Add(itemSku);
itemSku.expectarrivaltime = DateTime.Now.AddDays(tran_days);
datas.Add(itemSku);
}
} }
} }
......
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