This commit is contained in:
帅凯 贾
2023-04-19 14:42:48 +08:00
parent efe0835c4e
commit 70ebea6292
3 changed files with 52 additions and 56 deletions

View File

@ -48,7 +48,7 @@ namespace Epost.BLL
try
{
bool t = addrBLL.UpdateState();
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@----V20220705-1---");
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@----V20230418-1---");
JobCache.ClearJobList();
downCacheDAL.ClearJobDownList();
locCache.ClearScanList();
@ -62,11 +62,6 @@ namespace Epost.BLL
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@----V20200727-1---");
return resultModel;
}
catch (Exception ex)
@ -560,53 +555,53 @@ namespace Epost.BLL
#region
foreach (JobModel item in nowJoblist.ToArray())
{
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
int quantity = item.Quantity;
#region
if (manyJoblist.Count > 1)//同一个货位的数据合并显示
if (item.State == 0)
{
quantity = 0;
if (manyJoblist.FindAll(m => m.State == 0).Any())
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
int quantity = item.Quantity;
#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
LabelParamModel lamodel = new LabelParamModel();
string address = item.Address.ToString();
lamodel.Address = address;
lamodel.ControlIP = item.ControlIP.ToString();
lamodel.Command = "DISPLAY_JOB";
lamodel.Uid = item.ID;
lamodel.Type = "N";
lamodel.Quantity = quantity.ToString();
lamodel.Uid = item.ID;
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
list.Add(lamodel);
item.State = 1;
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
item.DisplayTime = DateTime.Now;
}
#endregion
LabelParamModel lamodel = new LabelParamModel();
string address = item.Address.ToString();
lamodel.Address = address;
lamodel.ControlIP = item.ControlIP.ToString();
lamodel.Command = "DISPLAY_JOB";
lamodel.Uid = item.ID;
lamodel.Type = "N";
lamodel.Quantity = quantity.ToString();
lamodel.Uid = item.ID;
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
list.Add(lamodel);
item.State = 1;
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
item.DisplayTime = DateTime.Now;
}
#endregion
#region
//comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
#endregion
if (list != null && list.Count > 0)
{
LogHelper.WriteLogInfo("添加到点亮的list————————————————————" + list.Count);
comBLL.DISPLAY_JOBALL(list);
#region
//comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
#endregion
if (list != null && list.Count > 0)
{
LogHelper.WriteLogInfo("添加到点亮的list————————————————————" + list.Count);
comBLL.DISPLAY_JOBALL(list);
}
}
}
else