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");
|
||||
|
@ -216,12 +216,16 @@ namespace Epost.BLL
|
||||
List<JobModel> downlist = new List<JobModel>();
|
||||
JobModel model = job.FirstOrDefault();
|
||||
|
||||
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation);
|
||||
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation && m.Address == model.Address);
|
||||
if (manyList.Any())//合并显示数据
|
||||
{
|
||||
|
||||
downlist.AddRange(manyList);
|
||||
LogHelper.WriteLogInfo("合并显示数据==========" + manyList.Count + "==================");
|
||||
foreach (JobModel many in manyList)
|
||||
{
|
||||
many.State = 3;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -240,7 +244,7 @@ namespace Epost.BLL
|
||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SPECIAL_STATUS" && p.Area == area);
|
||||
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
||||
//熄灭通道灯
|
||||
comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
||||
// comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
||||
|
||||
#region 熄灭当前区显示屏
|
||||
List<JobModel> offList = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 3 && m.Sku == model.Sku);
|
||||
|
Reference in New Issue
Block a user