109 lines
2.4 KiB
C#
109 lines
2.4 KiB
C#
using Epost.Common;
|
|
using Epost.DAL.Cache;
|
|
using Epost.DAL.Enum;
|
|
using Epost.Model;
|
|
using Epost.Model.resource;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
|
|
|
|
namespace Epost.BLL
|
|
{
|
|
public class Work_DisplayJobThread
|
|
{
|
|
public string tblock, id;
|
|
public bool OrisShow = false;
|
|
OrderBLL orderbll = new OrderBLL();
|
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
|
CommandBLL comBLL = new CommandBLL();
|
|
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
|
|
|
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
|
WorkIngCacheDAL workbll = new WorkIngCacheDAL();
|
|
public void Displayjob()
|
|
{
|
|
GetWorkList(tblock);
|
|
}
|
|
|
|
|
|
#region 获取订单信息
|
|
private void GetWorkList(object block)
|
|
{
|
|
string cm = "";
|
|
cm = "lockdisJob" + block;
|
|
object c = (Object)cm;
|
|
lock (c)
|
|
{
|
|
while (OrisShow)
|
|
{
|
|
|
|
try
|
|
{
|
|
|
|
string workstate = workbll.GetWorkState();
|
|
if (!string.IsNullOrEmpty(workstate))
|
|
{
|
|
OrisShow = true;
|
|
DisplayJob_M(block.ToString());
|
|
Thread.Sleep(50);
|
|
}
|
|
else
|
|
{
|
|
OrisShow = false;
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteLogInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":程序异常!\r\n" + ex.Message);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 标签控制M系列
|
|
public void DisplayJob_M(string tblock)
|
|
{
|
|
|
|
|
|
try
|
|
{
|
|
|
|
|
|
#region 开始作业
|
|
//查询是否有空闲的agv
|
|
//查询待执行的任务
|
|
//更新任务状态为执行中
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteLogInfo("标签控制异常:" + ex.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|