This commit is contained in:
@ -27,7 +27,7 @@ namespace Epost.BLL
|
||||
string IP = ConfigurationManager.AppSettings["WebAPIUrl"];
|
||||
|
||||
#region 初始化数据
|
||||
public ResultModel Initialization_M(bool isback = true)
|
||||
public ResultModel Initialization_T(bool isback = true)
|
||||
{
|
||||
ResultModel resultModel = new ResultModel();
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
@ -60,6 +60,12 @@ namespace Epost.BLL
|
||||
model.Command = "UNLOCK";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
model.Address = "9999";
|
||||
model.Command = "LED_OFF";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
|
||||
}
|
||||
if (list.Any())
|
||||
@ -84,7 +90,7 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
#region 设备检测 查询所有标签
|
||||
public ResultModel GetAllLabelList_M()
|
||||
public ResultModel GetAllLabelList_M(string batchno)
|
||||
{
|
||||
ResultModel model = new ResultModel();
|
||||
try
|
||||
@ -96,11 +102,12 @@ namespace Epost.BLL
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString());
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString(), batchno);
|
||||
if (lableDt != null && lableDt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow labelItem in lableDt.Rows)
|
||||
{
|
||||
string shopid = labelItem["address"].ToString();
|
||||
if (labelItem["addresstype"].ToString() == "2")
|
||||
{
|
||||
LabelParamModel CNlablemodel = new LabelParamModel();
|
||||
@ -115,12 +122,20 @@ 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);
|
||||
}
|
||||
}
|
||||
LabelParamModel lablemodel = new LabelParamModel();
|
||||
lablemodel.Address = labelItem["address"].ToString();
|
||||
lablemodel.ControlIP = item["ControlIP"].ToString();
|
||||
lablemodel.Command = "DISPLAY_JOB";
|
||||
lablemodel.Type = "N";
|
||||
lablemodel.Quantity = labelItem["address"].ToString();
|
||||
lablemodel.Quantity = shopid;
|
||||
lablemodel.Uid = labelItem["address"].ToString();
|
||||
lablemodel.Mode = "10";
|
||||
list.Add(lablemodel);
|
||||
@ -432,6 +447,7 @@ namespace Epost.BLL
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
FORMATE_JOB_DATA(model);
|
||||
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user