Commit fc9ac37c by 泽锋 李

fix

parent a713b341
...@@ -973,7 +973,7 @@ where t1.`code`=@code limit 1 ...@@ -973,7 +973,7 @@ where t1.`code`=@code limit 1
} }
catch (Exception ex) catch (Exception ex)
{ {
throw new Exception("推送调拨计划异常") throw new Exception("推送调拨计划异常");
} }
} }
} }
......
...@@ -548,7 +548,10 @@ and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0 ...@@ -548,7 +548,10 @@ and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0
var datas4 = AreaRedundancyClear(datas3); var datas4 = AreaRedundancyClear(datas3);
// 如果广州01,最近7天订单数量小于3 则只补缺货 // 如果广州01,最近7天订单数量小于3 则只补缺货
var datas2 = ClearOrders7(datas4); var datas21 = ClearOrders7(datas4);
//独立站的海外仓要先考虑国内仓是否有冗余
var datas2 = lm_dao.GenerateTransferPlan(datas21);
if (datas2 != null && datas2.Count >= 1) if (datas2 != null && datas2.Count >= 1)
{ {
......
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_base_oms_transfer_warehouse_log
{
public int id { get; set; }
public string from_warehouse_code { get; set; }
public string to_warehouse_code { get; set; }
public string bailun_order_id { get; set; }
public DateTime create_time { get; set; }
public string bailun_sku { get; set; }
}
}
...@@ -8,4 +8,9 @@ namespace AutoTurnOver.Models ...@@ -8,4 +8,9 @@ namespace AutoTurnOver.Models
{ {
public string area_name { get; set; } public string area_name { get; set; }
} }
public class dc_base_stock_auto: dc_base_stock
{
public int redundant_quantity { get; set; }
}
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_sys_allot_plan
{
public int id { get; set; }
public string bailun_sku { get; set; }
public string warehouse_code_from { get; set; }
public string warehouse_code_to { get; set; }
public int question { get; set; }
public DateTime create_time { get; set; }
/// <summary>
/// 待推送、已推送、推送失败
/// </summary>
public string status { get; set; }
public string trans_sys_no { get; set; }
public DateTime? push_time { get; set; }
}
}
...@@ -474,6 +474,28 @@ namespace ResetOutofstock ...@@ -474,6 +474,28 @@ namespace ResetOutofstock
} }
}); });
Task.Factory.StartNew(() =>
{
while (true)
{
try
{
Console.WriteLine($"开始 lm 产品换仓备货,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
lm_dao.ChangeWarehouseStockUp();
Console.WriteLine($"结束 lm 产品换仓备货,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Thread.Sleep(60 * 1000);
}
catch (Exception ex)
{
Console.WriteLine(" lm 产品换仓备货:" + ex.Message);
Console.WriteLine(" lm 产品换仓备货:" + ex.StackTrace);
}
}
});
......
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