Commit 9396dbcf by lizefeng

优化采购单推送

parent 23e03c9f
......@@ -190,22 +190,25 @@ namespace AutoTurnOver.Services
/// <param name="type">1:张莹霞 2:赵美聪 3:陈嘉雯1 </param>
public static void AutoPushBuySys(int type)
{
// 生产jit采购建议
var mainID = 0;
if (type==1) {
mainID = purchase_advise.ImportJITShortageDetailed(0);
}
else if(type==2)
{
mainID = purchase_advise.ImportFuZhuangShortageDetailed(0);
}else if (type == 3)
{
mainID = purchase_advise.ImportShoujiShortageDetailed(0);
}
List<dc_auto_purchase_advise_detailed_dto> datas = new List<dc_auto_purchase_advise_detailed_dto>();
try
{
// 生产jit采购建议
var mainID = 0;
if (type == 1)
{
mainID = purchase_advise.ImportJITShortageDetailed(0);
}
else if (type == 2)
{
mainID = purchase_advise.ImportFuZhuangShortageDetailed(0);
}
else if (type == 3)
{
mainID = purchase_advise.ImportShoujiShortageDetailed(0);
}
List<dc_auto_purchase_advise_detailed_dto> datas = new List<dc_auto_purchase_advise_detailed_dto>();
var total = 0;
datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false }, 0, int.MaxValue, ref total));
datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false}, 0, int.MaxValue, ref total));
......@@ -218,7 +221,7 @@ namespace AutoTurnOver.Services
{
date = DateTime.Now,
message = ex.Message,
stack_trace = datas.ToJson(),
stack_trace = ex.StackTrace,
task_name = "AutoPushBuySys"
});
Console.WriteLine(ex.Message);
......
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