This commit is contained in:
@ -36,53 +36,50 @@ namespace Epost.BLL
|
||||
public ResultModel Initialization_M(bool isback = true)
|
||||
{
|
||||
ResultModel resultModel = new ResultModel();
|
||||
resultModel.result = "0";
|
||||
resultModel.msg = "成功";
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
try
|
||||
{
|
||||
DataTable dt = addrBLL.QueryControlList("");
|
||||
|
||||
DataTable dt = addrBLL.getControlList();
|
||||
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 = "job";
|
||||
model.Command = "START_POLLING";
|
||||
model.Timeout = "0.03";
|
||||
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);
|
||||
|
||||
|
||||
string ipaddress = item["controlip"].ToString().Trim();
|
||||
List<LightcontrolModel> conlist = cachedal.GetControlList().FindAll(o => o.controlip == ipaddress);
|
||||
if (conlist != null && conlist.Count > 0)
|
||||
}
|
||||
if (list.Any())
|
||||
{
|
||||
LogHelper.WriteLogInfo(ipaddress + "已连接!");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int port = Convert.ToInt32(item["port"].ToString().Trim());
|
||||
int timeout = 2000;
|
||||
bool bo = lig.Connect(ipaddress, port, timeout);//timeout 毫秒
|
||||
if (bo)
|
||||
{
|
||||
LightcontrolModel model = new LightcontrolModel();
|
||||
model.controlip = ipaddress;
|
||||
model.maincontrol = lig;
|
||||
model.port = port;
|
||||
cachedal.UpdateControlList(new List<LightcontrolModel> { model }, EcontrolCommend.Create);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("连接失败" + ipaddress);
|
||||
resultModel.result = "-1";
|
||||
resultModel.msg = "连接失败" + ipaddress;
|
||||
return resultModel;
|
||||
}
|
||||
}
|
||||
resultModel = SendALL_Init(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return resultModel;
|
||||
|
||||
}
|
||||
@ -96,6 +93,72 @@ namespace Epost.BLL
|
||||
}
|
||||
return resultModel;
|
||||
}
|
||||
//public ResultModel Initialization_M(bool isback = true)
|
||||
//{
|
||||
// ResultModel resultModel = new ResultModel();
|
||||
// resultModel.result = "0";
|
||||
// resultModel.msg = "成功";
|
||||
// List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
// try
|
||||
// {
|
||||
// DataTable dt = addrBLL.QueryControlList("");
|
||||
|
||||
// if (dt != null && dt.Rows.Count > 0)
|
||||
// {
|
||||
// foreach (DataRow item in dt.Rows)
|
||||
// {
|
||||
|
||||
|
||||
// string ipaddress = item["controlip"].ToString().Trim();
|
||||
// List<LightcontrolModel> conlist = cachedal.GetControlList().FindAll(o => o.controlip == ipaddress);
|
||||
// if (conlist != null && conlist.Count > 0)
|
||||
// {
|
||||
// LogHelper.WriteLogInfo(ipaddress + "已连接!");
|
||||
// Ledonoff_dengdai("0", "");
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int port = Convert.ToInt32(item["port"].ToString().Trim());
|
||||
// int timeout = 2000;
|
||||
// bool bo = lig.Connect(ipaddress, port, timeout);//timeout 毫秒
|
||||
// if (bo)
|
||||
// {
|
||||
// LightcontrolModel model = new LightcontrolModel();
|
||||
// model.controlip = ipaddress;
|
||||
// model.maincontrol = lig;
|
||||
// model.port = port;
|
||||
// cachedal.UpdateControlList(new List<LightcontrolModel> { model }, EcontrolCommend.Create);
|
||||
// Ledonoff_dengdai("0", "");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// LogHelper.WriteLogInfo("连接失败" + ipaddress);
|
||||
// resultModel.result = "-1";
|
||||
// resultModel.msg = "连接失败" + ipaddress;
|
||||
// return resultModel;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// return resultModel;
|
||||
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
|
||||
// resultModel.result = "0";
|
||||
// resultModel.msg = "初始化失败!";
|
||||
// LogHelper.WriteLogInfo("初始化异常:" + ex.Message);
|
||||
|
||||
// }
|
||||
// return resultModel;
|
||||
//}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 设备检测 查询所有标签
|
||||
@ -513,35 +576,32 @@ namespace Epost.BLL
|
||||
#region 清除所有任务并熄灭通道灯
|
||||
public void CloseALL_M()
|
||||
{
|
||||
//DataTable dt = addrBLL.getControlList();
|
||||
DataTable dt = addrBLL.getControlList();
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
|
||||
//if (dt != null && dt.Rows.Count > 0)
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
FORMATE_JOB_DATA(model);
|
||||
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//List<LightcontrolModel> conlist = cachedal.GetControlList();
|
||||
//if (conlist.Any() && conlist.Count > 0)
|
||||
//{
|
||||
// foreach (DataRow item in dt.Rows)
|
||||
// Ledonoff_dengdai("0","");
|
||||
// Thread.Sleep(500);
|
||||
// foreach (LightcontrolModel con in conlist)
|
||||
// {
|
||||
|
||||
// LabelParamModel model = new LabelParamModel();
|
||||
// model.ControlIP = item["ControlIP"].ToString();
|
||||
// FORMATE_JOB_DATA(model);
|
||||
|
||||
// bool b = con.maincontrol.DisConnect(con.controlip, con.port);
|
||||
// LogHelper.WriteLogInfo(b + "断开连接" + con.controlip + "==" + con.port);
|
||||
// }
|
||||
|
||||
//}
|
||||
List<LightcontrolModel> conlist = cachedal.GetControlList();
|
||||
if (conlist.Any() && conlist.Count > 0)
|
||||
{
|
||||
Ledonoff_dengdai("0","");
|
||||
Thread.Sleep(500);
|
||||
foreach (LightcontrolModel con in conlist)
|
||||
{
|
||||
bool b = con.maincontrol.DisConnect(con.controlip, con.port);
|
||||
LogHelper.WriteLogInfo(b + "断开连接" + con.controlip + "==" + con.port);
|
||||
}
|
||||
}
|
||||
cachedal.ClearControlList();
|
||||
|
||||
|
||||
|
||||
//cachedal.ClearControlList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -15,6 +15,7 @@ namespace Epost.BLL
|
||||
public class ErrorLogBLL
|
||||
{
|
||||
ErrorLogDAL dal = new ErrorLogDAL();
|
||||
|
||||
#region 添加日志
|
||||
public bool InsertErrorLog(ErrorLogModel model)
|
||||
{
|
||||
@ -79,23 +80,51 @@ namespace Epost.BLL
|
||||
|
||||
public void SaveSysytemError(string caozuo, string error)
|
||||
{
|
||||
string username = string.Empty;
|
||||
|
||||
ErrorLogBLL logBLL = new ErrorLogBLL();
|
||||
ErrorLogModel error_model = new ErrorLogModel();
|
||||
error_model.Type = "2";
|
||||
error_model.Remark = caozuo + "" + error;
|
||||
error_model.Title = caozuo;
|
||||
error_model.Remark = error;
|
||||
error_model.UserName = username;
|
||||
logBLL.InsertErrorLog(error_model);
|
||||
|
||||
}
|
||||
|
||||
public void SaveOperateError(string caozuo, string error)
|
||||
{
|
||||
string username = string.Empty;
|
||||
|
||||
ErrorLogBLL logBLL = new ErrorLogBLL();
|
||||
|
||||
ErrorLogModel error_model = new ErrorLogModel();
|
||||
error_model.Type = "3";
|
||||
error_model.Remark = caozuo + "操作" + error;
|
||||
error_model.Title = caozuo;
|
||||
error_model.Remark = error;
|
||||
error_model.UserName = username;
|
||||
logBLL.InsertErrorLog(error_model);
|
||||
|
||||
}
|
||||
public long DeleteLog(string type)
|
||||
{
|
||||
|
||||
long x = dal.DeleteLog(type);
|
||||
return x;
|
||||
}
|
||||
|
||||
public void SaveShowMesError(string Title, string Remark, string type = "999")
|
||||
{
|
||||
|
||||
|
||||
ErrorLogBLL logBLL = new ErrorLogBLL();
|
||||
ErrorLogModel error_model = new ErrorLogModel();
|
||||
error_model.Type = type;
|
||||
error_model.Title = Title;
|
||||
error_model.Remark = Remark;
|
||||
|
||||
logBLL.InsertErrorLog(error_model);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -375,10 +375,10 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
#region 修改订单状态
|
||||
public void UpdateOrderState_Car(string matchid,string fromlocation,string oprationstate)
|
||||
public void UpdateOrderState_Car(string matchid,string tolocation, string oprationstate)
|
||||
{
|
||||
|
||||
dal.UpdateWorkState_Car(matchid, fromlocation, oprationstate);
|
||||
dal.UpdateWorkState_Car(matchid, tolocation, oprationstate);
|
||||
|
||||
|
||||
|
||||
@ -719,6 +719,9 @@ namespace Epost.BLL
|
||||
demodel.Tolocation = item["fromlocation"].ToString();
|
||||
demodel.Sku = item["sku"].ToString();
|
||||
demodel.Matchid = matchid;
|
||||
demodel.FromTolocation = item["tolocation"].ToString();
|
||||
demodel.ControlIP = item["ControlIP"].ToString();
|
||||
demodel.Address = item["Address"].ToString();
|
||||
#region 获取库位信息
|
||||
demodel.Block = item["Block"].ToString();
|
||||
demodel.Area = item["Area"].ToString();
|
||||
@ -730,7 +733,7 @@ namespace Epost.BLL
|
||||
|
||||
//修改数据为已读
|
||||
// dal.UpOrder_Car(item["Matchid"].ToString(), item["sku"].ToString(), item["id"].ToString());
|
||||
UpdateOrderState_Car(matchid, demodel.Tolocation, "1");
|
||||
UpdateOrderState_Car(matchid, demodel.FromTolocation, "1");
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Epost.BLL
|
||||
ShowMesCacheDAL msgCache = new ShowMesCacheDAL();
|
||||
LocationCacheDAL locCache = new LocationCacheDAL();
|
||||
BoxCodeCacheDAL boxcache = new BoxCodeCacheDAL();
|
||||
|
||||
ErrorLogBLL logBLL = new ErrorLogBLL();
|
||||
|
||||
private static object lockobj = new object();
|
||||
private static object lockJobDown = new object();
|
||||
@ -564,19 +564,27 @@ namespace Epost.BLL
|
||||
{
|
||||
#region 点亮灯带格口
|
||||
//先熄灭
|
||||
comBLL.Ledonoff_dengdai("0", "");
|
||||
//comBLL.Ledonoff_dengdai("0", "");
|
||||
//Thread.Sleep(100);
|
||||
//comBLL.display_dengdai(item.Tolocation, "2");
|
||||
comBLL.LED_OFF_CLEAR(item.ControlIP);
|
||||
Thread.Sleep(100);
|
||||
comBLL.display_dengdai(item.Tolocation, "2");
|
||||
LabelParamModel lamodel = new LabelParamModel();
|
||||
lamodel.Address = item.Address;
|
||||
lamodel.ControlIP = item.ControlIP;
|
||||
lamodel.Parameter = "40000001";
|
||||
comBLL.LED_ON_M(lamodel);
|
||||
#endregion
|
||||
item.State = 3;
|
||||
item.DisplayTime = DateTime.Now;
|
||||
#region 更新订单状态
|
||||
orderbll.UpdateOrderState_Car(item.Matchid, item.Tolocation, "3");
|
||||
orderbll.UpdateOrderState_Car(item.Matchid, item.FromTolocation, "3");
|
||||
model.State = 3;
|
||||
bool allfinish = orderbll.IsFinishWorkByCar(1, item.Matchid);
|
||||
if (allfinish)//判断整个波次是否已完成
|
||||
{ //更新state状态为已完成
|
||||
orderbll.UpdateStateByCar(item.Matchid);
|
||||
// orderbll.UpdateStateByCar(item.Matchid);
|
||||
// comBLL.Ledonoff_dengdai("0", "");
|
||||
//删除波次信息
|
||||
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList();
|
||||
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);
|
||||
@ -621,11 +629,11 @@ namespace Epost.BLL
|
||||
string matchid = string.Empty;
|
||||
#region 提示请扫描波次号
|
||||
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);//
|
||||
bool isnum = ConvertHexHelper.IsNum(scanStr.Substring(0, 1));//判断扫描首字母是否是数字
|
||||
bool isnum = true;//ConvertHexHelper.IsNum(scanStr.Substring(0, 1));//判断扫描首字母是否是数字
|
||||
|
||||
if (!ulist.Any())
|
||||
{
|
||||
if (scanStr.Substring(0, 1) == "S") //扫描分播墙号
|
||||
if (scanStr.Substring(0, 1) == "S"&&scanStr.Length==3) //扫描分播墙号
|
||||
{
|
||||
UserCodeModel umodel = new UserCodeModel();
|
||||
umodel.Matchid = data.Parameter;//分播墙号
|
||||
@ -634,10 +642,12 @@ namespace Epost.BLL
|
||||
umodel.Area = sarea;
|
||||
UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create);
|
||||
LogHelper.WriteLogInfo("扫描播种墙号" + data.Parameter);
|
||||
logBLL.SaveShowMesError("请扫描物料开始分播", "请扫描物料开始分播");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo(scanStr + "请扫描正确的播种墙号");
|
||||
logBLL.SaveShowMesError("请扫描正确的播种墙号", "请扫描正确的播种墙号");
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
@ -792,38 +802,26 @@ namespace Epost.BLL
|
||||
#region 细分播种
|
||||
public void xifenBind(List<UserCodeModel> ulist, string scanStr, ResultMessageModel data, string matchid, bool isnum)
|
||||
{
|
||||
|
||||
|
||||
if (scanStr.Substring(0, 1) == "U")
|
||||
{
|
||||
#region 扫描工号
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
umodel.UserCode = scanStr;
|
||||
if (scanStr.Substring(0, 1) == "U")
|
||||
{
|
||||
#region 扫描工号
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "请扫描sku开始作业!";
|
||||
show.Contents = "";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 8;
|
||||
show.Islock = true;
|
||||
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
#endregion
|
||||
}
|
||||
umodel.UserCode = scanStr;
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
#endregion
|
||||
}
|
||||
else if (scanStr.Substring(0, 1) == "S" && scanStr.Length == 3) //扫描分播墙号
|
||||
{
|
||||
umodel.Matchid = scanStr;
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#region 扫描商品
|
||||
|
||||
List<ResultMessageModel> hangList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Parameter == "888888");
|
||||
|
||||
if (hangList.Any())
|
||||
{
|
||||
|
||||
@ -856,39 +854,19 @@ namespace Epost.BLL
|
||||
#region 扫描SKU
|
||||
//根据扫描商品内码获取商品码
|
||||
data.ScanCode = data.Parameter;
|
||||
//DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
//string location = string.Empty;
|
||||
//if (sinfodt != null && sinfodt.Rows.Count > 0)
|
||||
//{
|
||||
// scanStr = sinfodt.Rows[0]["sku"].ToString();
|
||||
// location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
|
||||
//}
|
||||
//data.Parameter = scanStr;
|
||||
DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "3");
|
||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Address == data.Address && m.Parameter == scanStr && m.Parameter != "888888" && m.Block == data.Block && m.Area == data.Area);
|
||||
|
||||
if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0))
|
||||
{ //重复扫描
|
||||
//ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
//show.Title = scanStr + "重复扫描/已拣配!";
|
||||
//show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
//show.Block = sblock;
|
||||
//show.Area = sarea;
|
||||
//show.Type = 8;
|
||||
//comBLL.ShowBoxMessage_M(show);
|
||||
{
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DataTable OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block);
|
||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||
{
|
||||
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||
qmodel.Sku = scanStr;
|
||||
qmodel.Taskblock = data.Block;
|
||||
@ -898,33 +876,14 @@ namespace Epost.BLL
|
||||
qmodel.Location = scanStr;
|
||||
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
queueBLL.insertQueueOrders(qmodel);
|
||||
//提示需要拣货总量/商品名称
|
||||
//showSummaryMes(scanStr, data.Block, data.Area, 1, data, "", OrderDt.Rows[0]["matchid"].ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
//提示无任务
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "商品:" + scanStr + "当前区无任务!";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 8;
|
||||
show.Islock = false;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
logBLL.SaveShowMesError("扫描:" + scanStr + "无任务!", "扫描:" + scanStr + "无任务!");
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -935,7 +894,7 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -317,7 +317,7 @@ namespace Epost.DAL
|
||||
{
|
||||
var sdlist = alllist.FirstOrDefault(x => x.Key == item["ControlIP"].ToString());
|
||||
HttpHelper http = new HttpHelper();
|
||||
string ControlIP = "http://" + item["ControlIP"].ToString() + ":8000/param/";
|
||||
string ControlIP = "http://" + item["ControlIP"].ToString() + ":81/cgi-bin/rpc.cgi";
|
||||
// LogHelper.WriteLogInfo(ControlIP + "***************");
|
||||
string result = "";
|
||||
List<SendParamModel> list = new List<SendParamModel>();
|
||||
@ -363,7 +363,7 @@ namespace Epost.DAL
|
||||
foreach (ResultsModel res in resultModel)
|
||||
{
|
||||
|
||||
if (res.Status == "ERROR")
|
||||
if (res.Status == "ERROR"&&res.Command!= "START_POLLING")
|
||||
{
|
||||
LogHelper.WriteLogInfo("初始化指令" + postStr);
|
||||
rest.result = "-1";
|
||||
@ -572,7 +572,7 @@ namespace Epost.DAL
|
||||
{
|
||||
ResultsModel resultModel = new ResultsModel();
|
||||
HttpHelper http = new HttpHelper();
|
||||
string ControlIP = "http://" + model.ControlIP + ":8000/param/";
|
||||
string ControlIP = "http://" + model.ControlIP + ":81/cgi-bin/rpc.cgi";
|
||||
string result = "";
|
||||
SendParamModel sendModel = new SendParamModel();
|
||||
sendModel.Address = model.Address;
|
||||
@ -627,7 +627,7 @@ namespace Epost.DAL
|
||||
{
|
||||
var sdlist = alllist.FirstOrDefault(x => x.Key == item["ControlIP"].ToString());
|
||||
HttpHelper http = new HttpHelper();
|
||||
string ControlIP = "http://" + item["ControlIP"].ToString() + ":8000/param/";
|
||||
string ControlIP = "http://" + item["ControlIP"].ToString() + ":81/cgi-bin/rpc.cgi";
|
||||
// LogHelper.WriteLogInfo(ControlIP + "***************");
|
||||
string result = "";
|
||||
List<SendParamModel> list = new List<SendParamModel>();
|
||||
@ -671,8 +671,8 @@ namespace Epost.DAL
|
||||
LogHelper.WriteLogInfo("点亮指令" + postStr);
|
||||
ErrorLogDAL errdal = new ErrorLogDAL();
|
||||
ErrorLogModel errmodel = new ErrorLogModel();
|
||||
errmodel.Address = res.Address;
|
||||
errmodel.ControlIP = item["ControlIP"].ToString();
|
||||
errmodel.Remark = res.Address;
|
||||
errmodel.Title = item["ControlIP"].ToString();
|
||||
|
||||
//if (res.Parameter.Contains("E16"))
|
||||
//{
|
||||
|
@ -13,21 +13,18 @@ namespace Epost.DAL
|
||||
public class ErrorLogDAL
|
||||
{
|
||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||
|
||||
#region 添加日志
|
||||
public bool InsertErrorLog(ErrorLogModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string sql = string.Format("insert into errorlog(username,ControlIP,ControlID,Address,ErrorDate,Type,BkAddress,Remark) values('{0}','{1}','{2}','{3}','{4}',{5},'{6}','{7}')",
|
||||
string sql = string.Format("insert into errorlog(username,ErrorDate,Type,title,Remark) values('{0}','{1}','{2}','{3}','{4}')",
|
||||
model.UserName,
|
||||
model.ControlIP,
|
||||
model.ControlID,
|
||||
model.Address,
|
||||
|
||||
DateTime.Now.ToString(),
|
||||
model.Type,
|
||||
model.BkAddress,
|
||||
model.Title,
|
||||
model.Remark);
|
||||
int x = db.InsertSql(sql);
|
||||
if (x > 0)
|
||||
@ -84,7 +81,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql.Append("order by Id asc");
|
||||
strSql.Append("order by Id desc");
|
||||
}
|
||||
strSql.Append(")AS Row, T.* from ErrorLog T WITH(NOLOCK) ");
|
||||
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||
@ -114,10 +111,25 @@ namespace Epost.DAL
|
||||
{
|
||||
LogHelper.WriteLog(GetType(), ex.Message);
|
||||
recordCount = 0;
|
||||
return new List<Model.ErrorLogModel>();
|
||||
return new List<ErrorLogModel>();
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public long DeleteLog(string type)
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
strwhere = " and type ='" + type + "'";
|
||||
|
||||
|
||||
}
|
||||
|
||||
string sql = string.Format("delete from errorlog where 1=1 " + strwhere + "");
|
||||
return db.DeleteSql(sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ namespace Epost.DAL
|
||||
string sql = string.Empty;
|
||||
if (!string.IsNullOrEmpty(area))
|
||||
{
|
||||
sql = string.Format("select distinct fromlocation,sku,block,area from v_orders where state = 0 and oprationstate <>3 and (sku = '{0}' or fromlocation='{0}') and block = '{1}' and area='{2}' " + strwhere + "",
|
||||
sql = string.Format("select distinct tolocation,fromlocation,sku,block,area,address,controlip from v_orders where state = 0 and oprationstate <>3 and (sku = '{0}' or tolocation='{0}') and block = '{1}' and area='{2}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block, area);
|
||||
@ -56,7 +56,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = string.Format("select distinct fromlocation,block,area from v_orders where state = 0 and oprationstate <>3 (and sku = '{0}'or fromlocation='{0}') and block = '{1}' " + strwhere + "",
|
||||
sql = string.Format("select distinct tolocation,fromlocation,block,area ,address,controlip from v_orders where state = 0 and oprationstate <>3 (and sku = '{0}'or tolocation='{0}') and block = '{1}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block);
|
||||
@ -622,17 +622,17 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 修改当前标签拣货状态
|
||||
public bool UpdateWorkState_Car(string matchid,string fromlocation,string oprationstate )
|
||||
public bool UpdateWorkState_Car(string matchid,string tolocation, string oprationstate )
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (uplock)
|
||||
{
|
||||
string upsql = string.Format("update orders set oprationstate = '{0}' ,oprationtime='{1}' ,truequantity=quantity where matchid='{2}' and fromlocation='{3}' ",
|
||||
string upsql = string.Format("update orders set oprationstate = '{0}' ,oprationtime='{1}' ,truequantity=quantity where matchid='{2}' and tolocation='{3}' ",
|
||||
oprationstate,
|
||||
DateTime.Now.ToString(),
|
||||
matchid,
|
||||
fromlocation
|
||||
tolocation
|
||||
);
|
||||
long x = db.UpdateSql(upsql);
|
||||
if (x > 0)
|
||||
|
@ -8,16 +8,15 @@ namespace Epost.Model
|
||||
{
|
||||
public class ErrorLogModel
|
||||
{
|
||||
private int _ID ;
|
||||
private string _ControlIP = string.Empty;
|
||||
private string _ControlID = string.Empty;
|
||||
private string _Address = string.Empty;
|
||||
private int _ID;
|
||||
|
||||
private DateTime _ErrorDate;
|
||||
private string _Type = string.Empty;
|
||||
private string _BkAddress = string.Empty;
|
||||
|
||||
private string _Remark = string.Empty;
|
||||
private long _Row = 0;
|
||||
private string _UserName = string.Empty;
|
||||
private string _Title = string.Empty;
|
||||
public int _PageIndex = 0;
|
||||
public int _PageSize = 0;
|
||||
|
||||
@ -69,44 +68,7 @@ namespace Epost.Model
|
||||
_UserName = value;
|
||||
}
|
||||
}
|
||||
public string ControlIP
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ControlIP;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_ControlIP = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ControlID
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ControlID;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_ControlID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Address;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_Address = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime ErrorDate
|
||||
{
|
||||
@ -134,18 +96,6 @@ namespace Epost.Model
|
||||
}
|
||||
}
|
||||
|
||||
public string BkAddress
|
||||
{
|
||||
get
|
||||
{
|
||||
return _BkAddress;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_BkAddress = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Remark
|
||||
{
|
||||
@ -172,5 +122,7 @@ namespace Epost.Model
|
||||
_ID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Title { get => _Title; set => _Title = value; }
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ namespace Epost.Model
|
||||
|
||||
private string _BatchId = string.Empty;
|
||||
private string _Tolocation = string.Empty;
|
||||
private string _FromTolocation = string.Empty;
|
||||
|
||||
private string _Sku = string.Empty;
|
||||
private string _GoodsName = string.Empty;
|
||||
private string _Discount = string.Empty;//规格
|
||||
@ -74,6 +76,19 @@ namespace Epost.Model
|
||||
}
|
||||
}
|
||||
|
||||
public string FromTolocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return _FromTolocation;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_FromTolocation = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Sku
|
||||
{
|
||||
get
|
||||
|
@ -7,7 +7,7 @@
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<_PublishTargetUrl>D:\驿传\T系列\taitan_songjiang_dengdai</_PublishTargetUrl>
|
||||
<History>True|2023-11-30T11:07:23.8812051Z;True|2023-04-23T15:53:28.0062911+08:00;True|2023-04-22T10:28:09.9896404+08:00;True|2023-04-20T10:35:53.5768979+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
||||
<History>True|2023-12-29T09:18:53.8690686Z;True|2023-12-26T15:40:46.3666722+08:00;True|2023-12-25T15:43:42.7553160+08:00;True|2023-12-15T15:23:23.0482897+08:00;True|2023-12-15T13:44:34.3203359+08:00;False|2023-12-15T13:42:34.6149508+08:00;True|2023-12-14T17:25:24.5353788+08:00;True|2023-11-30T19:07:23.8812051+08:00;True|2023-04-23T15:53:28.0062911+08:00;True|2023-04-22T10:28:09.9896404+08:00;True|2023-04-20T10:35:53.5768979+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@ -33,19 +33,19 @@
|
||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.compiled">
|
||||
<publishTime>11/30/2023 19:14:26</publishTime>
|
||||
<publishTime>12/29/2023 17:18:49</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.dll">
|
||||
<publishTime>11/30/2023 19:14:26</publishTime>
|
||||
<publishTime>12/29/2023 17:18:49</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>02/24/2020 15:29:24</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Common.dll">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:37</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Common.pdb">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:37</publishTime>
|
||||
</File>
|
||||
<File Include="bin/ComposerSDK.dll">
|
||||
<publishTime>04/29/2020 16:50:14</publishTime>
|
||||
@ -63,31 +63,31 @@
|
||||
<publishTime>10/23/2017 13:15:20</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.dll">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.pdb">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
||||
<publishTime>08/26/2020 18:09:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DAL.dll">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DAL.pdb">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/29/2023 17:18:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DPS.dll">
|
||||
<publishTime>11/30/2023 19:14:06</publishTime>
|
||||
<publishTime>12/29/2023 17:18:41</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DPS.pdb">
|
||||
<publishTime>11/30/2023 19:14:06</publishTime>
|
||||
<publishTime>12/29/2023 17:18:41</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.Model.dll">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/15/2023 16:56:36</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.Model.pdb">
|
||||
<publishTime>11/30/2023 19:07:11</publishTime>
|
||||
<publishTime>12/15/2023 16:56:36</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.TestToolsWeb.dll">
|
||||
<publishTime>09/06/2018 11:57:11</publishTime>
|
||||
@ -5658,7 +5658,7 @@
|
||||
<publishTime>05/30/2022 16:58:47</publishTime>
|
||||
</File>
|
||||
<File Include="PrecompiledApp.config">
|
||||
<publishTime>11/30/2023 19:14:22</publishTime>
|
||||
<publishTime>12/29/2023 17:18:44</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/ai.0.22.9-build00167.js">
|
||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||
|
Reference in New Issue
Block a user