This commit is contained in:
@ -152,7 +152,13 @@ namespace Epost.BLL
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 获取控制器列表
|
||||
public DataTable getLabelList(string controlid)
|
||||
{
|
||||
return dal.getLabelList(controlid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region 获取所有地址
|
||||
public DataTable getAddressList()
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace Epost.BLL
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString(), batchno);
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString());
|
||||
if (lableDt != null && lableDt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow labelItem in lableDt.Rows)
|
||||
@ -124,14 +124,14 @@ namespace Epost.BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
|
||||
{
|
||||
shopid = labelItem["shopid"].ToString();
|
||||
if (shopid.Length > 4)
|
||||
{
|
||||
shopid = shopid.Substring(shopid.Length-4,4);
|
||||
}
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
|
||||
//{
|
||||
// shopid = labelItem["shopid"].ToString();
|
||||
// if (shopid.Length > 4)
|
||||
// {
|
||||
// shopid = shopid.Substring(shopid.Length-4,4);
|
||||
// }
|
||||
//}
|
||||
LabelParamModel lablemodel = new LabelParamModel();
|
||||
lablemodel.Address = labelItem["address"].ToString();
|
||||
lablemodel.ControlIP = item["ControlIP"].ToString();
|
||||
|
@ -162,22 +162,22 @@ namespace Epost.BLL
|
||||
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())
|
||||
// {
|
||||
// foreach (JobModel mitem in manyJoblist)
|
||||
// {
|
||||
// quantity += mitem.Quantity;
|
||||
// mitem.State = 1;
|
||||
// mitem.ManyState = 1;
|
||||
// }
|
||||
#region 同一个货位的数据合并显示
|
||||
if (manyJoblist.Count > 1)
|
||||
{
|
||||
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||
{
|
||||
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";
|
||||
|
@ -216,17 +216,17 @@ 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);
|
||||
//if (manyList.Any())//合并显示数据
|
||||
//{
|
||||
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation);
|
||||
if (manyList.Any())//合并显示数据
|
||||
{
|
||||
|
||||
// downlist.AddRange(manyList);
|
||||
// LogHelper.WriteLogInfo("合并显示数据=========="+ manyList .Count+ "==================");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
downlist.Add(model);
|
||||
// }
|
||||
downlist.AddRange(manyList);
|
||||
LogHelper.WriteLogInfo("合并显示数据==========" + manyList.Count + "==================");
|
||||
}
|
||||
else
|
||||
{
|
||||
downlist.Add(model);
|
||||
}
|
||||
//修改订单状态
|
||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||
|
Reference in New Issue
Block a user