Commit bb4009e9 by 泽锋 李

fix

parent 7aefa40f
......@@ -4120,9 +4120,26 @@ from dc_base_transfer_plan as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
where t1.`status`=1 and t2.hq_type not IN ('国内仓','fba仓') and t1.deleted=0
").ToList();
if(temp_p_datas2!=null && temp_p_datas2.Count >= 1)
_connection.Execute(@" update dc_mid_transit as t1 ,
dc_base_warehouse as t2
set t1.quantity_transfer_temp_schedule=0
where t1.warehouse_code =t2.warehouse_code and t2.hq_type not in ('国内仓','fba仓')
");
if (temp_p_datas2!=null && temp_p_datas2.Count >= 1)
{
temp_p_datas.AddRange(temp_p_datas2);
// 刷到实时缺货表里面
foreach (var item in temp_p_datas2.GroupBy(s=>new { s.bailun_sku ,s.warehouse_code}))
{
_connection.Execute("update dc_mid_transit set quantity_transfer_temp_schedule=@quantity_transfer_temp_schedule where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ", new
{
bailun_sku = item.Key.bailun_sku,
warehouse_code = item.Key.warehouse_code,
quantity_transfer_temp_schedule = item.Sum(v=>v.count)
});
}
}
// 查询已经有调拨的采购单
foreach (var item in temp_p_datas.GroupBy(s=>s.purchase_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