Compare commits
15 Commits
SanYing_DA
...
YingJiYiYu
Author | SHA1 | Date | |
---|---|---|---|
36bbcd0b71 | |||
8235f16d38 | |||
0d46fcfe0b | |||
ae55e77ef8 | |||
9d5221ba0d | |||
95aaa6d25c | |||
a77604f299 | |||
7d3f50c97b | |||
29bfe4c6aa | |||
cc78693b7d | |||
7eff397fb5 | |||
07d01e0cd0 | |||
07985264fa | |||
b4fd2d4e05 | |||
ccbca85c55 |
@ -478,9 +478,41 @@ namespace Epost.Common
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string ModelToXml<T>(T model)
|
||||||
|
{
|
||||||
|
MemoryStream stream = new MemoryStream();
|
||||||
|
XmlSerializer xmlSer = new XmlSerializer(typeof(T));
|
||||||
|
xmlSer.Serialize(stream, model);
|
||||||
|
|
||||||
|
stream.Position = 0;
|
||||||
|
StreamReader sr = new StreamReader(stream);
|
||||||
|
return sr.ReadToEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将实体对象转换成XML
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">实体类型</typeparam>
|
||||||
|
/// <param name="obj">实体对象</param>
|
||||||
|
public static string XmlSerialize<T>(T obj)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (StringWriter sw = new StringWriter())
|
||||||
|
{
|
||||||
|
Type t = obj.GetType();
|
||||||
|
XmlSerializer serializer = new XmlSerializer(obj.GetType());
|
||||||
|
serializer.Serialize(sw, obj);
|
||||||
|
sw.Close();
|
||||||
|
return sw.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Exception("将实体对象转换成XML异常", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
AddressstorageDAL dal = new AddressstorageDAL();
|
AddressstorageDAL dal = new AddressstorageDAL();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 查询设备所在区
|
#region 查询设备所在区
|
||||||
public DataTable getBlock(string address, string type, string controlip)
|
public DataTable getBlock(string address, string type, string controlip)
|
||||||
@ -39,7 +39,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据货位号查询标签地址
|
#region 根据货位号查询标签地址
|
||||||
public DataTable getAddressList(string location)
|
public DataTable getAddressList(string location)
|
||||||
{
|
{
|
||||||
@ -54,7 +54,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 根据小车编号获取控制器Ip地址
|
#region 根据小车编号获取控制器Ip地址
|
||||||
public DataTable getIP(string carid)
|
public DataTable getIP(string carid)
|
||||||
@ -89,17 +89,17 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取箱号显示标签
|
#region 获取箱号显示标签
|
||||||
public DataTable GetBoxAddress(string block,string area,int type)
|
public DataTable GetBoxAddress(string block, string area, int type)
|
||||||
{
|
{
|
||||||
return dal.GetBoxAddress(block,area,type);
|
return dal.GetBoxAddress(block, area, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据区域获取所有地址
|
#region 根据区域获取所有地址
|
||||||
public DataTable getAddresslist(string block, string area,string type)
|
public DataTable getAddresslist(string block, string area, string type)
|
||||||
{
|
{
|
||||||
return dal.getAddresslist(block, area,type);
|
return dal.getAddresslist(block, area, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -152,7 +152,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取所有地址
|
#region 获取所有地址
|
||||||
public DataTable getAddressList()
|
public DataTable getAddressList()
|
||||||
{
|
{
|
||||||
@ -329,9 +329,9 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
|
|
||||||
#region 获取错误信息的state
|
#region 获取错误信息的state
|
||||||
public DataTable GetErrorState(string address,string ip)
|
public DataTable GetErrorState(string address, string ip)
|
||||||
{
|
{
|
||||||
return dal.getErrorState(address,ip);
|
return dal.getErrorState(address, ip);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -374,5 +374,17 @@ namespace Epost.BLL
|
|||||||
return dal.GetAddressListByByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
return dal.GetAddressListByByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 根据订单获取要熄灭的标签
|
||||||
|
public DataTable GetForcedendAddress(string orderid)
|
||||||
|
{
|
||||||
|
return dal.GetForcedendAddress(orderid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetForcedendAddress()
|
||||||
|
{
|
||||||
|
return dal.GetForcedendAddress();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ namespace Epost.BLL
|
|||||||
model.Command = "UNLOCK";
|
model.Command = "UNLOCK";
|
||||||
model.Timeout = "0.5";
|
model.Timeout = "0.5";
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
|
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||||
}
|
}
|
||||||
if (list.Any())
|
if (list.Any())
|
||||||
{
|
{
|
||||||
@ -511,6 +511,7 @@ namespace Epost.BLL
|
|||||||
model.ControlIP = item["ControlIP"].ToString();
|
model.ControlIP = item["ControlIP"].ToString();
|
||||||
FORMATE_JOB_DATA(model);
|
FORMATE_JOB_DATA(model);
|
||||||
|
|
||||||
|
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -564,14 +565,14 @@ namespace Epost.BLL
|
|||||||
model.Address = item.Address;
|
model.Address = item.Address;
|
||||||
model.Command = "REMOVE_JOB";
|
model.Command = "REMOVE_JOB";
|
||||||
model.Uid = item.ID;
|
model.Uid = item.ID;
|
||||||
model.Type = "N";
|
model.Type = "C";
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
LabelParamModel Unlockmodel = new LabelParamModel();
|
LabelParamModel Unlockmodel = new LabelParamModel();
|
||||||
Unlockmodel.ControlIP = item.ControlIP;
|
Unlockmodel.ControlIP = item.ControlIP;
|
||||||
Unlockmodel.Address = item.Address;
|
Unlockmodel.Address = item.Address;
|
||||||
Unlockmodel.Command = "UNLOCK";
|
Unlockmodel.Command = "UNLOCK";
|
||||||
|
|
||||||
Unlockmodel.Type = "N";
|
Unlockmodel.Type = "C";
|
||||||
Unlockmodel.Parameter = "11111000";
|
Unlockmodel.Parameter = "11111000";
|
||||||
list.Add(Unlockmodel);
|
list.Add(Unlockmodel);
|
||||||
|
|
||||||
@ -676,6 +677,30 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 点亮指定区域通道灯
|
#region 点亮指定区域通道灯
|
||||||
|
public bool DISPLAY_LIGHT_BLOCK_Out(string block, string area, string isoff)
|
||||||
|
{
|
||||||
|
|
||||||
|
DataTable dt = addrBLL.GetBoxAddress(block, area, 6);
|
||||||
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (DataRow item in dt.Rows)
|
||||||
|
{
|
||||||
|
LabelParamModel model = new LabelParamModel();
|
||||||
|
model.Command = "DISPLAY_LIGHT";
|
||||||
|
model.Timeout = "0.5";
|
||||||
|
model.Type = "T";
|
||||||
|
model.Address = item["address"].ToString();
|
||||||
|
model.ControlIP = item["ControlIP"].ToString();
|
||||||
|
model.Parameter = ConvertHexHelper.ConvertString(item["addresstype"].ToString(), 10, 16).ToString().PadLeft(2, '0') + isoff;
|
||||||
|
list.Add(model);
|
||||||
|
}
|
||||||
|
dal.SendALL(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public bool DISPLAY_LIGHT_BLOCK(string block, string area, string isoff)
|
public bool DISPLAY_LIGHT_BLOCK(string block, string area, string isoff)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -715,7 +740,16 @@ namespace Epost.BLL
|
|||||||
LabelParamModel model = new LabelParamModel();
|
LabelParamModel model = new LabelParamModel();
|
||||||
model.Address = addritem["address"].ToString();
|
model.Address = addritem["address"].ToString();
|
||||||
model.ControlIP = addritem["controlip"].ToString();
|
model.ControlIP = addritem["controlip"].ToString();
|
||||||
model.Parameter = show.No;
|
model.Uid = show.Uid;
|
||||||
|
if (string.IsNullOrEmpty(show.Uid))
|
||||||
|
{ model.Uid = show.No + addritem["address"].ToString(); }
|
||||||
|
model.Type = "N";
|
||||||
|
if (addritem["addresstype"].ToString() == "2")
|
||||||
|
{
|
||||||
|
|
||||||
|
model.Type = "C";
|
||||||
|
}
|
||||||
|
model.Parameter = model.Uid;
|
||||||
model.Command = "REMOVE_JOB";
|
model.Command = "REMOVE_JOB";
|
||||||
model.Timeout = "0.5";
|
model.Timeout = "0.5";
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
@ -737,7 +771,55 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 强制结束灭灯
|
||||||
|
public ResultModel Forcedend(string orderid)
|
||||||
|
{
|
||||||
|
ResultModel resultModel = new ResultModel();
|
||||||
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DataTable dt = addrBLL.GetForcedendAddress(orderid);
|
||||||
|
|
||||||
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (DataRow item in dt.Rows)
|
||||||
|
{
|
||||||
|
LabelParamModel model = new LabelParamModel();
|
||||||
|
model.ControlIP = item["ControlIP"].ToString();
|
||||||
|
model.Address = item["address"].ToString();
|
||||||
|
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.Parameter = "11111000";
|
||||||
|
model.Command = "UNLOCK";
|
||||||
|
model.Timeout = "0.5";
|
||||||
|
list.Add(model);
|
||||||
|
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||||
|
}
|
||||||
|
if (list.Any())
|
||||||
|
{
|
||||||
|
resultModel = SendALL_Init(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return resultModel;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
resultModel.result = "0";
|
||||||
|
resultModel.msg = "强制结束熄灭失败!";
|
||||||
|
LogHelper.WriteLogInfo("强制结束异常:" + ex.Message);
|
||||||
|
|
||||||
|
}
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,17 +18,17 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
BoxPickBLL pickBLL = new BoxPickBLL();
|
BoxPickBLL pickBLL = new BoxPickBLL();
|
||||||
OrdersDAL dal = new OrdersDAL();
|
OrdersDAL dal = new OrdersDAL();
|
||||||
|
|
||||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||||
BoxQueueBLL queueboxBLL = new BoxQueueBLL();
|
BoxQueueBLL queueboxBLL = new BoxQueueBLL();
|
||||||
CommandDAL comDAL = new CommandDAL();
|
CommandDAL comDAL = new CommandDAL();
|
||||||
CommandBLL comBLL = new CommandBLL();
|
CommandBLL comBLL = new CommandBLL();
|
||||||
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
||||||
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||||
JobDownCacheDAL downCacheDAL = new JobDownCacheDAL();
|
JobDownCacheDAL downCacheDAL = new JobDownCacheDAL();
|
||||||
LocationCacheDAL LocCacheDAL = new LocationCacheDAL();
|
LocationCacheDAL LocCacheDAL = new LocationCacheDAL();
|
||||||
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
|
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
|
||||||
private static object lockbox = new object();
|
private static object lockbox = new object();
|
||||||
|
|
||||||
#region 绑定箱号
|
#region 绑定箱号
|
||||||
public void BindBoxCode()
|
public void BindBoxCode()
|
||||||
@ -110,7 +110,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 拆单
|
#region 拆单
|
||||||
public bool packOrder(ResultMessageModel data, List<JobModel> job, string block, string area, string type)
|
public bool packOrder(ResultMessageModel data, List<JobModel> job, string block, string area, string type)
|
||||||
{
|
{
|
||||||
@ -256,9 +256,9 @@ namespace Epost.BLL
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 删除任务
|
#region 删除任务
|
||||||
public void REMOVE_JOB(string address, string ip, string no)
|
public void REMOVE_JOB(string address, string ip, string no)
|
||||||
@ -388,11 +388,11 @@ namespace Epost.BLL
|
|||||||
if (nowqty > jobmo.Quantity)
|
if (nowqty > jobmo.Quantity)
|
||||||
{
|
{
|
||||||
nowqty = nowqty - jobmo.Quantity;
|
nowqty = nowqty - jobmo.Quantity;
|
||||||
dal.UpdateWorkState_Car(jobmo.Matchid, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
dal.UpdateWorkState_Car(jobmo.OrderID, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dal.UpdateWorkState_Car(jobmo.Matchid, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
dal.UpdateWorkState_Car(jobmo.OrderID, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
||||||
nowqty = 0;
|
nowqty = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -401,7 +401,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
foreach (JobModel jobmo in downlist.ToArray())
|
foreach (JobModel jobmo in downlist.ToArray())
|
||||||
{
|
{
|
||||||
dal.UpdateWorkState_Car(jobmo.Matchid, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
dal.UpdateWorkState_Car(jobmo.OrderID, jobmo.Quantity, jobmo.Sku, jobmo.ID, checkquaantity, model.UserCode);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ namespace Epost.BLL
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
dal.UpdateWorkState_Car(model.Matchid, truequantity, model.Sku, model.ID, checkquaantity, model.UserCode);
|
dal.UpdateWorkState(model.OrderID, truequantity, model.Sku, model.ID, checkquaantity, model.UserCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -453,11 +453,11 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//换箱
|
//换箱
|
||||||
#region 换箱
|
#region 换箱
|
||||||
public void changeBox_ClearJOB(string sblock, string sarea, string address, string controlip)
|
public void changeBox_ClearJOB(string sblock, string sarea, string address, string controlip)
|
||||||
@ -544,7 +544,7 @@ namespace Epost.BLL
|
|||||||
public void BindJobListBySku(string sku)
|
public void BindJobListBySku(string sku)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<OrderListModel> dnList = LocCacheDAL.GetLocationList().FindAll(m => m.State == 0 && m.Sku == sku);
|
List<OrderListModel> dnList = LocCacheDAL.GetLocationList().FindAll(m => m.State == 0 && m.Sku == sku);
|
||||||
if (dnList.Any())
|
if (dnList.Any())
|
||||||
{
|
{
|
||||||
@ -629,9 +629,9 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 清除显示标签
|
#region 清除显示标签
|
||||||
@ -731,30 +731,30 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取订单信息
|
#region 获取订单信息
|
||||||
public List<JobModel> GetOrderList(string matchid, string block, string sku = "", string area = "", string UserCode = "")
|
public List<JobModel> GetOrderList(string orderid, string block, string sku = "", string area = "", string UserCode = "")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
List<JobModel> list = new List<JobModel>();
|
List<JobModel> list = new List<JobModel>();
|
||||||
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
DataTable OrderDt = dal.GetOrderList_Car(orderid, sku, area, block);
|
||||||
bool isecho = false;
|
bool isecho = false;
|
||||||
//if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
//if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
||||||
//{
|
//{
|
||||||
// OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
// OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||||
// isecho = true;
|
// isecho = true;
|
||||||
|
|
||||||
//}
|
//}
|
||||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
string usercode = string.Empty;
|
string usercode = string.Empty;
|
||||||
string lightcolor = string.Empty;
|
string lightcolor = string.Empty;
|
||||||
DataTable udt = dal.GetOrderUseerXCode(matchid, sku, area, block);
|
//DataTable udt = dal.GetOrderUseerXCode(matchid, sku, area, block);
|
||||||
if (udt != null && udt.Rows.Count > 0)
|
//if (udt != null && udt.Rows.Count > 0)
|
||||||
{
|
//{
|
||||||
usercode = udt.Rows[0]["usercode"].ToString();
|
// usercode = udt.Rows[0]["usercode"].ToString();
|
||||||
lightcolor = udt.Rows[0]["lightcolor"].ToString();
|
// lightcolor = udt.Rows[0]["lightcolor"].ToString();
|
||||||
}
|
//}
|
||||||
if (string.IsNullOrEmpty(lightcolor))
|
if (string.IsNullOrEmpty(lightcolor))
|
||||||
{
|
{
|
||||||
lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||||
@ -780,13 +780,21 @@ namespace Epost.BLL
|
|||||||
demodel.Area = item["Area"].ToString();
|
demodel.Area = item["Area"].ToString();
|
||||||
demodel.Address = item["address"].ToString();
|
demodel.Address = item["address"].ToString();
|
||||||
demodel.UserCode = usercode;
|
demodel.UserCode = usercode;
|
||||||
demodel.ColorCode = lightcolor;
|
demodel.ColorCode = item["labelcolor"].ToString();
|
||||||
|
demodel.looklisten = item["looklisten"].ToString();
|
||||||
|
demodel.labelIP = item["labelIP"].ToString();
|
||||||
|
demodel.labelno = item["labelno"].ToString();
|
||||||
|
demodel.genericname = item["genericname"].ToString();
|
||||||
|
demodel.manufactname = item["manufactname"].ToString();
|
||||||
|
demodel.batchno = item["batchno"].ToString();
|
||||||
|
demodel.Spec = item["Spec"].ToString();
|
||||||
demodel.Bkaddress = "0";
|
demodel.Bkaddress = "0";
|
||||||
demodel.Addresstype = "1";
|
demodel.Addresstype = "1";
|
||||||
demodel.ControlID = "";
|
demodel.ControlID = "";
|
||||||
demodel.ControlIP = item["ControlIP"].ToString();
|
demodel.ControlIP = item["ControlIP"].ToString();
|
||||||
//demodel.Layer = item["Layer"].ToString();
|
demodel.Layer = item["Layer"].ToString();
|
||||||
//demodel.Slist = item["Slist"].ToString();
|
demodel.Slist = item["Slist"].ToString();
|
||||||
|
demodel.clientcode = item["clientcode"].ToString();
|
||||||
//demodel.Zone = item["zone"].ToString();
|
//demodel.Zone = item["zone"].ToString();
|
||||||
//demodel.TaskType =Convert.ToInt32(item["tasktype"].ToString());
|
//demodel.TaskType =Convert.ToInt32(item["tasktype"].ToString());
|
||||||
|
|
||||||
@ -801,9 +809,10 @@ namespace Epost.BLL
|
|||||||
// demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
// demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
//}
|
//}
|
||||||
list.Add(demodel);
|
list.Add(demodel);
|
||||||
if (!isecho) {
|
if (!isecho)
|
||||||
//修改数据为已读
|
{
|
||||||
dal.UpOrder_Car(item["Matchid"].ToString(), item["sku"].ToString(), item["id"].ToString());
|
//修改数据为已读
|
||||||
|
dal.UpOrder_Car(item["orderid"].ToString(), item["sku"].ToString(), item["id"].ToString());
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@ -813,8 +822,7 @@ namespace Epost.BLL
|
|||||||
LogHelper.WriteLogInfo("查询无任务================");
|
LogHelper.WriteLogInfo("查询无任务================");
|
||||||
|
|
||||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||||
qmodel.Sku = sku;
|
qmodel.Orderid = orderid;
|
||||||
qmodel.Matchid = matchid;
|
|
||||||
qmodel.UserCode = UserCode;
|
qmodel.UserCode = UserCode;
|
||||||
qmodel.Taskblock = block;
|
qmodel.Taskblock = block;
|
||||||
qmodel.Taskarea = area;
|
qmodel.Taskarea = area;
|
||||||
@ -839,7 +847,10 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderList(string Orderid, string area, string block)
|
||||||
|
{
|
||||||
|
return dal.GetOrderList(Orderid, area, block);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@ -901,7 +912,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改订单信息
|
#region 修改订单信息
|
||||||
public bool UpdateOrderstate(string orderid)
|
public bool UpdateOrderstate(string orderid)
|
||||||
{
|
{
|
||||||
@ -917,9 +928,9 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改订单信息
|
#region 修改订单信息
|
||||||
public bool Updatestate(string matchid,string readdate)
|
public bool Updatestate(string matchid, string readdate)
|
||||||
{
|
{
|
||||||
return dal.Updatestate(matchid,readdate);
|
return dal.Updatestate(matchid, readdate);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -940,6 +951,16 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public bool ImportOrderinfo(DataTable ds, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
bool bo = false;
|
||||||
|
if (ds != null && ds.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
bo = dal.ImportOrderinfo(ds, diclist);
|
||||||
|
}
|
||||||
|
return bo;
|
||||||
|
}
|
||||||
|
|
||||||
public DataTable GetMatchOrderList()
|
public DataTable GetMatchOrderList()
|
||||||
{
|
{
|
||||||
@ -984,7 +1005,7 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool IsFinishWorkByCar(int endcount, string matchid, string block="")
|
public bool IsFinishWorkByCar(int endcount, string matchid, string block = "")
|
||||||
{
|
{
|
||||||
return dal.IsFinishWorkByCar(endcount, matchid, block);
|
return dal.IsFinishWorkByCar(endcount, matchid, block);
|
||||||
}
|
}
|
||||||
@ -998,13 +1019,13 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
return dal.IsFinishWork(endcount, block, usercode, area, sku, shopid, matchid);
|
return dal.IsFinishWork(endcount, block, usercode, area, sku, shopid, matchid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public DataTable GetMatchOrder()
|
public DataTable GetMatchOrder()
|
||||||
{
|
{
|
||||||
return dal.GetMatchOrder();
|
return dal.GetMatchOrder();
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 获取订单信息
|
#region 获取订单信息
|
||||||
public DataTable GetOrderList_Car(string matchid, string sku, string sarea, string sblock)
|
public DataTable GetOrderList_Car(string matchid, string sku, string sarea, string sblock)
|
||||||
@ -1018,5 +1039,38 @@ namespace Epost.BLL
|
|||||||
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public DataTable GetDataIfRepeat(string transderMid, string transderDid)
|
||||||
|
{
|
||||||
|
return dal.GetDataIfRepeat(transderMid, transderDid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpOrdersState(string orderid)
|
||||||
|
{
|
||||||
|
return dal.UpOrdersState(orderid);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 校验货位
|
||||||
|
public DataTable GetlocationInfo(string location)
|
||||||
|
{
|
||||||
|
return dal.GetlocationInfo(location);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
public bool UpOrdersState(string Area,string block)
|
||||||
|
{
|
||||||
|
return dal.UpdateState(Area, block);
|
||||||
|
}
|
||||||
|
public bool IsFinishWorkArea(string block, string usercode = "", string area = "", string sku = "", string shopid = "", string orderid = "")
|
||||||
|
{
|
||||||
|
return dal.IsFinishWorkArea(block,usercode,area,sku,shopid,orderid);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 接口根据订单熄灭 一对多标签 修改等待亮灯的状态
|
||||||
|
public bool UpOrdersWaitState(string orderid)
|
||||||
|
{
|
||||||
|
return dal.UpOrdersWaitState(orderid);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.Entity.Infrastructure;
|
using System.Data.Entity.Infrastructure;
|
||||||
@ -11,6 +12,7 @@ using Epost.DAL;
|
|||||||
using Epost.DAL.Cache;
|
using Epost.DAL.Cache;
|
||||||
using Epost.DAL.Enum;
|
using Epost.DAL.Enum;
|
||||||
using Epost.Model;
|
using Epost.Model;
|
||||||
|
using static Epost.DAL.Enum.LightColor;
|
||||||
|
|
||||||
namespace Epost.BLL
|
namespace Epost.BLL
|
||||||
{
|
{
|
||||||
@ -206,6 +208,31 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public ResultModel Forcedend(string orderid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<JobModel> jobList = JobCache.GetPlanJobList().FindAll(x => x.OrderID == orderid);
|
||||||
|
ResultModel resultModel = comBLL.Forcedend(orderid);
|
||||||
|
comBLL.ClearArea_M(jobList);
|
||||||
|
|
||||||
|
JobCache.UpdateJobModelList(jobList, EcommendType.Execute);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("强制结束熄灭标签异常" + ex.ToString());
|
||||||
|
ResultModel resultModel = new ResultModel();
|
||||||
|
resultModel.result = "-1";
|
||||||
|
resultModel.msg = "强制结束熄灭标签异常:" + ex.ToString() + "";
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion.
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 查询波次通道列表
|
#region 查询波次通道列表
|
||||||
@ -334,11 +361,7 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
DataTable queueDT = queueBLL.getQueueOrderState(qmodel);
|
DataTable queueDT = queueBLL.getQueueOrderState(qmodel);
|
||||||
if (queueDT != null && queueDT.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
skulist = queueDT.Rows[0]["sku"].ToString();
|
|
||||||
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
|
||||||
}
|
|
||||||
#region 任意回显标签拍下 熄灭回显设备
|
#region 任意回显标签拍下 熄灭回显设备
|
||||||
//if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
//if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
||||||
//{
|
//{
|
||||||
@ -398,8 +421,8 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
List<JobModel> rjob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
List<JobModel> finList = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 3);
|
||||||
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
JobCache.UpdateJobModelList(finList, EcommendType.Execute);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -422,63 +445,64 @@ namespace Epost.BLL
|
|||||||
List<JobModel> downlist = new List<JobModel>();
|
List<JobModel> downlist = new List<JobModel>();
|
||||||
JobModel model = job.FirstOrDefault();
|
JobModel model = job.FirstOrDefault();
|
||||||
downlist.Add(model);
|
downlist.Add(model);
|
||||||
int endcount = 1;
|
model.State = 3;
|
||||||
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation && m.Sku == model.Sku);
|
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation && m.Sku == model.Sku);
|
||||||
if (manyList.Any())//合并显示数据
|
#region 处理合并数据
|
||||||
{
|
//int endcount = 1;
|
||||||
endcount = manyList.Count;
|
//if (manyList.Any())//合并显示数据
|
||||||
downlist.AddRange(manyList);
|
//{
|
||||||
LogHelper.WriteLogInfo("合并显示数据" + endcount + "============================");
|
// endcount = manyList.Count;
|
||||||
}
|
// downlist.AddRange(manyList);
|
||||||
else
|
// LogHelper.WriteLogInfo("合并显示数据" + endcount + "============================");
|
||||||
{
|
//}
|
||||||
downlist.Add(model);
|
//else
|
||||||
}
|
//{
|
||||||
|
// downlist.Add(model);
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||||
LogHelper.WriteLogInfo("6------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
LogHelper.WriteLogInfo("拍下------" + data.Address + "------" + model.OrderID + "----" + model.State + "");
|
||||||
bool skuInish = dal.IsFinishWork(1, block, "", area, model.Sku, "", model.Matchid);
|
//bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", model.OrderID);
|
||||||
|
bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", "");
|
||||||
if (skuInish)
|
if (skuInish)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
//LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||||
#region 修改任务队列状态
|
|
||||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
comBLL.DISPLAY_LIGHT_BLOCK(model.Block, data.Area, "0");
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("通道拣货完成--------------");
|
||||||
|
//删除sku缓存信息
|
||||||
|
//List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Area == data.Area && m.Sku == model.Sku);
|
||||||
|
//JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
|
|
||||||
|
|
||||||
|
#region 修改任务队列状态
|
||||||
|
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||||
qumodel.State = 3;
|
qumodel.State = 3;
|
||||||
qumodel.Taskblock = block;
|
qumodel.Taskblock = block;
|
||||||
qumodel.Taskarea = area;
|
qumodel.Taskarea = area;
|
||||||
qumodel.Sku = model.Sku;
|
//qumodel.Orderid = model.OrderID;
|
||||||
qumodel.Matchid = model.Matchid;
|
|
||||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||||
#endregion
|
#endregion
|
||||||
Thread.Sleep(30);
|
bool allfinish = dal.IsFinishWork_box("", 0, model.OrderID);
|
||||||
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
|
||||||
//删除sku缓存信息
|
|
||||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SCAN_STATUS" && p.Area == area);
|
|
||||||
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
|
||||||
List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Sku == model.Sku);
|
|
||||||
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
|
||||||
|
|
||||||
bool allfinish = dal.IsFinishWork_box("", 0, model.Matchid);
|
|
||||||
if (allfinish)
|
if (allfinish)
|
||||||
{
|
{
|
||||||
//修改订单状态
|
LogHelper.WriteLogInfo("订单拣选完成");
|
||||||
orderbll.UpdateOrderState_Car(downlist, model, 1, checkquantity);
|
|
||||||
bool lbo = dal.UpdateLocation(block, area);
|
|
||||||
dal.UpdateStateByCar(model.Matchid);
|
|
||||||
content = "此运单号作业已完成\r\r";
|
|
||||||
|
|
||||||
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
showmodel.Area = area;
|
showmodel.Type = 2;
|
||||||
showmodel.Block = block;
|
|
||||||
showmodel.Color = color;
|
comBLL.RemoveBoxMessage_M(showmodel);
|
||||||
showmodel.Islock = true;
|
|
||||||
showmodel.Title = model.Matchid;
|
|
||||||
showmodel.No = "01";
|
|
||||||
showmodel.IsTwinkle = 0;
|
|
||||||
showmodel.Contents = content;
|
|
||||||
showmodel.Type = 2;
|
|
||||||
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
|
||||||
}
|
}
|
||||||
|
//修改订单状态
|
||||||
|
dal.UpdateState(model.Area, model.Block);
|
||||||
|
|
||||||
|
bool WorkArea = dal.IsFinishWorkArea("", "", "99", "", "", "");
|
||||||
|
if (WorkArea)
|
||||||
|
{
|
||||||
|
comBLL.DISPLAY_LIGHT_BLOCK_Out("", model.Area, "0");
|
||||||
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,9 +539,37 @@ namespace Epost.BLL
|
|||||||
//当前区没有作业
|
//当前区没有作业
|
||||||
if (queueDT.Rows[0]["state"].ToString() == "0")
|
if (queueDT.Rows[0]["state"].ToString() == "0")
|
||||||
{
|
{
|
||||||
displayOrder(queueDT, nblock, narea, list, model);
|
model.Id = Convert.ToInt32(queueDT.Rows[0]["id"].ToString());
|
||||||
|
model.State = 1;
|
||||||
|
//orderbll.GetOrderList(queueDT.Rows[0]["Orderid"].ToString(), nblock, "", narea, queueDT.Rows[0]["usercode"].ToString());
|
||||||
|
//orderbll.GetOrderList("", nblock, "", narea, queueDT.Rows[0]["usercode"].ToString());
|
||||||
|
queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
||||||
|
}
|
||||||
|
DataTable orderdt = orderbll.GetOrderList("", narea, nblock);
|
||||||
|
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
orderbll.GetOrderList("", nblock, "", narea, queueDT.Rows[0]["usercode"].ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable QueueDt = queueBLL.getQueueState(model);
|
||||||
|
if (QueueDt == null || QueueDt.Rows.Count <= 0)
|
||||||
|
{
|
||||||
|
DataTable orderdt = orderbll.GetOrderList("", narea, nblock);
|
||||||
|
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||||
|
qmodel.Taskblock = nblock;
|
||||||
|
qmodel.Taskarea = narea;
|
||||||
|
qmodel.UserCode = "";
|
||||||
|
//qmodel.Orderid = orderdt.Rows[0]["orderid"].ToString();
|
||||||
|
|
||||||
|
queueBLL.insertQueueOrders(qmodel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
displayOrder(queueDT, nblock, narea, list, model);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -536,44 +588,44 @@ namespace Epost.BLL
|
|||||||
#region 点亮设备
|
#region 点亮设备
|
||||||
public void displayOrder(DataTable queueDT, string nblock, string narea, List<LabelParamModel> list, OrdersQueueModel model)
|
public void displayOrder(DataTable queueDT, string nblock, string narea, List<LabelParamModel> list, OrdersQueueModel model)
|
||||||
{
|
{
|
||||||
model.Id = Convert.ToInt32(queueDT.Rows[0]["id"].ToString());
|
|
||||||
#region 点亮任务
|
#region 点亮任务
|
||||||
List<JobModel> jobList = JobCache.GetPlanJobList();
|
List<JobModel> jobList = JobCache.GetPlanJobList();
|
||||||
List<JobModel> isJobList = jobList.FindAll(p => p.Block == nblock && p.Area == narea && p.State != 3);
|
if (queueDT != null && queueDT.Rows.Count > 0)
|
||||||
ShowMessageModel showmodel = new ShowMessageModel();
|
|
||||||
//获取当前区任务并加入缓存
|
|
||||||
if (!isJobList.Any())
|
|
||||||
{
|
{
|
||||||
model.State = 1;
|
|
||||||
orderbll.GetOrderList(queueDT.Rows[0]["matchid"].ToString(), nblock, queueDT.Rows[0]["sku"].ToString(), narea, queueDT.Rows[0]["usercode"].ToString());
|
|
||||||
|
////获取当前区任务并加入缓存
|
||||||
|
//if (!isJobList.Any())
|
||||||
|
//{
|
||||||
|
|
||||||
List<JobModel> nowJoblist = jobList.FindAll(p => p.State == 0 && p.Block == model.Taskblock && p.Area == model.Taskarea);
|
List<JobModel> nowJoblist = jobList.FindAll(p => p.State == 0 && p.Block == model.Taskblock && p.Area == model.Taskarea);
|
||||||
if (nowJoblist.Any())
|
if (nowJoblist.Any())
|
||||||
{
|
{
|
||||||
var nowmodel = nowJoblist.FirstOrDefault();
|
var nowmodel = nowJoblist.FirstOrDefault();
|
||||||
|
string showmes = string.Empty;
|
||||||
LogHelper.WriteLogInfo("进入任务点亮=====matchid=" + nowmodel.Matchid + "===orderid===" + nowmodel.OrderID + "=====sku==" + nowmodel.Sku + "========");
|
|
||||||
#region 点亮任务标签
|
#region 点亮任务标签
|
||||||
foreach (JobModel item in nowJoblist.ToArray())
|
foreach (JobModel item in nowJoblist.ToArray())
|
||||||
{
|
{
|
||||||
if (item.State == 0)
|
List<JobModel> isshowList = jobList.FindAll(p => p.Address == item.Address && p.ControlIP == item.ControlIP && p.State == 1);
|
||||||
|
if (!isshowList.Any())
|
||||||
{
|
{
|
||||||
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
#region
|
||||||
int quantity = item.Quantity;
|
|
||||||
|
|
||||||
#region 判断同一订单、同一货位多条数据 合并显示
|
#region 判断同一订单、同一货位多条数据 合并显示
|
||||||
if (manyJoblist.Count > 1)//同一个货位的数据合并显示
|
//List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
||||||
{
|
int quantity = item.Quantity;
|
||||||
quantity = 0;
|
//if (manyJoblist.Count > 1)//同一个货位的数据合并显示
|
||||||
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
//{
|
||||||
{
|
// quantity = 0;
|
||||||
foreach (JobModel mitem in manyJoblist)
|
// if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||||
{
|
// {
|
||||||
quantity += mitem.Quantity;
|
// foreach (JobModel mitem in manyJoblist)
|
||||||
mitem.State = 1;
|
// {
|
||||||
mitem.ManyState = 1;
|
// quantity += mitem.Quantity;
|
||||||
}
|
// mitem.State = 1;
|
||||||
}
|
// mitem.ManyState = 1;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
LabelParamModel lamodel = new LabelParamModel();
|
LabelParamModel lamodel = new LabelParamModel();
|
||||||
@ -581,45 +633,149 @@ namespace Epost.BLL
|
|||||||
lamodel.Address = address;
|
lamodel.Address = address;
|
||||||
lamodel.ControlIP = item.ControlIP.ToString();
|
lamodel.ControlIP = item.ControlIP.ToString();
|
||||||
lamodel.Command = "DISPLAY_JOB";
|
lamodel.Command = "DISPLAY_JOB";
|
||||||
lamodel.Uid = item.ID;
|
|
||||||
lamodel.Type = "N";
|
|
||||||
|
lamodel.Title = item.genericname;
|
||||||
|
string manufactname = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(item.manufactname) && item.manufactname.Length > 4)
|
||||||
|
{
|
||||||
|
manufactname = item.manufactname.Substring(0, 4);
|
||||||
|
}
|
||||||
|
// lamodel.Content = "" + item.Sku.Substring(item.Sku.Length - 4, 4) + "\\t" + item.Spec + "\r" + item.GoodsName + "\r批号" + item.batchno + " " + manufactname + "";
|
||||||
|
lamodel.Content = "" + item.GoodsName + "\r" + item.Spec + "\r" + manufactname + "";
|
||||||
|
var aryloc = item.Tolocation.Split('-');
|
||||||
|
lamodel.Loc = "" + aryloc[0].ToString();
|
||||||
|
lamodel.W_quantity = item.Slist;
|
||||||
lamodel.Quantity = quantity.ToString();
|
lamodel.Quantity = quantity.ToString();
|
||||||
|
lamodel.Unit = item.Unit;
|
||||||
|
lamodel.PicChoose = "";
|
||||||
|
#region 看似听似
|
||||||
|
if (item.looklisten == "18")
|
||||||
|
{
|
||||||
|
lamodel.PicChoose = "02";//听似
|
||||||
|
}
|
||||||
|
else if (item.looklisten == "17")
|
||||||
|
{
|
||||||
|
lamodel.PicChoose = "03";//看似
|
||||||
|
}
|
||||||
|
else if (item.looklisten == "16")
|
||||||
|
{
|
||||||
|
lamodel.PicChoose = "04";//多规
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (item.looklisten == "无")
|
||||||
|
{
|
||||||
|
lamodel.PicChoose = "05";//易混淆
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
lamodel.Uid = item.ID;
|
lamodel.Uid = item.ID;
|
||||||
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
lamodel.Type = "C";
|
||||||
|
string color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||||
|
|
||||||
|
#region 标签颜色
|
||||||
|
if (item.ColorCode == "1")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "2")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "3")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "4")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Cyan);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "5")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Yellow);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "6")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.White);
|
||||||
|
}
|
||||||
|
else if (item.ColorCode == "7")
|
||||||
|
{
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Pink);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
lamodel.Mode = color + "0";
|
||||||
|
|
||||||
|
|
||||||
list.Add(lamodel);
|
list.Add(lamodel);
|
||||||
|
|
||||||
|
#region 点亮通道灯
|
||||||
|
List<JobModel> isJobListss = jobList.FindAll(p => p.Area == narea && p.Block == nblock && p.State == 1);
|
||||||
|
if (!isJobListss.Any())
|
||||||
|
{
|
||||||
|
comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "F");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<JobModel> isJobLists = jobList.FindAll(p => p.Area == narea && p.State == 1);
|
||||||
|
if (!isJobLists.Any())
|
||||||
|
{
|
||||||
|
comBLL.DISPLAY_LIGHT_BLOCK_Out("", model.Taskarea, "F");
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
item.State = 1;
|
item.State = 1;
|
||||||
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
|
||||||
item.DisplayTime = DateTime.Now;
|
item.DisplayTime = DateTime.Now;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
showmes = item.clientcode;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 点亮通道灯
|
|
||||||
//comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
||||||
comBLL.DISPLAY_JOBALL(list);
|
comBLL.DISPLAY_JOBALL(list);
|
||||||
}
|
//点亮显示器
|
||||||
}
|
if (!string.IsNullOrEmpty(showmes))
|
||||||
else
|
{
|
||||||
{//无任务
|
|
||||||
LogHelper.WriteLogInfo("点亮====无任务=======================");
|
|
||||||
model.State = 3;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
if (jobList.Any())
|
|
||||||
{
|
|
||||||
|
|
||||||
var finishList = jobList.FindAll(p => p.State == 0);
|
LogHelper.WriteLogInfo("下发异常货位信息"+showmes);
|
||||||
if (!finishList.Any())
|
if (showmes.Length > 30)
|
||||||
{
|
{
|
||||||
queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
string newstr = showmes.Substring(30, showmes.Length - 30);
|
||||||
|
if (newstr.Length > 30)
|
||||||
|
{
|
||||||
|
showmes = showmes.Substring(0, 30) + "\r" + newstr.Substring(0, 30) + "\r" + newstr.Substring(30, newstr.Length - 30);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
showmes = showmes.Substring(0, 30) + "\r" + newstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
|
showmodel.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||||
|
showmodel.Islock = true;
|
||||||
|
showmodel.Title = "下发货位异常信息";
|
||||||
|
showmodel.IsTwinkle = 0;
|
||||||
|
showmodel.Contents = showmes;
|
||||||
|
showmodel.Type = 2;
|
||||||
|
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//else
|
||||||
|
//{//无任务
|
||||||
|
// LogHelper.WriteLogInfo("点亮====无任务=======================");
|
||||||
|
// model.State = 3;
|
||||||
|
// queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
|
@ -127,9 +127,9 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 修改作业全部完成
|
#region 修改作业全部完成
|
||||||
public bool updateOrderQueueState(string usercode, string block)
|
public bool updateOrderQueueState()
|
||||||
{
|
{
|
||||||
return dal.updateOrderQueueState(usercode,block);
|
return dal.updateOrderQueueState();
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -9,13 +9,13 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Epost.DAL
|
namespace Epost.DAL
|
||||||
{
|
{
|
||||||
public class AddressstorageDAL
|
public class AddressstorageDAL
|
||||||
{
|
{
|
||||||
//DB db = new DB();
|
//DB db = new DB();
|
||||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||||
|
|
||||||
#region 查询设备所在区
|
#region 查询设备所在区
|
||||||
public DataTable getBlock(string address,string type,string controlip)
|
public DataTable getBlock(string address, string type, string controlip)
|
||||||
{
|
{
|
||||||
string sql = "";
|
string sql = "";
|
||||||
if (string.IsNullOrEmpty(type))
|
if (string.IsNullOrEmpty(type))
|
||||||
@ -40,13 +40,13 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据地址查询货位信息
|
#region 根据地址查询货位信息
|
||||||
public DataTable getLocationList(string address,string controlIP)
|
public DataTable getLocationList(string address, string controlIP)
|
||||||
{
|
{
|
||||||
string sql = string.Format(" select * from addressstorage as addr left join controller as con on con.ID=addr.controlid where type=4 and address = '{0}' and ControlIP='{1}'",
|
string sql = string.Format(" select * from addressstorage as addr left join controller as con on con.ID=addr.controlid where type=4 and address = '{0}' and ControlIP='{1}'",
|
||||||
address,
|
address,
|
||||||
controlIP
|
controlIP
|
||||||
);
|
);
|
||||||
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
string sql = string.Format(" select * from v_address where location = '{0}'",
|
string sql = string.Format(" select * from v_address where location = '{0}'",
|
||||||
location
|
location
|
||||||
|
|
||||||
);
|
);
|
||||||
// LogHelper.WriteLogInfo("根据货位号查询标签地址" + sql);
|
// LogHelper.WriteLogInfo("根据货位号查询标签地址" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,16 +92,16 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据地址、通道查询信息
|
#region 根据地址、通道查询信息
|
||||||
public DataTable getAddressListByway(string location, string block, string area,string way)
|
public DataTable getAddressListByway(string location, string block, string area, string way)
|
||||||
{
|
{
|
||||||
string sql = string.Format(" select * from addressstorage where location = '{0}' and block='{1}' and area='{2}' and way='{3}'",
|
string sql = string.Format(" select * from addressstorage where location = '{0}' and block='{1}' and area='{2}' and way='{3}'",
|
||||||
location,
|
location,
|
||||||
block,
|
block,
|
||||||
area,way
|
area, way
|
||||||
);
|
);
|
||||||
// LogHelper.WriteLogInfo("根据地址、通道查询信息:" + sql);
|
// LogHelper.WriteLogInfo("根据地址、通道查询信息:" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ namespace Epost.DAL
|
|||||||
public DataTable getControlList()
|
public DataTable getControlList()
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from Controller");
|
string sql = string.Format("select * from Controller");
|
||||||
// LogHelper.WriteLogInfo("获取控制器列表" + sql);
|
// LogHelper.WriteLogInfo("获取控制器列表" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -158,32 +158,36 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
|
|
||||||
#region 根据区域 查询显示箱号地址
|
#region 根据区域 查询显示箱号地址
|
||||||
public DataTable GetBoxAddress(string block,string area,int type)
|
public DataTable GetBoxAddress(string block, string area, int type)
|
||||||
{
|
{
|
||||||
string strwhere = string.Empty;
|
string strwhere = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
if (!string.IsNullOrEmpty(area))
|
||||||
{
|
{
|
||||||
strwhere = " and area='"+area+"'";
|
strwhere += " and area='" + area + "'";
|
||||||
}
|
}
|
||||||
string sql = string.Format("select address,bkaddress,state,type,area,way,shelfid,ControlID,location,layer,slist,block,addresstype,ControlIP,ControlType,info from V_address where type='{1}' and block='{0}' " + strwhere,
|
if (!string.IsNullOrEmpty(block))
|
||||||
|
{
|
||||||
|
strwhere += " and block='" + block + "'";
|
||||||
|
}
|
||||||
|
string sql = string.Format("select address,bkaddress,state,type,area,way,shelfid,ControlID,location,layer,slist,block,addresstype,ControlIP,ControlType,info from V_address where type='{1}' " + strwhere,
|
||||||
block,
|
block,
|
||||||
|
|
||||||
type);
|
type);
|
||||||
LogHelper.WriteLogInfo("根据区域 查询显示地址"+sql);
|
LogHelper.WriteLogInfo("根据区域 查询显示地址---通道灯" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据区域 查询显示箱号地址
|
#region 根据区域 查询显示箱号地址
|
||||||
public DataTable getAddresslist(string block, string area,string type)
|
public DataTable getAddresslist(string block, string area, string type)
|
||||||
{
|
{
|
||||||
|
|
||||||
string sql = string.Format(" select * from V_Address where location in (select min(location) from V_Address group by address) and block = '{0}' and area = '{1}' and type ='{2}'",
|
string sql = string.Format(" select * from V_Address where location in (select min(location) from V_Address group by address) and block = '{0}' and area = '{1}' and type ='{2}'",
|
||||||
block,
|
block,
|
||||||
area,type);
|
area, type);
|
||||||
|
|
||||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +199,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Format("select * from V_Address where block='{0}' and area='{1}' and type in(2,4)",
|
string sql = string.Format("select * from V_Address where block='{0}' and area='{1}' and type in(2,4)",
|
||||||
block,
|
block,
|
||||||
area);
|
area);
|
||||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +210,7 @@ namespace Epost.DAL
|
|||||||
public DataTable GetScanList()
|
public DataTable GetScanList()
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from V_Address where type =6");
|
string sql = string.Format("select * from V_Address where type =6");
|
||||||
|
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,9 +227,9 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据区域获取扫描枪地址
|
#region 根据区域获取扫描枪地址
|
||||||
public DataTable GetScanListByArea(string block,string area)
|
public DataTable GetScanListByArea(string block, string area)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from V_Address where type =6 and block='"+block+"' and area = '"+area+"'");
|
string sql = string.Format("select * from V_Address where type =6 and block='" + block + "' and area = '" + area + "'");
|
||||||
|
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
@ -253,7 +257,7 @@ namespace Epost.DAL
|
|||||||
#region 获取所有小区
|
#region 获取所有小区
|
||||||
public DataTable GetAreaList()
|
public DataTable GetAreaList()
|
||||||
{
|
{
|
||||||
string sql = string.Format("select area,block from Addressstorage where type=1 group by area,block");
|
string sql = string.Format("select area,block from Addressstorage where type=1 group by area,block");
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -274,13 +278,13 @@ namespace Epost.DAL
|
|||||||
#region 获取所有通道
|
#region 获取所有通道
|
||||||
public DataTable GetWayList()
|
public DataTable GetWayList()
|
||||||
{
|
{
|
||||||
string sql = string.Format("select way from Addressstorage group by way");
|
string sql = string.Format("select way from Addressstorage group by way");
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页获取数据列表
|
#region 分页获取数据列表
|
||||||
|
|
||||||
public List<AddressstorageModel> GetCityListByPage(string strWhere, string orderby, int startIndex, int endIndex, out int recordCount)
|
public List<AddressstorageModel> GetCityListByPage(string strWhere, string orderby, int startIndex, int endIndex, out int recordCount)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -304,7 +308,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
strSql.Append(" ) TT");
|
strSql.Append(" ) TT");
|
||||||
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
strSql.Remove(0, strSql.Length);
|
strSql.Remove(0, strSql.Length);
|
||||||
strSql.Append("SELECT COUNT(*) FROM Addressstorage AS T ");
|
strSql.Append("SELECT COUNT(*) FROM Addressstorage AS T ");
|
||||||
@ -333,12 +337,12 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
//---
|
//---
|
||||||
#region 获取每个小区对应的每个大区(根据小区从小到大排序对应的大区)
|
#region 获取每个小区对应的每个大区(根据小区从小到大排序对应的大区)
|
||||||
public List<AddressstorageModel> GetBlockByAreaList()
|
public List<AddressstorageModel> GetBlockByAreaList()
|
||||||
{
|
{
|
||||||
//string sql = string.Format("select cast(area as Int) as 'Area_area',block from Addressstorage group by block,area order by 'Area_area',block");
|
//string sql = string.Format("select cast(area as Int) as 'Area_area',block from Addressstorage group by block,area order by 'Area_area',block");
|
||||||
string sql = string.Format("select cast(way as Int) as 'Area_area',area from Addressstorage where type in(1,2) group by way,area order by Area_area,area");
|
string sql = string.Format("select cast(way as Int) as 'Area_area',area from Addressstorage where type in(1,2) group by way,area order by Area_area,area");
|
||||||
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(sql));
|
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(sql));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -428,7 +432,7 @@ namespace Epost.DAL
|
|||||||
#region 根据条件删除货位
|
#region 根据条件删除货位
|
||||||
public bool Locational_Binding_Save(string one, string two, string three, string four, string five, string six)
|
public bool Locational_Binding_Save(string one, string two, string three, string four, string five, string six)
|
||||||
{
|
{
|
||||||
|
|
||||||
#region one
|
#region one
|
||||||
string sql1 = "update Addressstorage ";
|
string sql1 = "update Addressstorage ";
|
||||||
try
|
try
|
||||||
@ -576,7 +580,7 @@ namespace Epost.DAL
|
|||||||
//}
|
//}
|
||||||
strSql.Append(" ) TT");
|
strSql.Append(" ) TT");
|
||||||
string sq = strSql.Append(" WHERE TT.Row between {0} and {1}").ToString();
|
string sq = strSql.Append(" WHERE TT.Row between {0} and {1}").ToString();
|
||||||
string sq1= string.Format(sq, startIndex, endIndex);
|
string sq1 = string.Format(sq, startIndex, endIndex);
|
||||||
string sq3 = string.Format(sq, 0, 100000);
|
string sq3 = string.Format(sq, 0, 100000);
|
||||||
|
|
||||||
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(sq1.ToString()));
|
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(sq1.ToString()));
|
||||||
@ -639,7 +643,7 @@ namespace Epost.DAL
|
|||||||
);
|
);
|
||||||
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@ -662,7 +666,7 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 设置所有的设备都为1
|
#region 设置所有的设备都为1
|
||||||
@ -809,5 +813,20 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 根据订单获取要熄灭的标签
|
||||||
|
public DataTable GetForcedendAddress(string orderid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct ControlIP,address from v_orders where orderid='" + orderid + "' and oprationstate!=3");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetForcedendAddress()
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct ControlIP from v_orders ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,14 @@ namespace Epost.DAL.Cache
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (CommendType.Equals(EcommendType.CompleteAll))
|
||||||
|
{
|
||||||
|
//删除作业任务 已完成
|
||||||
|
foreach (var planitem in PlanJobList.ToArray())
|
||||||
|
{
|
||||||
|
PlanJobList.Remove(planitem);
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,7 +193,12 @@ namespace Epost.DAL.Cache
|
|||||||
/// 作业完成
|
/// 作业完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("作业完成")]
|
[Description("作业完成")]
|
||||||
Complete
|
Complete,
|
||||||
|
/// <summary>
|
||||||
|
/// 作业完成
|
||||||
|
/// </summary>
|
||||||
|
[Description("作业完成")]
|
||||||
|
CompleteAll
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -650,6 +650,7 @@ namespace Epost.DAL
|
|||||||
sendModel.W_unit = ControlDetail[i].W_unit;
|
sendModel.W_unit = ControlDetail[i].W_unit;
|
||||||
sendModel.W_quantity = ControlDetail[i].W_quantity;
|
sendModel.W_quantity = ControlDetail[i].W_quantity;
|
||||||
sendModel.Loc = ControlDetail[i].Loc;
|
sendModel.Loc = ControlDetail[i].Loc;
|
||||||
|
sendModel.PicChoose = ControlDetail[i].PicChoose;
|
||||||
|
|
||||||
sendModel.Timeout ="0.5";
|
sendModel.Timeout ="0.5";
|
||||||
list.Add(sendModel);
|
list.Add(sendModel);
|
||||||
|
@ -10,7 +10,7 @@ namespace Epost.DAL
|
|||||||
public class DB_Oracle
|
public class DB_Oracle
|
||||||
{
|
{
|
||||||
private DataBaseOpration.OprationOraDAL db;
|
private DataBaseOpration.OprationOraDAL db;
|
||||||
private string _strOracleMIDConnString = ConfigurationManager.ConnectionStrings["OraMidConnString"].ConnectionString;
|
//private string _strOracleMIDConnString = ConfigurationManager.ConnectionStrings["OraMidConnString"].ConnectionString;
|
||||||
|
|
||||||
public DB_Oracle()
|
public DB_Oracle()
|
||||||
{
|
{
|
||||||
@ -31,12 +31,12 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
|
|
||||||
//如实例不存在,则New一个新实例,否则返回已有实例
|
//如实例不存在,则New一个新实例,否则返回已有实例
|
||||||
if (db == null)
|
//if (db == null)
|
||||||
{
|
//{
|
||||||
|
|
||||||
db = new DataBaseOpration.OprationOraDAL(_strOracleMIDConnString);
|
// db = new DataBaseOpration.OprationOraDAL(_strOracleMIDConnString);
|
||||||
|
|
||||||
}
|
//}
|
||||||
return db;
|
return db;
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,19 +36,23 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
|
|
||||||
#region 获取订单信息
|
#region 获取订单信息
|
||||||
public DataTable GetOrderList_Car(string matchid, string sku, string area, string block)
|
public DataTable GetOrderList_Car(string orderid, string sku, string area, string block)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string strwhere = string.Empty;
|
string strwhere = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(matchid))
|
if (!string.IsNullOrEmpty(orderid))
|
||||||
{
|
{
|
||||||
strwhere = "and matchid= '" + matchid + "'";
|
strwhere = "and orderid= '" + orderid + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(sku))
|
||||||
|
{
|
||||||
|
strwhere = "and sku= '" + sku + "' ";
|
||||||
}
|
}
|
||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
if (!string.IsNullOrEmpty(area))
|
||||||
{
|
{
|
||||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP,area, block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,Unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid,slist,layer,clientcode from v_orders where state = 0 and oprationstate =0 and block = '{1}' and area='{2}' " + strwhere + " order by layer+1, slist+1",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block, area);
|
block, area);
|
||||||
@ -56,7 +60,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP, area , block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,Unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid,slist,layer,clientcode from v_orders where state = 0 and oprationstate =0 and sku = '{0}' and block = '{1}' " + strwhere + " order by layer+1,slist+1",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block);
|
block);
|
||||||
@ -74,6 +78,27 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderList(string Orderid, string area, string block)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string strwhere = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(Orderid))
|
||||||
|
{
|
||||||
|
strwhere += " and orderid='" + Orderid + "'";
|
||||||
|
}
|
||||||
|
string sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid from v_orders where state = 0 and oprationstate=0 and block = '{0}' and area='{1}' " + strwhere + " order by Tolocation",
|
||||||
|
|
||||||
|
block, area);
|
||||||
|
return db.GetsqlForDT(sql);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("获取订单信息异常:" + ex.Message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@ -482,7 +507,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(id))
|
if (!string.IsNullOrEmpty(id))
|
||||||
{
|
{
|
||||||
sql = string.Format(" update orders set oprationstate=1,oprationtime='{0}' where matchid='{1}' and id='{2}'",
|
sql = string.Format(" update orders set oprationstate=1,oprationtime='{0}' where orderid='{1}' and id='{2}'",
|
||||||
DateTime.Now.ToString(),
|
DateTime.Now.ToString(),
|
||||||
orderid,
|
orderid,
|
||||||
|
|
||||||
@ -490,7 +515,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql = string.Format(" update orders set oprationstate=1,oprationtime='{0}' where matchid='{1}' and sku='{2}'",
|
sql = string.Format(" update orders set oprationstate=1,oprationtime='{0}' where orderid='{1}' and sku='{2}'",
|
||||||
DateTime.Now.ToString(),
|
DateTime.Now.ToString(),
|
||||||
orderid,
|
orderid,
|
||||||
sku);
|
sku);
|
||||||
@ -622,7 +647,7 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改当前标签拣货状态
|
#region 修改当前标签拣货状态
|
||||||
public bool UpdateWorkState_Car(string matchid, int truequantity, string sku, string id, int checkquantity, string usercode = "")
|
public bool UpdateWorkState_Car(string orderid, int truequantity, string sku, string id, int checkquantity, string usercode = "")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -646,10 +671,59 @@ namespace Epost.DAL
|
|||||||
// }
|
// }
|
||||||
// truequantity = trueqty + 1;
|
// truequantity = trueqty + 1;
|
||||||
// }
|
// }
|
||||||
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where matchid='{2}' and id='{4}' ",
|
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where orderid='{2}' and id='{4}' ",
|
||||||
DateTime.Now.ToString(),
|
DateTime.Now.ToString(),
|
||||||
truequantity,
|
truequantity,
|
||||||
matchid,
|
orderid,
|
||||||
|
oprationstate,
|
||||||
|
id,
|
||||||
|
// checkquantity,
|
||||||
|
usercode
|
||||||
|
);
|
||||||
|
long x = db.UpdateSql(upsql);
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态:" + upsql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态异常:" + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpdateWorkState(string orderid, int truequantity, string sku, string id, int checkquantity, string usercode = "")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (uplock)
|
||||||
|
{
|
||||||
|
int oprationstate = 3;
|
||||||
|
// string sql = string.Format("select quantity,truequantity from orders where matchid='{0}' and sku = '{1}' and batchid='{2}'",
|
||||||
|
// matchid,
|
||||||
|
// sku,
|
||||||
|
// batchid);
|
||||||
|
|
||||||
|
//DataTable dt= db.GetsqlForDT(sql);
|
||||||
|
// if (dt!=null&&dt.Rows.Count > 0)
|
||||||
|
// {
|
||||||
|
// int trueqty =Convert.ToInt32( dt.Rows[0]["truequantity"].ToString());
|
||||||
|
// int quantity =Convert.ToInt32( dt.Rows[0]["quantity"].ToString());
|
||||||
|
|
||||||
|
// if (trueqty + 1 == quantity)
|
||||||
|
// {
|
||||||
|
// oprationstate = 3;
|
||||||
|
// }
|
||||||
|
// truequantity = trueqty + 1;
|
||||||
|
// }
|
||||||
|
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity=quantity where orderid='{2}' and id='{4}' ",
|
||||||
|
DateTime.Now.ToString(),
|
||||||
|
truequantity,
|
||||||
|
orderid,
|
||||||
oprationstate,
|
oprationstate,
|
||||||
id,
|
id,
|
||||||
// checkquantity,
|
// checkquantity,
|
||||||
@ -718,7 +792,7 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改当前小车拣货状态
|
#region 修改当前小车拣货状态
|
||||||
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
|
public bool UpdateStateByCar(string OrderID, string block = "", string sku = "")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -731,9 +805,38 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
strwhere += " and sku='" + sku + "'";
|
strwhere += " and sku='" + sku + "'";
|
||||||
}
|
}
|
||||||
string upsql = string.Format("update orders set state=3 where matchid = '{0}'" + strwhere,
|
string upsql = string.Format("update orders set state=3 where OrderID = '{0}'" + strwhere,
|
||||||
matchid);
|
OrderID);
|
||||||
LogHelper.WriteLogInfo("修改波次拣货状态:" + upsql);
|
LogHelper.WriteLogInfo("修改单据拣货状态:" + upsql);
|
||||||
|
long x = db.UpdateSql(upsql);
|
||||||
|
if (x > 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改当前小车拣货状态:" + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpdateState(string area, string block = "", string sku = "")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string strwhere = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(block))
|
||||||
|
{
|
||||||
|
strwhere = " and block='" + block + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(sku))
|
||||||
|
{
|
||||||
|
strwhere += " and sku='" + sku + "'";
|
||||||
|
}
|
||||||
|
string upsql = string.Format("update v_orders set state=3 where area ='" + area + "' and state<>99 " + strwhere);
|
||||||
|
LogHelper.WriteLogInfo("修改通道拣货状态:" + upsql);
|
||||||
long x = db.UpdateSql(upsql);
|
long x = db.UpdateSql(upsql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -1040,7 +1143,7 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 判断当前sku是否为已完成
|
#region 判断当前sku是否为已完成
|
||||||
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string matchid = "")
|
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string orderid = "")
|
||||||
{
|
{
|
||||||
string strwheres = "";
|
string strwheres = "";
|
||||||
if (!string.IsNullOrEmpty(usercode))
|
if (!string.IsNullOrEmpty(usercode))
|
||||||
@ -1061,17 +1164,17 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
strwheres += " and shopid ='" + shopid + "'";
|
strwheres += " and shopid ='" + shopid + "'";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(matchid))
|
if (!string.IsNullOrEmpty(orderid))
|
||||||
{
|
{
|
||||||
strwheres += " and matchid ='" + matchid + "'";
|
strwheres += " and orderid ='" + orderid + "'";
|
||||||
}
|
}
|
||||||
string sql = "select matchid, sku from V_orders where oprationstate <> 3 and state<>99 and block ='" + block + "' " + strwheres;
|
string sql = "select matchid, sku from V_orders where oprationstate <> 3 and state<>99 and block ='" + block + "' " + strwheres;
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("判断当前sku是否为已完成" + sql);
|
LogHelper.WriteLogInfo("判断当前通道是否为已完成" + sql);
|
||||||
DataTable dt = db.GetsqlForDT(sql);
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
if (dt == null || dt.Rows.Count == 0)
|
if (dt == null || dt.Rows.Count == 0)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("判断当前sku是否为已完成true");
|
LogHelper.WriteLogInfo("判断当前通道是否为已完成true");
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1083,6 +1186,59 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public bool IsFinishWorkArea(string block, string usercode = "", string area = "", string sku = "", string shopid = "", string orderid = "")
|
||||||
|
{
|
||||||
|
string strwheres = "";
|
||||||
|
if (!string.IsNullOrEmpty(usercode))
|
||||||
|
{
|
||||||
|
strwheres = " and sku in(select sku from ordersqueue where usercode = '" + usercode + "')";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(sku))
|
||||||
|
{
|
||||||
|
|
||||||
|
strwheres += " and sku ='" + sku + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(block))
|
||||||
|
{
|
||||||
|
|
||||||
|
strwheres += " and block ='" + block + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(area))
|
||||||
|
{
|
||||||
|
|
||||||
|
strwheres += " and area ='" + area + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(orderid))
|
||||||
|
{
|
||||||
|
strwheres += " and orderid ='" + orderid + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(shopid))
|
||||||
|
{
|
||||||
|
strwheres += " and shopid ='" + shopid + "'";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(orderid))
|
||||||
|
{
|
||||||
|
strwheres += " and orderid ='" + orderid + "'";
|
||||||
|
}
|
||||||
|
string sql = "select matchid, sku from V_orders where oprationstate <> 3 and state<>99 " + strwheres;
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("判断阴凉区是否为已完成" + sql);
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
if (dt == null || dt.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断阴凉区是否为已完成true");
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断阴凉区是否为已完成false");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 查询下一区段区号
|
#region 查询下一区段区号
|
||||||
public int getOrderarea(string usercode, string block, string area)
|
public int getOrderarea(string usercode, string block, string area)
|
||||||
{
|
{
|
||||||
@ -2551,7 +2707,7 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
public DataTable GetOrderMatchidInfo(string block, string area)
|
public DataTable GetOrderMatchidInfo(string block, string area)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select distinct matchid,ControlIP from v_orders where (tolocation!='' or tolocation is not null) and block='" + block + "' and area='" + area + "' ");
|
string sql = string.Format("select distinct matchid,ControlIP from v_orders where tolocation!='' and block='" + block + "' and area='" + area + "' ");
|
||||||
DataTable dt = db.GetsqlForDT(sql);
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
@ -2838,22 +2994,22 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 判断订单状态为已完成
|
#region 判断订单状态为已完成
|
||||||
public bool IsFinishWork_box(string boxcode, int endcount, string matchid = "")
|
public bool IsFinishWork_box(string boxcode, int endcount, string OrderID = "")
|
||||||
{
|
{
|
||||||
string sql = string.Format("select matchid from Orders where (matchid='{0}') and oprationstate<>3",
|
string sql = string.Format("select OrderID from Orders where (OrderID='{0}') and oprationstate<>3",
|
||||||
matchid);
|
OrderID);
|
||||||
|
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("判断整箱状态为已完成" + sql);
|
LogHelper.WriteLogInfo("判断单据状态为已完成" + sql);
|
||||||
DataTable dt = db.GetsqlForDT(sql);
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
if (dt == null || dt.Rows.Count == endcount)
|
if (dt == null || dt.Rows.Count == endcount)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("判断整箱状态为已完成true");
|
LogHelper.WriteLogInfo("判断单据状态为已完成true");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("判断整箱状态为已完成false");
|
LogHelper.WriteLogInfo("判断单据状态为已完成false");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2861,5 +3017,58 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public DataTable GetDataIfRepeat(string transderMid, string transderDid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct orderid,transderDid from Orders where orderid='" + transderMid + "' and transderDid='" + transderDid + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpOrdersState(string orderid)
|
||||||
|
{
|
||||||
|
string strwhere = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(orderid))
|
||||||
|
{
|
||||||
|
strwhere += " and orderid='" + orderid + "'";
|
||||||
|
}
|
||||||
|
string sql = string.Format("update Orders set oprationstate='3',quantity=truequantity,state='3' where 1=1 " + strwhere + "");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("接口灭灯-修改状态:" + sql + ",执行条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 校验货位
|
||||||
|
public DataTable GetlocationInfo(string location)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select location from Addressstorage where location='" + location + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 接口根据订单熄灭 一对多标签 修改等待亮灯的状态
|
||||||
|
public bool UpOrdersWaitState(string orderid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Orders set oprationstate='3' where orderid='" + orderid + "' and state!=1 ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("接口灭灯-一对多标签-修改等待亮灯的状态:" + sql + ",执行条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Epost.DAL
|
namespace Epost.DAL
|
||||||
{
|
{
|
||||||
public class OrdersQueueDAL
|
public class OrdersQueueDAL
|
||||||
{
|
{
|
||||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||||
#region 添加任务信息
|
#region 添加任务信息
|
||||||
@ -27,7 +27,7 @@ namespace Epost.DAL
|
|||||||
model.Location,
|
model.Location,
|
||||||
model.Matchid,
|
model.Matchid,
|
||||||
model.Lightcolor);
|
model.Lightcolor);
|
||||||
LogHelper.WriteLogInfo("进入拣货队列========="+sql);
|
LogHelper.WriteLogInfo("进入拣货队列=========" + sql);
|
||||||
long x = db.InsertSql(sql);
|
long x = db.InsertSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -43,18 +43,18 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 获取任务信息
|
#region 获取任务信息
|
||||||
public DataTable getQueuesOrderbyState(string state="0")
|
public DataTable getQueuesOrderbyState(string state = "0")
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from OrdersQueue where state ='{0}'",
|
string sql = string.Format("select * from OrdersQueue where state ='{0}'",
|
||||||
state);
|
state);
|
||||||
// LogHelper.WriteLogInfo("获取正在绑定的信息" + sql);
|
// LogHelper.WriteLogInfo("获取正在绑定的信息" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取queue信息
|
#region 获取queue信息
|
||||||
public DataTable getQueuesOrderbyState(string block,string area,string state)
|
public DataTable getQueuesOrderbyState(string block, string area, string state)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from OrdersQueue where (state ='{0}' or state='0') and taskblock='{1}' and taskarea='{2}' ",
|
string sql = string.Format("select * from OrdersQueue where (state ='{0}' or state='0') and taskblock='{1}' and taskarea='{2}' ",
|
||||||
state,
|
state,
|
||||||
@ -68,19 +68,19 @@ namespace Epost.DAL
|
|||||||
#region 获取任务信息
|
#region 获取任务信息
|
||||||
public DataTable getQueuesbyState()
|
public DataTable getQueuesbyState()
|
||||||
{
|
{
|
||||||
string sql = "select * from OrdersQueue where state<>0 and state<>3";
|
string sql = "select * from OrdersQueue where state<>3";
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取任务信息
|
#region 获取任务信息
|
||||||
public DataTable getOrderqueueByAddr(string addr,string ip)
|
public DataTable getOrderqueueByAddr(string addr, string ip)
|
||||||
{
|
{
|
||||||
string sql =string.Format("select * from OrdersQueue where state=2 and taskarea='{0}' and taskblock='{1}'",
|
string sql = string.Format("select * from OrdersQueue where state=2 and taskarea='{0}' and taskblock='{1}'",
|
||||||
addr,
|
addr,
|
||||||
ip);
|
ip);
|
||||||
LogHelper.WriteLogInfo("获取=="+sql);
|
LogHelper.WriteLogInfo("获取==" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -89,7 +89,12 @@ namespace Epost.DAL
|
|||||||
#region 获取当前区的作业状态
|
#region 获取当前区的作业状态
|
||||||
public DataTable getQueueOrderState(OrdersQueueModel model)
|
public DataTable getQueueOrderState(OrdersQueueModel model)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from OrdersQueue where taskblock='{0}' and taskarea='{1}' and state<>2 and state<>3 order by sort",
|
string strwhere = string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(model.Orderid))
|
||||||
|
{
|
||||||
|
strwhere += " and orderid='" + model.Orderid + "'";
|
||||||
|
}
|
||||||
|
string sql = string.Format("select * from OrdersQueue where taskblock='{0}' and taskarea='{1}' and state<>2 and state<>3 " + strwhere + " order by sort",
|
||||||
model.Taskblock,
|
model.Taskblock,
|
||||||
model.Taskarea);
|
model.Taskarea);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
@ -107,10 +112,10 @@ namespace Epost.DAL
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool DeleteOrderQueue(string matchid,string CancelTime)
|
public bool DeleteOrderQueue(string matchid, string CancelTime)
|
||||||
{
|
{
|
||||||
string sql = string.Format("delete from OrdersQueue where matchid='{0}' and Addtime='{1}'",
|
string sql = string.Format("delete from OrdersQueue where matchid='{0}' and Addtime='{1}'",
|
||||||
matchid,CancelTime);
|
matchid, CancelTime);
|
||||||
long x = db.DeleteSql(sql);
|
long x = db.DeleteSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -122,7 +127,7 @@ namespace Epost.DAL
|
|||||||
#region 获取当前区的作业状态
|
#region 获取当前区的作业状态
|
||||||
public DataTable getQueueState(OrdersQueueModel model)
|
public DataTable getQueueState(OrdersQueueModel model)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from OrdersQueue where taskblock='{0}' and taskarea='{1}' and state=1",
|
string sql = string.Format("select * from OrdersQueue where state=1 and Taskblock='{0}' and Taskarea='{1}'",
|
||||||
model.Taskblock,
|
model.Taskblock,
|
||||||
model.Taskarea);
|
model.Taskarea);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
@ -130,7 +135,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 获取当前区的作业状态
|
#region 获取当前区的作业状态
|
||||||
public DataTable getQueueState(string usercode,string matchid,string block,string area)
|
public DataTable getQueueState(string usercode, string matchid, string block, string area)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from ordersqueue where UserCode='{0}' and matchid='{1}' and Taskblock='{2}' and TaskArea='{3}' and state in(0,1)",
|
string sql = string.Format("select * from ordersqueue where UserCode='{0}' and matchid='{1}' and Taskblock='{2}' and TaskArea='{3}' and state in(0,1)",
|
||||||
usercode,
|
usercode,
|
||||||
@ -142,14 +147,14 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 获取用户下的所有sku
|
#region 获取用户下的所有sku
|
||||||
public DataTable getQueueSKU(OrdersQueueModel model)
|
public DataTable getQueueSKU(OrdersQueueModel model)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select sku from OrdersQueue where taskblock = '{0}' and taskarea = '{1}' and UserCode = '{2}'",
|
string sql = string.Format("select sku from OrdersQueue where taskblock = '{0}' and taskarea = '{1}' and UserCode = '{2}'",
|
||||||
model.Taskblock,
|
model.Taskblock,
|
||||||
model.Taskarea,
|
model.Taskarea,
|
||||||
model.UserCode);
|
model.UserCode);
|
||||||
DataTable dt= db.GetsqlForDT(sql);
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -175,7 +180,7 @@ namespace Epost.DAL
|
|||||||
public bool updateOrderQueue(string block, string area)
|
public bool updateOrderQueue(string block, string area)
|
||||||
{
|
{
|
||||||
string sql = string.Format("update ordersqueue set state = 0 where state=1 and taskblock='{0}' and TaskArea='{1}'",
|
string sql = string.Format("update ordersqueue set state = 0 where state=1 and taskblock='{0}' and TaskArea='{1}'",
|
||||||
block,area);
|
block, area);
|
||||||
LogHelper.WriteLogInfo("换箱、拆箱后恢复作业" + sql);
|
LogHelper.WriteLogInfo("换箱、拆箱后恢复作业" + sql);
|
||||||
long x = db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
@ -186,10 +191,10 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改作业全部完成
|
#region 修改作业全部完成
|
||||||
public bool updateOrderQueueState(string usercode, string block)
|
public bool updateOrderQueueState()
|
||||||
{
|
{
|
||||||
string sql = string.Format("update ordersqueue set state =3 where usercode='{0}' and taskblock ='{1}'",
|
string sql = string.Format("update ordersqueue set state =3 where state<>3"
|
||||||
usercode, block);
|
);
|
||||||
LogHelper.WriteLogInfo("修改作业全部完成" + sql);
|
LogHelper.WriteLogInfo("修改作业全部完成" + sql);
|
||||||
long x = db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
@ -211,11 +216,11 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取sku是否正在作业
|
#region 获取sku是否正在作业
|
||||||
public DataTable GetOrderQueue(string block,string area,string state)
|
public DataTable GetOrderQueue(string block, string area, string state)
|
||||||
{
|
{
|
||||||
string sql = string.Format("select * from OrdersQueue where state <>'{0}' and taskblock='{1}' and taskarea='{2}'",
|
string sql = string.Format("select * from OrdersQueue where state <>'{0}' and taskblock='{1}' and taskarea='{2}'",
|
||||||
state,
|
state,
|
||||||
block,area);
|
block, area);
|
||||||
LogHelper.WriteLogInfo("获取sku是否正在作业" + sql);
|
LogHelper.WriteLogInfo("获取sku是否正在作业" + sql);
|
||||||
return db.GetsqlForDT(sql);
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
@ -230,7 +235,7 @@ namespace Epost.DAL
|
|||||||
model.State);
|
model.State);
|
||||||
|
|
||||||
|
|
||||||
long x= db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
@ -238,10 +243,10 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 修改作业状态
|
#region 修改作业状态
|
||||||
public bool UpdateQueueState(string id,string state)
|
public bool UpdateQueueState(string id, string state)
|
||||||
{
|
{
|
||||||
string sql = string.Format("update OrdersQueue set state='{0}' where id ='{1}'",
|
string sql = string.Format("update OrdersQueue set state='{0}' where id ='{1}'",
|
||||||
state,id);
|
state, id);
|
||||||
long x = db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -250,7 +255,7 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 绑定箱号完成
|
#region 绑定箱号完成
|
||||||
public bool UpdateBoxCode(string id,string boxcode)
|
public bool UpdateBoxCode(string id, string boxcode)
|
||||||
{
|
{
|
||||||
string sql = string.Format("update OrdersQueue set state=3,boxcode='{0}' where id ='{1}'",
|
string sql = string.Format("update OrdersQueue set state=3,boxcode='{0}' where id ='{1}'",
|
||||||
boxcode,
|
boxcode,
|
||||||
@ -269,11 +274,11 @@ namespace Epost.DAL
|
|||||||
model.Taskarea,
|
model.Taskarea,
|
||||||
model.Orderid,
|
model.Orderid,
|
||||||
model.State);
|
model.State);
|
||||||
long x= db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -284,19 +289,21 @@ namespace Epost.DAL
|
|||||||
string strwhere = string.Empty;
|
string strwhere = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(model.Taskblock))
|
if (!string.IsNullOrEmpty(model.Taskblock))
|
||||||
{
|
{
|
||||||
strwhere = "and taskblock='"+model.Taskblock+"'";
|
strwhere = "and taskblock='" + model.Taskblock + "'";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(model.Taskarea))
|
if (!string.IsNullOrEmpty(model.Taskarea))
|
||||||
{
|
{
|
||||||
strwhere += "and Taskarea='" + model.Taskarea + "'";
|
strwhere += "and Taskarea='" + model.Taskarea + "'";
|
||||||
}
|
}
|
||||||
string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and sku = '{1}' and matchid='{2}' and usercode='{3}'"+ strwhere,
|
if (!string.IsNullOrEmpty(model.Orderid))
|
||||||
|
{
|
||||||
|
strwhere += "and Orderid='" + model.Orderid + "'";
|
||||||
|
}
|
||||||
|
string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 " + strwhere,
|
||||||
model.State
|
model.State
|
||||||
,model.Sku,
|
|
||||||
model.Matchid,model.UserCode
|
|
||||||
|
|
||||||
);
|
);
|
||||||
LogHelper.WriteLogInfo("修改作业区段"+sql);
|
LogHelper.WriteLogInfo("修改作业区段" + sql);
|
||||||
long x = db.UpdateSql(sql);
|
long x = db.UpdateSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -305,7 +312,7 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 恢复作业
|
#region 恢复作业
|
||||||
public bool UpdateQueueState()
|
public bool UpdateQueueState()
|
||||||
{
|
{
|
||||||
@ -354,11 +361,11 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
|
|
||||||
#region 删除queue
|
#region 删除queue
|
||||||
public bool DelQueueOrder(string sku,string block)
|
public bool DelQueueOrder(string sku, string block)
|
||||||
{
|
{
|
||||||
string sql = string.Format("delete from OrdersQueue where sku='{0}' and taskblock='{1}' and state<>3",
|
string sql = string.Format("delete from OrdersQueue where sku='{0}' and taskblock='{1}' and state<>3",
|
||||||
sku,block);
|
sku, block);
|
||||||
LogHelper.WriteLogInfo("删除queue"+sql);
|
LogHelper.WriteLogInfo("删除queue" + sql);
|
||||||
long x = db.DeleteSql(sql);
|
long x = db.DeleteSql(sql);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
@ -380,7 +387,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +395,7 @@ namespace Epost.DAL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 删除queue
|
#region 删除queue
|
||||||
public bool DeleteQueue(string block,string area)
|
public bool DeleteQueue(string block, string area)
|
||||||
{
|
{
|
||||||
string sql = string.Format("delete from OrdersQueue where taskblock='{0}' and taskarea='{1}'",
|
string sql = string.Format("delete from OrdersQueue where taskblock='{0}' and taskarea='{1}'",
|
||||||
block, area);
|
block, area);
|
||||||
|
@ -48,6 +48,7 @@ namespace Epost.Model
|
|||||||
private string _Unit = string.Empty;//小单位
|
private string _Unit = string.Empty;//小单位
|
||||||
private string _UserCode = string.Empty;//工号
|
private string _UserCode = string.Empty;//工号
|
||||||
private string _no = string.Empty;//任务序号
|
private string _no = string.Empty;//任务序号
|
||||||
|
private string _clientcode = string.Empty;//货位不存在提示
|
||||||
public string BatchId
|
public string BatchId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -99,7 +100,14 @@ namespace Epost.Model
|
|||||||
_GoodsName = value;
|
_GoodsName = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public string looklisten { get; set; }
|
||||||
|
public string labelIP { get; set; }
|
||||||
|
public string labelno { get; set; }
|
||||||
|
public string genericname { get; set; }
|
||||||
|
public string manufactname { get; set; }
|
||||||
|
public string batchno { get; set; }
|
||||||
|
public string transderDid { get; set; }
|
||||||
|
public string Spec { get; set; }
|
||||||
//public string Discount
|
//public string Discount
|
||||||
//{
|
//{
|
||||||
// get
|
// get
|
||||||
@ -389,6 +397,7 @@ namespace Epost.Model
|
|||||||
public string UserCode { get => _UserCode; set => _UserCode = value; }
|
public string UserCode { get => _UserCode; set => _UserCode = value; }
|
||||||
public string No { get => _no; set => _no = value; }
|
public string No { get => _no; set => _no = value; }
|
||||||
public string ID { get => _ID; set => _ID = value; }
|
public string ID { get => _ID; set => _ID = value; }
|
||||||
|
public string clientcode { get => _clientcode; set => _clientcode = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,4 +37,41 @@ namespace Epost.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class main
|
||||||
|
{
|
||||||
|
public msg msg { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class msg
|
||||||
|
{
|
||||||
|
private string _result = string.Empty;
|
||||||
|
private string _msg = string.Empty;
|
||||||
|
|
||||||
|
public string Status
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _result;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_result = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Message
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_msg = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ using Epost.Common;
|
|||||||
using System.Web.Helpers;
|
using System.Web.Helpers;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Epost.TestToolsWeb.Tests.Controllers
|
namespace Epost.TestToolsWeb.Tests.Controllers
|
||||||
{
|
{
|
||||||
@ -19,14 +20,16 @@ namespace Epost.TestToolsWeb.Tests.Controllers
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void d()
|
public void d()
|
||||||
{
|
{
|
||||||
string sku = "211100";
|
string showmes = "211100|总|938275908324|93875|934725";
|
||||||
if (sku.Substring(0, 1) == "2" && sku.Substring(1, 1) != "5")
|
if (!Regex.IsMatch(showmes, @"[\u4e00-\u9fa5]"))
|
||||||
{
|
{
|
||||||
if (sku.Length >= 7)
|
|
||||||
{
|
|
||||||
sku = sku.Substring(1, 6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
|
LogHelper.WriteLogInfo("dasf");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,31 @@ namespace Epost.DPS.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
[Route("CloseLight")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel CloseLight(string orderid)
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
|
{
|
||||||
|
ResultModel res = new ResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
res = contrbll.Forcedend(orderid);
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("GetDataList异常:" + ex.Message);
|
||||||
|
res.msg = "请求异常!";
|
||||||
|
res.result = "-1";
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -230,6 +230,10 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Startup.cs" />
|
<Compile Include="Startup.cs" />
|
||||||
|
<Compile Include="WebService\WebService.asmx.cs">
|
||||||
|
<DependentUpon>WebService.asmx</DependentUpon>
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Content\bootstrap-theme.css" />
|
<Content Include="Content\bootstrap-theme.css" />
|
||||||
@ -854,6 +858,7 @@
|
|||||||
<Content Include="Content\code\themes\sand-signika.js.map" />
|
<Content Include="Content\code\themes\sand-signika.js.map" />
|
||||||
<Content Include="Content\code\themes\skies.js.map" />
|
<Content Include="Content\code\themes\skies.js.map" />
|
||||||
<Content Include="Content\code\themes\sunset.js.map" />
|
<Content Include="Content\code\themes\sunset.js.map" />
|
||||||
|
<Content Include="WebService\WebService.asmx" />
|
||||||
<None Include="Properties\PublishProfiles\Toolsweb.pubxml" />
|
<None Include="Properties\PublishProfiles\Toolsweb.pubxml" />
|
||||||
<Content Include="Scripts\jquery\jquery-1.11.1.js" />
|
<Content Include="Scripts\jquery\jquery-1.11.1.js" />
|
||||||
<Content Include="Content\js\payment.js" />
|
<Content Include="Content\js\payment.js" />
|
||||||
@ -954,7 +959,7 @@
|
|||||||
<AutoAssignPort>True</AutoAssignPort>
|
<AutoAssignPort>True</AutoAssignPort>
|
||||||
<DevelopmentServerPort>52610</DevelopmentServerPort>
|
<DevelopmentServerPort>52610</DevelopmentServerPort>
|
||||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
<IISUrl>http://localhost:63119/</IISUrl>
|
<IISUrl>http://localhost:63118/</IISUrl>
|
||||||
<NTLMAuthentication>False</NTLMAuthentication>
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
<UseCustomServer>False</UseCustomServer>
|
<UseCustomServer>False</UseCustomServer>
|
||||||
<CustomServerUrl>
|
<CustomServerUrl>
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
||||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||||
<NameOfLastUsedPublishProfile>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<SiteUrlToLaunchAfterPublish />
|
<SiteUrlToLaunchAfterPublish />
|
||||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||||
<publishUrl>D:\驿传\SanYing_DAS-T后台</publishUrl>
|
<publishUrl>D:\驿传\抚远</publishUrl>
|
||||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||||
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
||||||
<EnableUpdateable>true</EnableUpdateable>
|
<EnableUpdateable>true</EnableUpdateable>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,10 @@
|
|||||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
</configSections>
|
</configSections>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="weijie_dpsEntities" connectionString="metadata=res://*/WJDB.csdl|res://*/WJDB.ssdl|res://*/WJDB.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=weijie_dps;user id=sa;password=123456;min pool size=4;max pool size=4;packet size=3072;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=FuYuan;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
||||||
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=BaBi_DAS;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
<!--<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />-->
|
||||||
<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />
|
|
||||||
|
|
||||||
<add name="WMSConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
<!--<add name="OraMidConnString" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />-->
|
||||||
<add name="OraMidConnString" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
|
||||||
|
|
||||||
|
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
@ -27,11 +25,11 @@
|
|||||||
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
||||||
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
||||||
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
||||||
<add key="WebAPIUrl" value="http://localhost:63119/api/WebAPI/ProcessingResult"/>
|
<add key="WebAPIUrl" value="http://localhost:63118/api/WebAPI/ProcessingResult"/>
|
||||||
<add key="ShowMode" value="1" />
|
<add key="ShowMode" value="1" />
|
||||||
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
||||||
<add key="CARID" value="HT01" />
|
<add key="CARID" value="" />
|
||||||
<add key="ServerAPIURL" value="http://localhost:63119/api/WebAPI" />
|
<add key="ServerAPIURL" value="http://localhost:63118/api/WebAPI" />
|
||||||
<add key="SleepTime" value="1" />
|
<add key="SleepTime" value="1" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<!--
|
<!--
|
||||||
@ -48,11 +46,12 @@
|
|||||||
</customErrors>
|
</customErrors>
|
||||||
<authentication mode="None" />
|
<authentication mode="None" />
|
||||||
<compilation debug="true" targetFramework="4.6.1" />
|
<compilation debug="true" targetFramework="4.6.1" />
|
||||||
<httpRuntime targetFramework="4.5.2" />
|
<httpRuntime targetFramework="4.5.2" requestValidationMode="2.0" />
|
||||||
<httpModules>
|
<httpModules>
|
||||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
|
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
|
||||||
</httpModules>
|
</httpModules>
|
||||||
<sessionState mode="InProc" timeout="518400" />
|
<sessionState mode="InProc" timeout="518400" />
|
||||||
|
<pages validateRequest="false" />
|
||||||
</system.web>
|
</system.web>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<modules>
|
<modules>
|
||||||
|
1
Epost.TestToolsWeb/WebService/WebService.asmx
Normal file
1
Epost.TestToolsWeb/WebService/WebService.asmx
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%@ WebService Language="C#" CodeBehind="WebService.asmx.cs" Class="Epost.DPS.WebService.WebService" %>
|
216
Epost.TestToolsWeb/WebService/WebService.asmx.cs
Normal file
216
Epost.TestToolsWeb/WebService/WebService.asmx.cs
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
using Epost.BLL;
|
||||||
|
using Epost.Common;
|
||||||
|
using Epost.DAL;
|
||||||
|
using Epost.DAL.Cache;
|
||||||
|
using Epost.Model;
|
||||||
|
using PTLSystems.Service.PublicF;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Helpers;
|
||||||
|
using System.Web.Razor.Tokenizer.Symbols;
|
||||||
|
using System.Web.Services;
|
||||||
|
|
||||||
|
namespace Epost.DPS.WebService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WebService 的摘要说明
|
||||||
|
/// </summary>
|
||||||
|
[WebService(Namespace = "http://tempuri.org/")]
|
||||||
|
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
||||||
|
[System.ComponentModel.ToolboxItem(false)]
|
||||||
|
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
|
||||||
|
// [System.Web.Script.Services.ScriptService]
|
||||||
|
public class WebService : System.Web.Services.WebService
|
||||||
|
{
|
||||||
|
OrderBLL bll = new OrderBLL();
|
||||||
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||||
|
CommandDAL dal = new CommandDAL();
|
||||||
|
CommandBLL combll = new CommandBLL();
|
||||||
|
|
||||||
|
AddressstorageBLL addbll = new AddressstorageBLL();
|
||||||
|
private object obj = new object();
|
||||||
|
|
||||||
|
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public string ReceiveDataInfo_XML(string action, string messages)
|
||||||
|
{
|
||||||
|
lock (obj)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("WebService请求报文:");
|
||||||
|
LogHelper.WriteLogInfo("action:" + action + "");
|
||||||
|
LogHelper.WriteLogInfo("messages:" + messages + "");
|
||||||
|
|
||||||
|
main main = new main();
|
||||||
|
msg msg = new msg();
|
||||||
|
var resultxml = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(messages))
|
||||||
|
{
|
||||||
|
bool flag = true;
|
||||||
|
string mms = string.Empty;
|
||||||
|
LogHelper.WriteLogInfo("======开始处理数据======");
|
||||||
|
DataSet set = XmlHelper.GetDataSetStrXml(messages.Replace("&", "").Replace("#", "").Replace("△", "").Replace("☆", "").Replace("=", "").Replace("】", "").Replace("【", "").Replace(" ", "").Replace("\"", "").Replace(":", ":").Replace("(", "(").Replace(")", ")").Replace("×", "x").Replace("ω", "w").Replace("α", "a"));
|
||||||
|
if (set != null && set.Tables.Count > 0 && set.Tables[0].Rows.Count > 0)
|
||||||
|
{
|
||||||
|
var ReturnDt = set.Tables["pick"];
|
||||||
|
DataTable dtResult = ReturnDt.Clone();
|
||||||
|
string str = string.Empty;
|
||||||
|
foreach (DataRow item in ReturnDt.Rows)
|
||||||
|
{
|
||||||
|
|
||||||
|
DataTable dt = bll.GetDataIfRepeat(item["transderMid"].ToString(), item["transderDid"].ToString());
|
||||||
|
if (dt == null || dt.Rows.Count <= 0)
|
||||||
|
{
|
||||||
|
DataTable locdt = bll.GetlocationInfo(item["areaId"].ToString());
|
||||||
|
|
||||||
|
|
||||||
|
if (!Regex.IsMatch(item["areaId"].ToString(), @"[\u4e00-\u9fa5]"))
|
||||||
|
{
|
||||||
|
if (locdt != null && locdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
locdt.Columns.Add("strinfo", typeof(string));
|
||||||
|
DataRow dataRow = dtResult.NewRow();
|
||||||
|
dataRow["transderMid"] = item["transderMid"].ToString();
|
||||||
|
dataRow["transderDid"] = item["transderDid"].ToString();
|
||||||
|
dataRow["drugCode"] = item["drugCode"].ToString();
|
||||||
|
dataRow["drugCommName"] = item["drugCommName"].ToString();
|
||||||
|
dataRow["drugName"] = item["drugName"].ToString();
|
||||||
|
dataRow["drugSpec"] = item["drugSpec"].ToString();
|
||||||
|
dataRow["Unit"] = item["Unit"].ToString();
|
||||||
|
dataRow["manufactName"] = item["manufactName"].ToString();
|
||||||
|
dataRow["batchNo"] = item["batchNo"].ToString();
|
||||||
|
dataRow["expire"] = item["expire"].ToString();
|
||||||
|
dataRow["areaId"] = item["areaId"].ToString();
|
||||||
|
dataRow["pickQty"] = item["pickQty"].ToString();
|
||||||
|
dataRow["stock"] = item["stock"].ToString();
|
||||||
|
dataRow["drugStoreName"] = item["drugStoreName"].ToString();
|
||||||
|
dataRow["labelColor"] = item["labelColor"].ToString();
|
||||||
|
dataRow["lookListen"] = item["lookListen"].ToString();
|
||||||
|
dataRow["labelIP"] = item["labelIP"].ToString();
|
||||||
|
dataRow["labelNo"] = item["labelNo"].ToString();
|
||||||
|
dataRow["strinfo"] = dataRow["strinfo"] + str;
|
||||||
|
|
||||||
|
dtResult.Rows.Add(dataRow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("" + item["areaId"].ToString() + ",该货位不存在");
|
||||||
|
str = str + item["areaId"].ToString() + "|";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { LogHelper.WriteLogInfo("" + item["areaId"].ToString() + ",货位包含中文"); }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mms += "主键重复 (" + item["transderMid"].ToString() + "-" + item["transderDid"].ToString() + "),";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region 添加
|
||||||
|
if (!string.IsNullOrEmpty(mms))
|
||||||
|
{
|
||||||
|
mms = mms.Substring(0, mms.Length - 1);
|
||||||
|
|
||||||
|
msg.Status = "erro";
|
||||||
|
msg.Message = "数据异常:" + mms + "";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("数据异常:" + mms + "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> diclist = new Dictionary<string, string>();
|
||||||
|
diclist.Add("transderMid", "orderid");
|
||||||
|
diclist.Add("transderDid", "transderDid");
|
||||||
|
diclist.Add("drugCode", "sku");
|
||||||
|
diclist.Add("drugCommName", "genericname");
|
||||||
|
diclist.Add("drugName", "goodsname");
|
||||||
|
diclist.Add("drugSpec", "Spec");
|
||||||
|
diclist.Add("Unit", "unit");
|
||||||
|
diclist.Add("manufactName", "manufactname");
|
||||||
|
diclist.Add("batchNo", "batchno");
|
||||||
|
diclist.Add("expire", "orderdate");
|
||||||
|
diclist.Add("areaId", "tolocation");
|
||||||
|
diclist.Add("pickQty", "quantity");
|
||||||
|
diclist.Add("stock", "stockquantity");
|
||||||
|
diclist.Add("drugStoreName", "shopname");
|
||||||
|
diclist.Add("labelColor", "labelcolor");
|
||||||
|
diclist.Add("lookListen", "looklisten");
|
||||||
|
diclist.Add("labelIP", "labelIP");
|
||||||
|
diclist.Add("labelNo", "labelno");
|
||||||
|
diclist.Add("strinfo", "clientcode");
|
||||||
|
bool b = bll.ImportOrderinfo(dtResult, diclist);
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
msg.Status = "ok";
|
||||||
|
msg.Message = "接收成功";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("接收成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.Status = "erro";
|
||||||
|
msg.Message = "数据异常:数据接收失败,请检查货位和标签对应关系是否正确,请重试!";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("数据异常:数据接收失败,请重试!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.Status = "ok";
|
||||||
|
msg.Message = "熄灭成功";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("熄灭成功");
|
||||||
|
return resultxml;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.Status = "erro";
|
||||||
|
msg.Message = "数据异常:解析XML失败,请检查XML格式后再进行推送!";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("数据异常:解析XML失败,请检查XML格式后再进行推送!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.Status = "erro";
|
||||||
|
msg.Message = "数据异常:未在XML内获取到数据,请检查后再进行推送!";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("数据异常:未在XML内获取到数据,请检查后再进行推送!");
|
||||||
|
}
|
||||||
|
return resultxml;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
msg.Status = "erro";
|
||||||
|
msg.Message = "数据异常:" + ex.Message + "";
|
||||||
|
main.msg = msg;
|
||||||
|
LogHelper.WriteLogInfo("数据异常:" + ex.Message + "");
|
||||||
|
return resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user