//using Admin.NET.Core.TaskModule.Enum;
|
//using iWareCC.Common.Helper;
|
//using iWareCommon;
|
//using iWareCommon.Common.Globle;
|
//using iWareCommon.Utils;
|
//using iWareModel.Entity.WCS;
|
//using iWareSql.DataAccess;
|
//using iWareSql.MyDbContext;
|
//using Newtonsoft.Json;
|
//using System;
|
//using System.Collections.Generic;
|
//using System.Linq;
|
//using System.Threading;
|
|
//namespace iWareCC
|
//{
|
// /// <summary>
|
// /// WCS任务完成线程(平库)
|
// /// </summary>
|
// public static class PingKu_TaskFinishHandler
|
// {
|
// public static void Handler()
|
// {
|
// while (true)
|
// {
|
|
// Thread.Sleep(2000);//休眠2秒
|
// try
|
// {
|
// if (SystemValue.isAllowRuning_PingKuTaskFinish && SystemValue.isStartedModel)
|
// {
|
// using (MyDbContext dbContext = new MyDbContext())
|
// {
|
// //只查询平库
|
|
// var model = dbContext.ware_task
|
// .Where(TaskHandler.CommonFilterExpressionForNoFinishAndNoCancel())
|
// .Where(x => (x.IsDeleted == null || x.IsDeleted == false) && (x.AreaType == (int)AreaTypeEnum.平库)).ToList();
|
|
// if (model != null && model.Count > 0)
|
// {
|
// List<TaskDatailsOutPut> taskDatailsOutPutsList = MyExtendHelper.CreateSimulationWcsData(model);
|
// foreach (var item in taskDatailsOutPutsList)
|
// {
|
// LiTiKu_TaskFinishedTask.HandleByWcsResult(item, model, dbContext, "PingKu_TaskFinishHandler");
|
// }
|
// }
|
// SystemWarningMsg._lbl_Alert_PingKuTaskFinish = "";
|
// }
|
// }
|
// }
|
// catch (Exception ex)
|
// {
|
// SystemWarningMsg._lbl_Alert_PingKuTaskFinish = "WCS任务完成线程(平库) 出现异常:" + ex.Message;
|
// Log4NetHelper.WriteErrorLog(LogType.PingKuTaskFinish, "WCS任务完成线程(平库) 出现异常:" + ex.Message, ex);
|
// }
|
// }
|
// }
|
// }
|
//}
|