| | |
| | | using System.Threading.Tasks; |
| | | using HH.WCS.Mobox3.RiDong.device; |
| | | using HH.WCS.Mobox3.RiDong.generalMethod; |
| | | using HH.WCS.Mobox3.RiDong.Quartz; |
| | | using HH.WCS.Mobox3.RiDong.util; |
| | | using Microsoft.Owin.Hosting; |
| | | using Quartz; |
| | | using Quartz.Impl; |
| | | using Topshelf; |
| | | |
| | | namespace HH.WCS.Mobox3.RiDong |
| | | { |
| | | internal class Program |
| | | { |
| | | static void Main(string[] args) |
| | | static async Task Main(string[] args) |
| | | { |
| | | // 定时任务 |
| | | await QuartzJobCreate.CreateJob(); |
| | | |
| | | Settings.Init(); |
| | | //1.0 开启api |
| | | Startup(); |
| | |
| | | x.SetDescription("hh123"); |
| | | x.SetDisplayName("hh123.wms"); |
| | | x.SetServiceName("hh123.wms"); |
| | | |
| | | }); |
| | | |
| | | |
| | | var exitCode = (int)Convert.ChangeType(rc, rc.GetTypeCode()); |
| | | Environment.ExitCode = exitCode; |
| | | } |
| | |
| | | // 创建出库单(DoOut) |
| | | GetTask(ThreadMenthod.CreateOutboundOrderFromDoOut), |
| | | // 创建出库作业 |
| | | GetTaskS(ThreadMenthod.CreateOutTaskFromDistributionCntrDetail), |
| | | GetTask(ThreadMenthod.CreateOutTaskFromDistributionCntrDetail), |
| | | // 作业完成以及错误修改 |
| | | GetTask(ThreadMenthod.AccomplishOperation), |
| | | // Directory读取文件,并处理 |
| | | GetTask(DirectoryHelper.GainData), |
| | | // 出库agv任务推送 |
| | | GetTask(ThreadMenthod.DispatchFromAGV), |
| | | GetTaskS(ThreadMenthod.DispatchFromAGV), |
| | | // 读取线体信息并做对应的处理 |
| | | GetTask(ThreadMenthod.ReadConveyorlinesMessage) |
| | | GetTask(ThreadMenthod.ReadConveyorlinesMessage), |
| | | }; |
| | | Task.WaitAll(tasks.ToArray()); |
| | | } |
| | |
| | | LogHelper.Error(ex.Message, ex); |
| | | } |
| | | |
| | | Thread.Sleep(12000); |
| | | Thread.Sleep(600000); |
| | | } |
| | | }); |
| | | |