Commit 89f12435 by guanzhenshan

解决逻辑仓库数据不对的问题

parent a9565c9c
...@@ -67,11 +67,11 @@ namespace Bailun.DC.LogicWareHouse ...@@ -67,11 +67,11 @@ namespace Bailun.DC.LogicWareHouse
from (select t01.bailun_sku,t01.warehouse_code,t01.usable_stock,t02.unit_price from dc_base_stock t01 from (select t01.bailun_sku,t01.warehouse_code,t01.usable_stock,t02.unit_price from dc_base_stock t01
join dc_base_sku t02 on t01.bailun_sku=t02.bailun_sku and t02.company_id=1 order by t01.id join dc_base_sku t02 on t01.bailun_sku=t02.bailun_sku and t02.company_id=1 order by t01.id
limit {strlimit}) t1 limit {strlimit}) t1
left join dc_mid_transit t2 on t1.warehouse_code=t2.warehouse_code and t1.bailun_sku=t2.bailun_sku left join dc_daily_transit t2 on t1.warehouse_code=t2.warehouse_code and t1.bailun_sku=t2.bailun_sku and t2.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}'
left join dc_daily_sales t5 on t5.record_date = '{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.warehouse_code=t5.warehouse_code and t1.bailun_sku =t5.bailun_sku left join dc_daily_sales t5 on t5.record_date = '{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.warehouse_code=t5.warehouse_code and t1.bailun_sku =t5.bailun_sku
join dc_base_warehouse t4 on t1.warehouse_code=t4.warehouse_code join dc_base_warehouse t4 on t1.warehouse_code=t4.warehouse_code
left join dc_daily_transit_from t6 on t1.warehouse_code=t6.source_warehouse_code and t1.bailun_sku=t6.bailun_sku and t6.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' left join (select t0.bailun_sku,t0.source_warehouse_code,sum(quantity_transfer_delivery) as quantity_transfer_delivery,sum(quantity_transfer) as quantity_transfer from dc_daily_transit_from t0 where t0.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' group by t0.bailun_sku,t0.source_warehouse_code) t6 on t1.warehouse_code=t6.source_warehouse_code and t1.bailun_sku=t6.bailun_sku
left join dc_daily_transit_from t7 on t1.warehouse_code=t7.warehouse_code and t1.bailun_sku=t7.bailun_sku and t7.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' left join (select t0.bailun_sku,t0.warehouse_code,sum(quantity_transfer_delivery) as quantity_transfer_delivery,sum(quantity_transfer_inbound) as quantity_transfer_inbound from dc_daily_transit_from t0 where t0.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' group by t0.bailun_sku,t0.warehouse_code) t7 on t1.warehouse_code=t7.warehouse_code and t1.bailun_sku=t7.bailun_sku
"; ";
...@@ -89,7 +89,7 @@ namespace Bailun.DC.LogicWareHouse ...@@ -89,7 +89,7 @@ namespace Bailun.DC.LogicWareHouse
str = str.Substring(0, str.Length - 1); str = str.Substring(0, str.Length - 1);
cn.Execute(str, null, null, 5 * 60); cn.Execute(str, null, null, 5 * 60);
Console.WriteLine("当前页:" + page + ",每页记录:" + pagesize + ";" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine("当前页:" + page + ",每页记录:" + pagesize + ";" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")+",当前记录数:"+ resultcount);
} }
page++; page++;
......
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