This commit is contained in:
@ -83,7 +83,11 @@ namespace Epost.BLL
|
||||
return dal.DeleteQueue(matchid);
|
||||
|
||||
}
|
||||
public bool DeleteQueuebyUser(string strwhere)
|
||||
{
|
||||
return dal.DeleteQueuebyUser(strwhere);
|
||||
|
||||
}
|
||||
public bool DeleteOrderQueue(string matchid, string CancelTime)
|
||||
{
|
||||
return dal.DeleteOrderQueue(matchid, CancelTime);
|
||||
@ -146,6 +150,14 @@ namespace Epost.BLL
|
||||
|
||||
return dal.GetOrderQueue(block,area, state,sku);
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 获取sku是否正在作业
|
||||
public DataTable GetOrderQueueByuser(string state, string usercode)
|
||||
{
|
||||
|
||||
return dal.GetOrderQueueByuser( state, usercode);
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 获取正在绑定箱号信息
|
||||
|
@ -3,11 +3,13 @@ using Epost.DAL.Cache;
|
||||
using Epost.DAL.Enum;
|
||||
using Epost.Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static Epost.DAL.Enum.LightColor;
|
||||
@ -181,6 +183,41 @@ namespace Epost.BLL
|
||||
else if (data.Uid == "09" + "-" + data.Address)//完成灯拍下
|
||||
{
|
||||
LogHelper.WriteLogInfo(data.Address+"end拍下");
|
||||
|
||||
List<JobModel> offList = jobList.FindAll(m => m.Block == block && m.Area == area && m.Address == data.Address && m.ControlIP == data.IP && m.State == 3 );
|
||||
if (offList.Any())
|
||||
{
|
||||
JobModel model = offList.FirstOrDefault();
|
||||
|
||||
#region 修改任务队列状态
|
||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||
qumodel.State = 3;
|
||||
qumodel.Taskblock = block;
|
||||
qumodel.Taskarea = area;
|
||||
qumodel.Sku = model.Sku;
|
||||
qumodel.Matchid = model.Matchid;
|
||||
qumodel.UserCode = model.UserCode;
|
||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||
#endregion
|
||||
|
||||
bool bo = orderbll.IsSkuFinishWork("", model.Matchid);
|
||||
if (bo)
|
||||
{
|
||||
LogHelper.WriteLogInfo("波次拣选完成");
|
||||
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList();
|
||||
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);//删除波次信息
|
||||
}
|
||||
Thread.Sleep(30);
|
||||
#region 清除当前区已做完的sku
|
||||
JobCache.UpdateJobModelList(offList, EcommendType.Execute);
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (data.Result == "4")//■按键拍下
|
||||
{
|
||||
@ -263,21 +300,7 @@ namespace Epost.BLL
|
||||
comBLL.DISPLAY_JOB(lamodel);
|
||||
#endregion
|
||||
|
||||
#region 修改任务队列状态
|
||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||
qumodel.State = 3;
|
||||
qumodel.Taskblock = block;
|
||||
qumodel.Taskarea = area;
|
||||
qumodel.Sku = model.Sku;
|
||||
qumodel.Matchid = model.Matchid;
|
||||
qumodel.UserCode = model.UserCode;
|
||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||
#endregion
|
||||
Thread.Sleep(30);
|
||||
|
||||
#region 清除当前区已做完的sku
|
||||
JobCache.UpdateJobModelList(offList, EcommendType.Execute);
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -343,16 +343,28 @@ namespace Epost.BLL
|
||||
umodel.UserCode = scanStr;
|
||||
//根据工号查询对应灯色
|
||||
UserBLL userbll = new UserBLL();
|
||||
DataTable userdt= userbll.getUserColor(scanStr);
|
||||
DataTable userdt= userbll.getUserColor(scanStr);
|
||||
if (userdt != null && userdt.Rows.Count > 0)
|
||||
{
|
||||
bool bo= queueBLL.UpdateQueueByUser(scanStr, userdt.Rows[0]["lightcolor"].ToString());
|
||||
if (!bo)
|
||||
DataTable skudt = queueBLL.GetOrderQueueByuser("1", scanStr);
|
||||
if (skudt != null && skudt.Rows.Count > 0)
|
||||
{
|
||||
//无待启动的商品
|
||||
LogHelper.WriteLogInfo("无待启动的商品,请先扫描商品"+scanStr,LogHelper.Log_Type.ERROR);
|
||||
logBLL.SaveShowMesError("无待启动的商品,请先扫描商品", "无待启动的商品,请先扫描商品");
|
||||
LogHelper.WriteLogInfo(scanStr + "工号任务未完成", LogHelper.Log_Type.ERROR);
|
||||
logBLL.SaveShowMesError(scanStr+"工号任务未完成", scanStr + "工号任务未完成");
|
||||
queueBLL.DeleteQueuebyUser(" and state = 2");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool bo = queueBLL.UpdateQueueByUser(scanStr, userdt.Rows[0]["lightcolor"].ToString());
|
||||
if (!bo)
|
||||
{
|
||||
//无待启动的商品
|
||||
LogHelper.WriteLogInfo("无待启动的商品,请先扫描商品" + scanStr, LogHelper.Log_Type.ERROR);
|
||||
logBLL.SaveShowMesError("无待启动的商品,请先扫描商品", "无待启动的商品,请先扫描商品");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
//无此工号
|
||||
|
Reference in New Issue
Block a user