Commit b66ad65c by guanzhenshan

解决原料没有发货数据的问题

parent 5b2d70af
......@@ -20,8 +20,8 @@ namespace Bailun.DC.SkuDailyPurchaseAndSales
//static void Main(string[] args)
//{
// var start = DateTime.Parse("2019-09-01");
// while (start < DateTime.Now)
// var start = DateTime.Parse("2019-10-20");
// while (start.AddDays(1) < DateTime.Now)
// {
// Console.WriteLine(start.ToString("yyyy-MM-dd"));
// new Services().Init(start, start.AddDays(1));
......
......@@ -258,11 +258,11 @@ namespace Bailun.DC.SkuDailyPurchaseAndSales
var objSemiPutin = cn.Query<Models.mSkuCount>(sql, null, null, true, 2 * 60).AsList();
//出库 =(生产消耗-取消生产)
sql = $@"select t1.material_code as bailun_sku,t1.warehouse_name as warehouse_code,t1.warehouse_name as warehouse_name,t1.stock as count,(t1.stock*t1.new_price) amount from dc_semi_stock_report t1
sql = $@"select t1.material_code as bailun_sku,t1.warehouse_id as warehouse_code,t1.warehouse_name as warehouse_name,t1.stock as count,(t1.stock*t1.new_price) amount from dc_semi_stock_report t1
where t1.stock_type=3 and t1.create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.create_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'";
var objSemiProduction = cn.Query<Models.mSkuCount>(sql, null, null, true, 2 * 60).AsList(); //生产消耗
sql = $@"select t1.material_code as bailun_sku,t1.warehouse_name as warehouse_code,t1.warehouse_name as warehouse_name,t1.stock as count,(t1.stock*t1.new_price) amount from dc_semi_stock_report t1
sql = $@"select t1.material_code as bailun_sku,t1.warehouse_id as warehouse_code,t1.warehouse_name as warehouse_name,t1.stock as count,(t1.stock*t1.new_price) amount from dc_semi_stock_report t1
where t1.stock_type=5 and t1.create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.create_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'";
var objSemiCancelProduction = cn.Query<Models.mSkuCount>(sql, null, null, true, 2 * 60).AsList(); //取消生产
......
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