197 lines
4.7 KiB
C#
197 lines
4.7 KiB
C#
using Epost.DAL;
|
|
using Epost.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Epost.BLL
|
|
{
|
|
public class BoxQueueBLL
|
|
{
|
|
BoxQueueDAL dal = new BoxQueueDAL();
|
|
#region 添加任务信息
|
|
public bool insertQueueOrders(BoxQueueModel model)
|
|
{
|
|
|
|
return dal. insertQueueOrders(model);
|
|
}
|
|
#endregion
|
|
|
|
#region 获取任务队列
|
|
public DataTable getQueueOrder()
|
|
{
|
|
|
|
return dal.getQueuesOrder();
|
|
}
|
|
#endregion
|
|
#region 获取任务队列
|
|
public DataTable getQueuesbyState()
|
|
{
|
|
//DataTable dt = dal.getQueuesbyState();
|
|
//if (dt != null && dt.Rows.Count > 0)
|
|
//{
|
|
// return null;
|
|
//}
|
|
//else
|
|
//{
|
|
return dal.getQueuesOrderbyState();
|
|
//}
|
|
|
|
}
|
|
#endregion
|
|
#region 获取当前区的作业状态
|
|
public DataTable getQueuesOrderbyState(string shopcode,string state)
|
|
{
|
|
|
|
return dal.getQueuesOrderbyState(shopcode,state);
|
|
}
|
|
#endregion
|
|
#region
|
|
public bool UpdateState(string matchid)
|
|
{
|
|
|
|
return dal.UpdateState(matchid);
|
|
}
|
|
#endregion
|
|
|
|
#region 判断箱号是否已绑定完成
|
|
public bool getQueuesBox(string block)
|
|
{
|
|
|
|
DataTable dt= dal.getQueuesBox(block);
|
|
if (dt != null && dt.Rows.Count > 0)
|
|
{
|
|
return false;
|
|
}
|
|
else { return true; }
|
|
}
|
|
#endregion
|
|
|
|
#region 获取当前区的作业状态
|
|
public DataTable getQueueOrderState(BoxQueueModel model)
|
|
{
|
|
|
|
return dal.getQueueOrderState(model);
|
|
}
|
|
#endregion
|
|
|
|
#region 获取当前区的作业状态
|
|
public DataTable getQueueState(BoxQueueModel model)
|
|
{
|
|
|
|
return dal.getQueueState(model);
|
|
}
|
|
#endregion
|
|
|
|
#region 获取当前区的作业状态
|
|
public DataTable getQueueStateByLoc(string loc)
|
|
{
|
|
|
|
return dal.getQueueStateByLoc(loc);
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 获取小车是否正在作业
|
|
public DataTable getQueuesbyCar(string carid)
|
|
{
|
|
|
|
return dal.getQueuesbyCar(carid);
|
|
}
|
|
#endregion
|
|
|
|
#region 获取正在做的订单信息
|
|
public DataTable getBoxDeatil(string Taskblock, string Taskarea)
|
|
{
|
|
return dal.getBoxDeatil(Taskblock, Taskarea);
|
|
}
|
|
#endregion
|
|
#region 获取当前区的作业状态
|
|
public DataTable getQueueOrderStateList(BoxQueueModel model)
|
|
{
|
|
|
|
return dal.getQueueOrderStateList(model);
|
|
}
|
|
#endregion
|
|
#region 获取正在绑定箱号信息
|
|
public DataTable getOrderqueueByAddr(string addr, string ip,string state="2")
|
|
{
|
|
|
|
return dal.getOrderqueueByAddr(addr, ip,state);
|
|
}
|
|
#endregion
|
|
|
|
#region 修改订单状态
|
|
public bool UpdateQueueOrderState(BoxQueueModel model)
|
|
{
|
|
|
|
return dal.UpdateQueueOrderState(model);
|
|
}
|
|
#endregion
|
|
#region 修改订单状态
|
|
public bool UpdateQueueState(string id, string state)
|
|
{
|
|
|
|
return dal.UpdateQueueState(id, state);
|
|
}
|
|
#endregion
|
|
|
|
#region
|
|
public bool UpdateBoxCode(string id, string boxcode,string traycode="")
|
|
{
|
|
|
|
return dal.UpdateBoxCode(id, boxcode, traycode);
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 修改作业区段
|
|
public bool UpdateQueueTaskArea(BoxQueueModel model)
|
|
{
|
|
return dal.UpdateQueueTaskArea(model);
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 修改作业区段
|
|
public bool DeleteQueueOrder(string orderid)
|
|
{
|
|
return dal.DeleteQueueOrder(orderid);
|
|
|
|
}
|
|
#endregion
|
|
#region 修改作业区段
|
|
public bool DeleteQueueByMatch(string matchid)
|
|
{
|
|
return dal.DeleteQueueByMatch(matchid);
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 修改作业区段
|
|
public bool deletequeue()
|
|
{
|
|
return dal.deletequeue();
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 恢复作业
|
|
public bool UpdateQueueState()
|
|
{
|
|
BoxPickBLL bll = new BoxPickBLL();
|
|
dal.deleteBoxpick();
|
|
bool bo = dal.UpdateQueueState();
|
|
if (bo)
|
|
{
|
|
bll.UpdateBoxPickState();
|
|
}
|
|
return bo;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|