Tjiny
7 天以前 6d40f7c8b19efc612f824ee7e778d5be9f8382f5
HH.WCS.Mobox3.RiDong/Program.cs
@@ -6,16 +6,22 @@
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();
@@ -35,9 +41,8 @@
                x.SetDescription("hh123");
                x.SetDisplayName("hh123.wms");
                x.SetServiceName("hh123.wms");
            });
            var exitCode = (int)Convert.ChangeType(rc, rc.GetTypeCode());
            Environment.ExitCode = exitCode;
        }
@@ -91,15 +96,15 @@
                    // 创建出库单(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());
            }
@@ -146,7 +151,7 @@
                            LogHelper.Error(ex.Message, ex);
                        }
                        Thread.Sleep(12000);
                        Thread.Sleep(600000);
                    }
                });