예제 #1
0
        /// <summary>
        /// 人工上料订单,AGV动作执行完毕后,通知立库入库
        /// </summary>
        /// <param name="TaskID"></param>
        private void InformInlib(object TaskID)
        {
            int taskID = -1;

            if (TaskID != null)
            {
                taskID = Convert.ToInt32(TaskID);
            }
            Thread.Sleep(TimeSpan.FromSeconds(2));  ////等待几秒,防止重复接收消息导致重复向立库指令表中插入指令
            DataBaseHandle db        = new DataBaseHandle();
            SqlConnection  con       = new SqlConnection();
            int            TrayStyle = db.SelectTrayStyleByTaskID(con, taskID);

            db.InsertWHCmd(con, "人工订单", "入库", TrayStyle);
            InformWHThreadState = false;
        }