This commit is contained in:
@ -190,6 +190,13 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetOrderWayList(string block = "", string shelfid = "")
|
||||
{
|
||||
return dal.GetOrderWayList(block, shelfid);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetshelfidList(string block = "")
|
||||
{
|
||||
|
@ -30,63 +30,63 @@ namespace Epost.BLL
|
||||
public ResultModel Initialization_T(bool isback = true)
|
||||
{
|
||||
ResultModel resultModel = new ResultModel();
|
||||
//List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
//try
|
||||
//{
|
||||
// DataTable dt = addrBLL.getControlList();
|
||||
// bool result = false;
|
||||
// if (dt != null && dt.Rows.Count > 0)
|
||||
// {
|
||||
// foreach (DataRow item in dt.Rows)
|
||||
// {
|
||||
// LabelParamModel model = new LabelParamModel();
|
||||
// model.ControlIP = item["ControlIP"].ToString();
|
||||
// model.Address = "9999";
|
||||
// model.Command = "FORMAT_JOB_DATA";
|
||||
// model.Parameter = "50";
|
||||
// model.Timeout = "0.5";
|
||||
// list.Add(model);
|
||||
// model = new LabelParamModel();
|
||||
// model.ControlIP = item["ControlIP"].ToString();
|
||||
// model.Address = "9999";
|
||||
// model.Command = "CONNECT";
|
||||
// model.Parameter = IP;
|
||||
// model.Timeout = "0.5";
|
||||
// list.Add(model);
|
||||
// model = new LabelParamModel();
|
||||
// model.ControlIP = item["ControlIP"].ToString();
|
||||
// model.Address = "9999";
|
||||
// model.Parameter = "11111000";
|
||||
// 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);
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
try
|
||||
{
|
||||
DataTable dt = addrBLL.getControlList();
|
||||
bool result = false;
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
model.Address = "9999";
|
||||
model.Command = "FORMAT_JOB_DATA";
|
||||
model.Parameter = "50";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
model.Address = "9999";
|
||||
model.Command = "CONNECT";
|
||||
model.Parameter = IP;
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
model.Address = "9999";
|
||||
model.Parameter = "11111000";
|
||||
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())
|
||||
// {
|
||||
// resultModel = SendALL_Init(list);
|
||||
// }
|
||||
}
|
||||
if (list.Any())
|
||||
{
|
||||
resultModel = SendALL_Init(list);
|
||||
}
|
||||
|
||||
// }
|
||||
// return resultModel;
|
||||
}
|
||||
return resultModel;
|
||||
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
// resultModel.result = "0";
|
||||
// resultModel.msg = "初始化失败!";
|
||||
// LogHelper.WriteLogInfo("初始化异常:" + ex.Message);
|
||||
resultModel.result = "0";
|
||||
resultModel.msg = "初始化失败!";
|
||||
LogHelper.WriteLogInfo("初始化异常:" + ex.Message);
|
||||
|
||||
//}
|
||||
resultModel.result = "0";
|
||||
resultModel.msg = "成功";
|
||||
}
|
||||
//resultModel.result = "0";
|
||||
//resultModel.msg = "成功";
|
||||
return resultModel;
|
||||
}
|
||||
#endregion
|
||||
|
@ -14,30 +14,30 @@ namespace Epost.BLL
|
||||
WmsTaskBLL taskbll = new WmsTaskBLL();
|
||||
public DataTable GetSkuInfoList(string sku)
|
||||
{
|
||||
if (sku.Substring(0, 1) == "2")
|
||||
{
|
||||
if (sku.Substring(1, 1) == "5")
|
||||
{
|
||||
if (sku.Length >= 7)
|
||||
{
|
||||
sku = sku.Substring(2, 6);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sku.Length >= 7)
|
||||
{
|
||||
sku = sku.Substring(1, 6);
|
||||
}
|
||||
}
|
||||
return dal.GetSkuInfo(sku);
|
||||
}
|
||||
else
|
||||
{
|
||||
return dal.GetSkuInfoList(sku);
|
||||
}
|
||||
|
||||
//if (sku.Substring(0, 1) == "2")
|
||||
//{
|
||||
// if (sku.Substring(1, 1) == "5")
|
||||
// {
|
||||
// if (sku.Length >= 7)
|
||||
// {
|
||||
// sku = sku.Substring(2, 6);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (sku.Length >= 7)
|
||||
// {
|
||||
// sku = sku.Substring(1, 6);
|
||||
// }
|
||||
// }
|
||||
// return dal.GetSkuInfo(sku);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return dal.GetSkuInfoList(sku);
|
||||
//}
|
||||
|
||||
return dal.GetSkuInfoList(sku);
|
||||
}
|
||||
|
||||
|
||||
|
@ -409,8 +409,8 @@ namespace Epost.BLL
|
||||
#region 扫描SKU
|
||||
//根据扫描商品内码获取商品码
|
||||
data.ScanCode = data.Parameter;
|
||||
DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
string location = string.Empty;
|
||||
DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
string location = string.Empty;
|
||||
if (sinfodt != null && sinfodt.Rows.Count > 0)
|
||||
{
|
||||
scanStr = sinfodt.Rows[0]["sku"].ToString();
|
||||
@ -510,7 +510,7 @@ namespace Epost.BLL
|
||||
//show.Islock = false;
|
||||
//comBLL.ShowBoxMessage_M(show);
|
||||
//downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
logBLL.SaveShowMesError("商品:" + scanStr + "无任务!", "商品:" + scanStr + "无任务!");
|
||||
logBLL.SaveShowMesError("商品:" + data.ScanCode + "无任务!", "商品:" + data.ScanCode + "无任务!");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user