This commit is contained in:
@ -135,49 +135,54 @@ namespace Epost.BLL
|
||||
var nowmodel = nowJoblist.FirstOrDefault();
|
||||
|
||||
LogHelper.WriteLogInfo("进入任务点亮=====matchid=" + nowmodel.Matchid + "===orderid===" + nowmodel.OrderID + "=====sku==" + nowmodel.Sku + "========");
|
||||
#region 点亮任务标签
|
||||
foreach (JobModel item in nowJoblist.ToArray())
|
||||
#region 点亮任务标签
|
||||
foreach (JobModel item in nowJoblist.ToArray())
|
||||
{
|
||||
|
||||
//#region 回显设备锁定
|
||||
//if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
||||
//{
|
||||
|
||||
// LabelParamModel locklamodel = new LabelParamModel();
|
||||
// locklamodel.Address = item.Address.ToString();
|
||||
// locklamodel.ControlIP = item.ControlIP.ToString();
|
||||
// locklamodel.Command = "LOCK";
|
||||
// locklamodel.Parameter = "11111000";
|
||||
// locklamodel.Type = "N";
|
||||
// list.Add(locklamodel);
|
||||
|
||||
//}
|
||||
//#endregion
|
||||
// else
|
||||
//{
|
||||
//判断设备当前有没有被点亮
|
||||
List<JobModel> isshowList = jobList.FindAll(p => p.Address == item.Address && p.ControlIP == item.ControlIP && p.State == 1);
|
||||
if (!isshowList.Any())
|
||||
{
|
||||
|
||||
//#region 回显设备锁定
|
||||
//if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
||||
//{
|
||||
|
||||
// LabelParamModel locklamodel = new LabelParamModel();
|
||||
// locklamodel.Address = item.Address.ToString();
|
||||
// locklamodel.ControlIP = item.ControlIP.ToString();
|
||||
// locklamodel.Command = "LOCK";
|
||||
// locklamodel.Parameter = "11111000";
|
||||
// locklamodel.Type = "N";
|
||||
// list.Add(locklamodel);
|
||||
|
||||
//}
|
||||
//#endregion
|
||||
// else
|
||||
//{
|
||||
|
||||
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
||||
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation && m.Address == item.Address);
|
||||
int quantity = item.Quantity;
|
||||
LabelParamModel lamodel = new LabelParamModel();
|
||||
lamodel.Address = item.Address.ToString();
|
||||
lamodel.ControlIP = item.ControlIP.ToString();
|
||||
lamodel.Command = "DISPLAY_JOB";
|
||||
#region 同一个货位的数据合并显示
|
||||
if (manyJoblist.Count > 1)
|
||||
{
|
||||
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||
#region 同一个货位的数据合并显示
|
||||
if (manyJoblist.Count > 1)
|
||||
{
|
||||
foreach (JobModel mitem in manyJoblist)
|
||||
quantity = 0;
|
||||
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||
{
|
||||
quantity += mitem.Quantity;
|
||||
mitem.State = 1;
|
||||
mitem.ManyState = 1;
|
||||
}
|
||||
foreach (JobModel mitem in manyJoblist)
|
||||
{
|
||||
quantity += mitem.Quantity;
|
||||
mitem.State = 1;
|
||||
mitem.ManyState = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
lamodel.Type = "N";
|
||||
|
||||
#endregion
|
||||
lamodel.Type = "N";
|
||||
lamodel.Quantity = quantity.ToString();
|
||||
lamodel.Uid = "U" + item.ID;
|
||||
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
||||
@ -187,6 +192,7 @@ namespace Epost.BLL
|
||||
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
||||
item.DisplayTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 点亮通道灯
|
||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
||||
|
Reference in New Issue
Block a user