This commit is contained in:
@ -677,6 +677,30 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
|
@ -409,7 +409,7 @@ namespace Epost.BLL
|
||||
else
|
||||
{
|
||||
|
||||
dal.UpdateWorkState_Car(model.OrderID, truequantity, model.Sku, model.ID, checkquaantity, model.UserCode);
|
||||
dal.UpdateWorkState(model.OrderID, truequantity, model.Sku, model.ID, checkquaantity, model.UserCode);
|
||||
}
|
||||
|
||||
|
||||
@ -846,9 +846,9 @@ namespace Epost.BLL
|
||||
}
|
||||
}
|
||||
|
||||
public DataTable GetOrderList(string area, string block)
|
||||
public DataTable GetOrderList(string Orderid, string area, string block)
|
||||
{
|
||||
return dal.GetOrderList(area, block);
|
||||
return dal.GetOrderList(Orderid, area, block);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -212,8 +212,11 @@ namespace Epost.BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList().FindAll(x => x.OrderID == orderid);
|
||||
ResultModel resultModel = comBLL.Forcedend(orderid);
|
||||
|
||||
|
||||
JobCache.UpdateJobModelList(jobList, EcommendType.Execute);
|
||||
return resultModel;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -416,8 +419,8 @@ namespace Epost.BLL
|
||||
}
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
List<JobModel> rjob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
||||
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||
List<JobModel> finList = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 3);
|
||||
JobCache.UpdateJobModelList(finList, EcommendType.Execute);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -457,35 +460,41 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||
LogHelper.WriteLogInfo("标记------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
||||
bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", model.OrderID);
|
||||
LogHelper.WriteLogInfo("拍下------" + data.Address + "------" + model.OrderID + "----" + model.State + "");
|
||||
//bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", model.OrderID);
|
||||
bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", "");
|
||||
if (skuInish)
|
||||
{
|
||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||
//LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||
|
||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Block, data.Area, "0");
|
||||
|
||||
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
||||
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);
|
||||
|
||||
bool allfinish = dal.IsFinishWork_box("", 0, model.OrderID);
|
||||
if (allfinish)
|
||||
//bool allfinish = dal.IsFinishWork_box("", 0, model.OrderID);
|
||||
//if (allfinish)
|
||||
//{
|
||||
#region 修改任务队列状态
|
||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||
qumodel.State = 3;
|
||||
qumodel.Taskblock = block;
|
||||
qumodel.Taskarea = area;
|
||||
//qumodel.Orderid = model.OrderID;
|
||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||
#endregion
|
||||
|
||||
//修改订单状态
|
||||
dal.UpdateState(model.Area, model.Block);
|
||||
|
||||
bool WorkArea = dal.IsFinishWorkArea("", "", "99", "", "", "");
|
||||
if (skuInish)
|
||||
{
|
||||
#region 修改任务队列状态
|
||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||
qumodel.State = 3;
|
||||
qumodel.Taskblock = block;
|
||||
qumodel.Taskarea = area;
|
||||
qumodel.Orderid = model.OrderID;
|
||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||
#endregion
|
||||
|
||||
//修改订单状态
|
||||
dal.UpdateStateByCar(model.OrderID);
|
||||
|
||||
comBLL.DISPLAY_LIGHT_BLOCK_Out("", model.Area, "0");
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -522,24 +531,37 @@ namespace Epost.BLL
|
||||
//当前区没有作业
|
||||
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 orderdt = orderbll.GetOrderList(narea, nblock);
|
||||
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||
DataTable QueueDt = queueBLL.getQueueState(model);
|
||||
if (QueueDt == null || QueueDt.Rows.Count <= 0)
|
||||
{
|
||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||
qmodel.Taskblock = nblock;
|
||||
qmodel.Taskarea = narea;
|
||||
qmodel.UserCode = "";
|
||||
qmodel.Orderid = orderdt.Rows[0]["orderid"].ToString();
|
||||
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);
|
||||
queueBLL.insertQueueOrders(qmodel);
|
||||
}
|
||||
}
|
||||
}
|
||||
displayOrder(queueDT, nblock, narea, list, model);
|
||||
#endregion
|
||||
|
||||
}
|
||||
@ -558,29 +580,28 @@ namespace Epost.BLL
|
||||
#region 点亮设备
|
||||
public void displayOrder(DataTable queueDT, string nblock, string narea, List<LabelParamModel> list, OrdersQueueModel model)
|
||||
{
|
||||
model.Id = Convert.ToInt32(queueDT.Rows[0]["id"].ToString());
|
||||
#region 点亮任务
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList();
|
||||
List<JobModel> isJobList = jobList.FindAll(p => p.Block == nblock && p.Area == narea && p.State != 3);
|
||||
ShowMessageModel showmodel = new ShowMessageModel();
|
||||
//获取当前区任务并加入缓存
|
||||
if (!isJobList.Any())
|
||||
if (queueDT != null && queueDT.Rows.Count > 0)
|
||||
{
|
||||
model.State = 1;
|
||||
orderbll.GetOrderList(queueDT.Rows[0]["Orderid"].ToString(), nblock, "", narea, queueDT.Rows[0]["usercode"].ToString());
|
||||
|
||||
ShowMessageModel showmodel = new ShowMessageModel();
|
||||
////获取当前区任务并加入缓存
|
||||
//if (!isJobList.Any())
|
||||
//{
|
||||
|
||||
List<JobModel> nowJoblist = jobList.FindAll(p => p.State == 0 && p.Block == model.Taskblock && p.Area == model.Taskarea);
|
||||
if (nowJoblist.Any())
|
||||
{
|
||||
var nowmodel = nowJoblist.FirstOrDefault();
|
||||
|
||||
LogHelper.WriteLogInfo("进入任务点亮=====matchid=" + nowmodel.Matchid + "===orderid===" + nowmodel.OrderID + "=====");
|
||||
#region 点亮任务标s签
|
||||
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())
|
||||
{
|
||||
|
||||
|
||||
#region
|
||||
#region 判断同一订单、同一货位多条数据 合并显示
|
||||
//List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
||||
int quantity = item.Quantity;
|
||||
@ -599,10 +620,6 @@ namespace Epost.BLL
|
||||
//}
|
||||
#endregion
|
||||
|
||||
//if (item.Tolocation.Contains("-"))
|
||||
//{
|
||||
// var aryloc = item.Tolocation.Split('-');
|
||||
//}
|
||||
LabelParamModel lamodel = new LabelParamModel();
|
||||
string address = item.Address.ToString();
|
||||
lamodel.Address = address;
|
||||
@ -611,12 +628,12 @@ namespace Epost.BLL
|
||||
|
||||
|
||||
lamodel.Title = item.genericname;
|
||||
lamodel.Content = "" + item.Sku.Substring(item.Sku.Length - 4, 4) + "\t" + item.Spec + "\r" + item.GoodsName + "\r批号 " + item.batchno + "\t" + item.manufactname.Substring(0, 4) + "";
|
||||
lamodel.Content = "" + item.Sku.Substring(item.Sku.Length - 4, 4) + "\t" + item.Spec + "\r" + item.GoodsName + "\r批号" + item.batchno + "\t" + item.manufactname.Substring(0, 4) + "";
|
||||
var aryloc = item.Tolocation.Split('-');
|
||||
lamodel.Loc = "" + aryloc[0].ToString() + "-" + aryloc[1].ToString() + "";
|
||||
lamodel.W_quantity = aryloc[2].ToString();
|
||||
lamodel.Quantity = quantity.ToString();
|
||||
lamodel.Unit = "盒";
|
||||
lamodel.Unit = item.Unit;
|
||||
lamodel.PicChoose = "";
|
||||
#region 看似听似
|
||||
if (item.looklisten == "18")
|
||||
@ -678,13 +695,29 @@ namespace Epost.BLL
|
||||
|
||||
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.DisplayTime = DateTime.Now;
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 点亮通道灯
|
||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
if (list != null && list.Count > 0)
|
||||
@ -693,21 +726,14 @@ namespace Epost.BLL
|
||||
comBLL.DISPLAY_JOBALL(list);
|
||||
}
|
||||
}
|
||||
else
|
||||
{//无任务
|
||||
LogHelper.WriteLogInfo("点亮====无任务=======================");
|
||||
model.State = 3;
|
||||
}
|
||||
//else
|
||||
//{//无任务
|
||||
// LogHelper.WriteLogInfo("点亮====无任务=======================");
|
||||
// model.State = 3;
|
||||
// queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
||||
//}
|
||||
#endregion
|
||||
if (jobList.Any())
|
||||
{
|
||||
|
||||
var finishList = jobList.FindAll(p => p.State == 0);
|
||||
if (!finishList.Any())
|
||||
{
|
||||
queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
||||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
//{
|
||||
|
@ -9,13 +9,13 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.DAL
|
||||
{
|
||||
public class AddressstorageDAL
|
||||
public class AddressstorageDAL
|
||||
{
|
||||
//DB db = new DB();
|
||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||
|
||||
#region 查询设备所在区
|
||||
public DataTable getBlock(string address,string type,string controlip)
|
||||
public DataTable getBlock(string address, string type, string controlip)
|
||||
{
|
||||
string sql = "";
|
||||
if (string.IsNullOrEmpty(type))
|
||||
@ -40,13 +40,13 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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}'",
|
||||
address,
|
||||
controlIP
|
||||
);
|
||||
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
||||
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
@ -71,9 +71,9 @@ namespace Epost.DAL
|
||||
{
|
||||
string sql = string.Format(" select * from v_address where location = '{0}'",
|
||||
location
|
||||
|
||||
|
||||
);
|
||||
// LogHelper.WriteLogInfo("根据货位号查询标签地址" + sql);
|
||||
// LogHelper.WriteLogInfo("根据货位号查询标签地址" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
@ -92,16 +92,16 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#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}'",
|
||||
location,
|
||||
block,
|
||||
area,way
|
||||
area, way
|
||||
);
|
||||
// LogHelper.WriteLogInfo("根据地址、通道查询信息:" + sql);
|
||||
// LogHelper.WriteLogInfo("根据地址、通道查询信息:" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ namespace Epost.DAL
|
||||
public DataTable getControlList()
|
||||
{
|
||||
string sql = string.Format("select * from Controller");
|
||||
// LogHelper.WriteLogInfo("获取控制器列表" + sql);
|
||||
// LogHelper.WriteLogInfo("获取控制器列表" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
#endregion
|
||||
@ -158,32 +158,36 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#region 根据区域 查询显示箱号地址
|
||||
public DataTable GetBoxAddress(string block,string area,int type)
|
||||
public DataTable GetBoxAddress(string block, string area, int type)
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
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,
|
||||
|
||||
|
||||
type);
|
||||
LogHelper.WriteLogInfo("根据区域 查询显示地址"+sql);
|
||||
LogHelper.WriteLogInfo("根据区域 查询显示地址---通道灯" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#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}'",
|
||||
block,
|
||||
area,type);
|
||||
|
||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
||||
area, type);
|
||||
|
||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + 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)",
|
||||
block,
|
||||
area);
|
||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
||||
// LogHelper.WriteLogInfo("根据区域 查询显示箱号地址" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
@ -206,7 +210,7 @@ namespace Epost.DAL
|
||||
public DataTable GetScanList()
|
||||
{
|
||||
string sql = string.Format("select * from V_Address where type =6");
|
||||
|
||||
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
||||
@ -223,9 +227,9 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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);
|
||||
}
|
||||
@ -253,7 +257,7 @@ namespace Epost.DAL
|
||||
#region 获取所有小区
|
||||
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);
|
||||
}
|
||||
#endregion
|
||||
@ -274,13 +278,13 @@ namespace Epost.DAL
|
||||
#region 获取所有通道
|
||||
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);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页获取数据列表
|
||||
|
||||
|
||||
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.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.Append("SELECT COUNT(*) FROM Addressstorage AS T ");
|
||||
@ -333,12 +337,12 @@ namespace Epost.DAL
|
||||
|
||||
//---
|
||||
#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(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));
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
#endregion
|
||||
@ -428,7 +432,7 @@ namespace Epost.DAL
|
||||
#region 根据条件删除货位
|
||||
public bool Locational_Binding_Save(string one, string two, string three, string four, string five, string six)
|
||||
{
|
||||
|
||||
|
||||
#region one
|
||||
string sql1 = "update Addressstorage ";
|
||||
try
|
||||
@ -576,7 +580,7 @@ namespace Epost.DAL
|
||||
//}
|
||||
strSql.Append(" ) TT");
|
||||
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);
|
||||
|
||||
List<AddressstorageModel> list = ModelConvertHelper<AddressstorageModel>.ConvertToList(db.GetsqlForDT(sq1.ToString()));
|
||||
@ -639,7 +643,7 @@ namespace Epost.DAL
|
||||
);
|
||||
// LogHelper.WriteLogInfo("根据地址查询货位信息" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@ -662,7 +666,7 @@ namespace Epost.DAL
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 设置所有的设备都为1
|
||||
@ -812,7 +816,7 @@ namespace Epost.DAL
|
||||
#region 根据订单获取要熄灭的标签
|
||||
public DataTable GetForcedendAddress(string orderid)
|
||||
{
|
||||
string sql = string.Format("select * from v_orders where orderid='20416' and oprationstate!=3");
|
||||
string sql = string.Format("select distinct ControlIP,address from v_orders where orderid='" + orderid + "' and oprationstate!=3");
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
return dt;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace Epost.DAL
|
||||
string sql = string.Empty;
|
||||
if (!string.IsNullOrEmpty(area))
|
||||
{
|
||||
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 <>3 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 from v_orders where state = 0 and oprationstate =0 and block = '{1}' and area='{2}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block, area);
|
||||
@ -60,7 +60,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
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 <>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 from v_orders where state = 0 and oprationstate =0 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block);
|
||||
@ -78,13 +78,16 @@ namespace Epost.DAL
|
||||
}
|
||||
}
|
||||
|
||||
public DataTable GetOrderList(string area, string block)
|
||||
public DataTable GetOrderList(string Orderid, string area, string block)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
|
||||
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 <>3 and block = '{0}' and area='{1}' " + strwhere + "",
|
||||
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 + "",
|
||||
|
||||
block, area);
|
||||
return db.GetsqlForDT(sql);
|
||||
@ -504,7 +507,7 @@ namespace Epost.DAL
|
||||
string sql = string.Empty;
|
||||
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(),
|
||||
orderid,
|
||||
|
||||
@ -512,7 +515,7 @@ namespace Epost.DAL
|
||||
}
|
||||
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(),
|
||||
orderid,
|
||||
sku);
|
||||
@ -691,6 +694,55 @@ namespace Epost.DAL
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
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,
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -768,6 +820,36 @@ namespace Epost.DAL
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
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 + "' " + strwhere);
|
||||
LogHelper.WriteLogInfo("修改通道拣货状态:" + upsql);
|
||||
long x = db.UpdateSql(upsql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("修改当前小车拣货状态:" + ex.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -1105,6 +1187,59 @@ namespace Epost.DAL
|
||||
}
|
||||
#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 查询下一区段区号
|
||||
public int getOrderarea(string usercode, string block, string area)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.DAL
|
||||
{
|
||||
public class OrdersQueueDAL
|
||||
public class OrdersQueueDAL
|
||||
{
|
||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||
#region 添加任务信息
|
||||
@ -27,7 +27,7 @@ namespace Epost.DAL
|
||||
model.Location,
|
||||
model.Matchid,
|
||||
model.Lightcolor);
|
||||
LogHelper.WriteLogInfo("进入拣货队列========="+sql);
|
||||
LogHelper.WriteLogInfo("进入拣货队列=========" + sql);
|
||||
long x = db.InsertSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -43,18 +43,18 @@ namespace Epost.DAL
|
||||
}
|
||||
#endregion
|
||||
#region 获取任务信息
|
||||
public DataTable getQueuesOrderbyState(string state="0")
|
||||
public DataTable getQueuesOrderbyState(string state = "0")
|
||||
{
|
||||
string sql = string.Format("select * from OrdersQueue where state ='{0}'",
|
||||
state);
|
||||
// LogHelper.WriteLogInfo("获取正在绑定的信息" + sql);
|
||||
// LogHelper.WriteLogInfo("获取正在绑定的信息" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#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}' ",
|
||||
state,
|
||||
@ -75,12 +75,12 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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,
|
||||
ip);
|
||||
LogHelper.WriteLogInfo("获取=="+sql);
|
||||
LogHelper.WriteLogInfo("获取==" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
|
||||
}
|
||||
@ -89,7 +89,12 @@ namespace Epost.DAL
|
||||
#region 获取当前区的作业状态
|
||||
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.Taskarea);
|
||||
return db.GetsqlForDT(sql);
|
||||
@ -107,10 +112,10 @@ namespace Epost.DAL
|
||||
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}'",
|
||||
matchid,CancelTime);
|
||||
matchid, CancelTime);
|
||||
long x = db.DeleteSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -122,7 +127,7 @@ namespace Epost.DAL
|
||||
#region 获取当前区的作业状态
|
||||
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.Taskarea);
|
||||
return db.GetsqlForDT(sql);
|
||||
@ -130,7 +135,7 @@ namespace Epost.DAL
|
||||
}
|
||||
#endregion
|
||||
#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)",
|
||||
usercode,
|
||||
@ -142,14 +147,14 @@ namespace Epost.DAL
|
||||
}
|
||||
#endregion
|
||||
#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}'",
|
||||
model.Taskblock,
|
||||
model.Taskarea,
|
||||
model.UserCode);
|
||||
DataTable dt= db.GetsqlForDT(sql);
|
||||
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
|
||||
return dt;
|
||||
}
|
||||
#endregion
|
||||
@ -175,7 +180,7 @@ namespace Epost.DAL
|
||||
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}'",
|
||||
block,area);
|
||||
block, area);
|
||||
LogHelper.WriteLogInfo("换箱、拆箱后恢复作业" + sql);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
@ -211,11 +216,11 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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}'",
|
||||
state,
|
||||
block,area);
|
||||
block, area);
|
||||
LogHelper.WriteLogInfo("获取sku是否正在作业" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
|
||||
@ -230,7 +235,7 @@ namespace Epost.DAL
|
||||
model.State);
|
||||
|
||||
|
||||
long x= db.UpdateSql(sql);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
return false;
|
||||
@ -238,10 +243,10 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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}'",
|
||||
state,id);
|
||||
state, id);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -250,7 +255,7 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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}'",
|
||||
boxcode,
|
||||
@ -269,11 +274,11 @@ namespace Epost.DAL
|
||||
model.Taskarea,
|
||||
model.Orderid,
|
||||
model.State);
|
||||
long x= db.UpdateSql(sql);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
@ -284,18 +289,21 @@ namespace Epost.DAL
|
||||
string strwhere = string.Empty;
|
||||
if (!string.IsNullOrEmpty(model.Taskblock))
|
||||
{
|
||||
strwhere = "and taskblock='"+model.Taskblock+"'";
|
||||
strwhere = "and taskblock='" + model.Taskblock + "'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.Taskarea))
|
||||
{
|
||||
strwhere += "and Taskarea='" + model.Taskarea + "'";
|
||||
}
|
||||
string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and orderid='{1}' and usercode='{2}'" + strwhere,
|
||||
model.State,
|
||||
model.Orderid,model.UserCode
|
||||
|
||||
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
|
||||
|
||||
);
|
||||
LogHelper.WriteLogInfo("修改作业区段"+sql);
|
||||
LogHelper.WriteLogInfo("修改作业区段" + sql);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -304,7 +312,7 @@ namespace Epost.DAL
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 恢复作业
|
||||
public bool UpdateQueueState()
|
||||
{
|
||||
@ -353,11 +361,11 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#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",
|
||||
sku,block);
|
||||
LogHelper.WriteLogInfo("删除queue"+sql);
|
||||
sku, block);
|
||||
LogHelper.WriteLogInfo("删除queue" + sql);
|
||||
long x = db.DeleteSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -379,7 +387,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
@ -387,7 +395,7 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#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}'",
|
||||
block, area);
|
||||
|
@ -11,7 +11,7 @@
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||
<NameOfLastUsedPublishProfile>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
@ -7,7 +7,7 @@
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<_PublishTargetUrl>D:\驿传\抚远</_PublishTargetUrl>
|
||||
<History>True|2023-08-11T02:59:03.8399200Z;True|2023-08-10T10:43:16.0729140+08:00;True|2023-08-08T15:22:08.0127989+08:00;True|2023-08-08T13:59:07.6838749+08:00;True|2023-08-08T13:57:15.7160673+08:00;True|2023-08-03T15:39:49.2488696+08:00;True|2023-08-03T13:13:24.0839734+08:00;True|2023-08-02T14:19:21.5188473+08:00;True|2023-08-02T10:44:46.7436910+08:00;True|2023-08-01T10:42:26.5280618+08:00;True|2023-07-28T15:54:24.3172356+08:00;True|2023-07-25T17:25:54.2443213+08:00;True|2023-07-25T17:24:33.4620388+08:00;True|2023-07-19T16:26:31.8476193+08:00;True|2023-07-19T16:04:27.8753884+08:00;True|2023-07-19T15:38:50.9706808+08:00;True|2023-07-03T13:53:41.0701316+08:00;True|2023-04-27T20:14:15.0331014+08:00;True|2023-04-21T16:37:45.9559800+08:00;True|2023-04-20T19:12:32.4520337+08:00;True|2023-04-20T18:51:17.9201241+08:00;True|2023-04-20T16:36:34.8353434+08:00;True|2023-04-19T11:42:01.7398184+08:00;True|2023-04-19T11:37:42.0024926+08:00;True|2023-04-18T15:36:56.8763198+08:00;True|2023-04-18T14:56:45.8672402+08:00;True|2023-04-17T10:51:00.4138485+08:00;True|2023-04-16T18:42:38.2510554+08:00;False|2023-04-16T18:42:10.5319125+08:00;True|2023-04-16T18:32:05.9038034+08:00;True|2023-04-16T17:11:22.6510841+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
||||
<History>True|2023-08-29T06:40:55.7436382Z;True|2023-08-29T13:53:07.9540335+08:00;True|2023-08-28T18:11:01.9231397+08:00;True|2023-08-28T14:56:19.8843265+08:00;True|2023-08-23T11:17:33.7204155+08:00;True|2023-08-11T10:59:03.8399200+08:00;True|2023-08-10T10:43:16.0729140+08:00;True|2023-08-08T15:22:08.0127989+08:00;True|2023-08-08T13:59:07.6838749+08:00;True|2023-08-08T13:57:15.7160673+08:00;True|2023-08-03T15:39:49.2488696+08:00;True|2023-08-03T13:13:24.0839734+08:00;True|2023-08-02T14:19:21.5188473+08:00;True|2023-08-02T10:44:46.7436910+08:00;True|2023-08-01T10:42:26.5280618+08:00;True|2023-07-28T15:54:24.3172356+08:00;True|2023-07-25T17:25:54.2443213+08:00;True|2023-07-25T17:24:33.4620388+08:00;True|2023-07-19T16:26:31.8476193+08:00;True|2023-07-19T16:04:27.8753884+08:00;True|2023-07-19T15:38:50.9706808+08:00;True|2023-07-03T13:53:41.0701316+08:00;True|2023-04-27T20:14:15.0331014+08:00;True|2023-04-21T16:37:45.9559800+08:00;True|2023-04-20T19:12:32.4520337+08:00;True|2023-04-20T18:51:17.9201241+08:00;True|2023-04-20T16:36:34.8353434+08:00;True|2023-04-19T11:42:01.7398184+08:00;True|2023-04-19T11:37:42.0024926+08:00;True|2023-04-18T15:36:56.8763198+08:00;True|2023-04-18T14:56:45.8672402+08:00;True|2023-04-17T10:51:00.4138485+08:00;True|2023-04-16T18:42:38.2510554+08:00;False|2023-04-16T18:42:10.5319125+08:00;True|2023-04-16T18:32:05.9038034+08:00;True|2023-04-16T17:11:22.6510841+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@ -33,19 +33,19 @@
|
||||
<publishTime>04/16/2023 15:06:26</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.compiled">
|
||||
<publishTime>08/11/2023 10:58:36</publishTime>
|
||||
<publishTime>08/30/2023 15:26:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.dll">
|
||||
<publishTime>08/11/2023 10:58:36</publishTime>
|
||||
<publishTime>08/30/2023 15:26:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>02/24/2020 15:29:24</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Common.dll">
|
||||
<publishTime>08/01/2023 10:41:25</publishTime>
|
||||
<publishTime>08/29/2023 13:52:05</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Common.pdb">
|
||||
<publishTime>08/01/2023 10:41:25</publishTime>
|
||||
<publishTime>08/29/2023 13:52:05</publishTime>
|
||||
</File>
|
||||
<File Include="bin/ComposerSDK.dll">
|
||||
<publishTime>04/16/2023 15:06:26</publishTime>
|
||||
@ -63,25 +63,25 @@
|
||||
<publishTime>10/23/2017 13:15:20</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.dll">
|
||||
<publishTime>08/11/2023 10:58:14</publishTime>
|
||||
<publishTime>08/30/2023 15:23:28</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.pdb">
|
||||
<publishTime>08/11/2023 10:58:14</publishTime>
|
||||
<publishTime>08/30/2023 15:23:28</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
||||
<publishTime>08/26/2020 18:09:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DAL.dll">
|
||||
<publishTime>08/11/2023 10:58:13</publishTime>
|
||||
<publishTime>08/29/2023 16:29:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DAL.pdb">
|
||||
<publishTime>08/11/2023 10:58:13</publishTime>
|
||||
<publishTime>08/29/2023 16:29:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DPS.dll">
|
||||
<publishTime>08/11/2023 10:58:21</publishTime>
|
||||
<publishTime>08/30/2023 15:26:31</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.DPS.pdb">
|
||||
<publishTime>08/11/2023 10:58:21</publishTime>
|
||||
<publishTime>08/30/2023 15:26:30</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Epost.Model.dll">
|
||||
<publishTime>07/19/2023 15:37:56</publishTime>
|
||||
@ -5652,7 +5652,7 @@
|
||||
<publishTime>04/16/2023 15:06:27</publishTime>
|
||||
</File>
|
||||
<File Include="PrecompiledApp.config">
|
||||
<publishTime>08/11/2023 10:58:26</publishTime>
|
||||
<publishTime>08/30/2023 15:26:32</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/ai.0.22.9-build00167.js">
|
||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||
@ -7572,7 +7572,7 @@
|
||||
<publishTime>04/16/2023 15:06:27</publishTime>
|
||||
</File>
|
||||
<File Include="Web.config">
|
||||
<publishTime>08/02/2023 10:43:56</publishTime>
|
||||
<publishTime>08/30/2023 15:26:31</publishTime>
|
||||
</File>
|
||||
<File Include="WebService/WebService.asmx">
|
||||
<publishTime>07/19/2023 15:30:16</publishTime>
|
||||
|
@ -25,11 +25,11 @@
|
||||
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
||||
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
||||
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
||||
<add key="WebAPIUrl" value="http://localhost:63118/api/WebAPI/ProcessingResult"/>
|
||||
<add key="WebAPIUrl" value="http://192.168.0.111:8081/api/WebAPI/ProcessingResult"/>
|
||||
<add key="ShowMode" value="1" />
|
||||
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
||||
<add key="CARID" value="HT01" />
|
||||
<add key="ServerAPIURL" value="http://localhost:63119/api/WebAPI" />
|
||||
<add key="ServerAPIURL" value="http://localhost:63118/api/WebAPI" />
|
||||
<add key="SleepTime" value="1" />
|
||||
</appSettings>
|
||||
<!--
|
||||
|
@ -28,218 +28,224 @@ namespace Epost.DPS.WebService
|
||||
OrderBLL bll = new OrderBLL();
|
||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||
CommandDAL dal = new CommandDAL();
|
||||
private object obj = new object();
|
||||
|
||||
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||
|
||||
[WebMethod]
|
||||
public string ReceiveDataInfo_XML(string action, string messages)
|
||||
{
|
||||
LogHelper.WriteLogInfo("WebService请求报文:");
|
||||
LogHelper.WriteLogInfo("action:" + action + "");
|
||||
LogHelper.WriteLogInfo("messages:" + messages + "");
|
||||
|
||||
main main = new main();
|
||||
msg msg = new msg();
|
||||
var resultxml = string.Empty;
|
||||
try
|
||||
lock (obj)
|
||||
{
|
||||
//DataTable queuedt = queueBLL.getQueuesbyState();
|
||||
//if (queuedt == null || queuedt.Rows.Count <= 0)
|
||||
//{
|
||||
if (!string.IsNullOrEmpty(messages))
|
||||
LogHelper.WriteLogInfo("WebService请求报文:");
|
||||
LogHelper.WriteLogInfo("action:" + action + "");
|
||||
LogHelper.WriteLogInfo("messages:" + messages + "");
|
||||
|
||||
main main = new main();
|
||||
msg msg = new msg();
|
||||
var resultxml = string.Empty;
|
||||
try
|
||||
{
|
||||
bool flag = true;
|
||||
string mms = string.Empty;
|
||||
LogHelper.WriteLogInfo("======开始处理数据======");
|
||||
DataSet set = XmlHelper.GetDataSetStrXml(messages.Replace("&", "").Replace("#", ""));
|
||||
if (set != null && set.Tables.Count > 0 && set.Tables[0].Rows.Count > 0)
|
||||
//DataTable queuedt = queueBLL.getQueuesbyState();
|
||||
//if (queuedt == null || queuedt.Rows.Count <= 0)
|
||||
//{
|
||||
if (!string.IsNullOrEmpty(messages))
|
||||
{
|
||||
var ReturnDt = set.Tables["pick"];
|
||||
DataTable dtResult = ReturnDt.Clone();
|
||||
|
||||
foreach (DataRow item in ReturnDt.Rows)
|
||||
bool flag = true;
|
||||
string mms = string.Empty;
|
||||
LogHelper.WriteLogInfo("======开始处理数据======");
|
||||
DataSet set = XmlHelper.GetDataSetStrXml(messages.Replace("&", "").Replace("#", "").Replace("△", "").Replace("☆", "").Replace("=", "").Replace("】", "").Replace("【", "").Replace(" ","").Replace("\"", ""));
|
||||
if (set != null && set.Tables.Count > 0 && set.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item["labelNo"].ToString()))
|
||||
var ReturnDt = set.Tables["pick"];
|
||||
DataTable dtResult = ReturnDt.Clone();
|
||||
|
||||
foreach (DataRow item in ReturnDt.Rows)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item["labelIP"].ToString()))
|
||||
if (!string.IsNullOrEmpty(item["labelNo"].ToString()))
|
||||
{
|
||||
DataTable orderdt = bll.GetOrdersDT(item["labelIP"].ToString(), item["labelIP"].ToString());
|
||||
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||
if (!string.IsNullOrEmpty(item["labelIP"].ToString()))
|
||||
{
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["labelIP"].ToString();
|
||||
model.Address = item["labelNo"].ToString();
|
||||
model.Command = "REMOVE_JOB";
|
||||
model.Uid = orderdt.Rows[0]["id"].ToString();
|
||||
model.Type = "C";
|
||||
list.Add(model);
|
||||
dal.SendALL(list);
|
||||
DataTable orderdt = bll.GetOrdersDT(item["labelIP"].ToString(), item["labelIP"].ToString());
|
||||
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||
{
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["labelIP"].ToString();
|
||||
model.Address = item["labelNo"].ToString();
|
||||
model.Command = "REMOVE_JOB";
|
||||
model.Uid = orderdt.Rows[0]["id"].ToString();
|
||||
model.Type = "C";
|
||||
list.Add(model);
|
||||
dal.SendALL(list);
|
||||
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList().FindAll(p => p.ID == orderdt.Rows[0]["id"].ToString());
|
||||
JobCache.UpdateJobModelList(jobList, EcommendType.Execute);
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList().FindAll(p => p.ID == orderdt.Rows[0]["id"].ToString());
|
||||
JobCache.UpdateJobModelList(jobList, EcommendType.Execute);
|
||||
|
||||
flag = false;
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Status = "erro";
|
||||
msg.Message = "数据异常:当前标签未亮灯!";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("数据异常:当前标签未亮灯!");
|
||||
return resultxml;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Status = "erro";
|
||||
msg.Message = "数据异常:当前标签未亮灯!";
|
||||
msg.Message = "数据异常:标签对应控制器IP未传值,请检查数据后重试!";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("数据异常:当前标签未亮灯!");
|
||||
LogHelper.WriteLogInfo("数据异常:标签对应控制器IP未传值,请检查数据后重试!");
|
||||
return resultxml;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Status = "erro";
|
||||
msg.Message = "数据异常:标签对应控制器IP未传值,请检查数据后重试!";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("数据异常:标签对应控制器IP未传值,请检查数据后重试!");
|
||||
return resultxml;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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 (locdt != null && locdt.Rows.Count > 0)
|
||||
DataTable dt = bll.GetDataIfRepeat(item["transderMid"].ToString(), item["transderDid"].ToString());
|
||||
if (dt == null || dt.Rows.Count <= 0)
|
||||
{
|
||||
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["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();
|
||||
DataTable locdt = bll.GetlocationInfo(item["areaId"].ToString());
|
||||
if (locdt != null && locdt.Rows.Count > 0)
|
||||
{
|
||||
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();
|
||||
|
||||
dtResult.Rows.Add(dataRow);
|
||||
dtResult.Rows.Add(dataRow);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("" + item["areaId"].ToString() + ",该货位不存在");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("" + item["areaId"].ToString() + "该货位无对应关系");
|
||||
mms += "主键重复 (" + item["transderMid"].ToString() + "-" + item["transderDid"].ToString() + "),";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
|
||||
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.XmlSerialize(main);
|
||||
LogHelper.WriteLogInfo("数据异常:数据接收失败,请重试!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mms += "主键重复 (" + item["transderMid"].ToString() + "-" + item["transderDid"].ToString() + "),";
|
||||
msg.Status = "ok";
|
||||
msg.Message = "熄灭成功";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("熄灭成功");
|
||||
return resultxml;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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("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");
|
||||
|
||||
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.XmlSerialize(main);
|
||||
LogHelper.WriteLogInfo("数据异常:数据接收失败,请重试!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Status = "ok";
|
||||
msg.Message = "熄灭成功";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("熄灭成功");
|
||||
return resultxml;
|
||||
}
|
||||
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失败,请检查XML格式后再进行推送!";
|
||||
msg.Message = "数据异常:未在XML内获取到数据,请检查后再进行推送!";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("数据异常:解析XML失败,请检查XML格式后再进行推送!");
|
||||
LogHelper.WriteLogInfo("数据异常:未在XML内获取到数据,请检查后再进行推送!");
|
||||
}
|
||||
return resultxml;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// msg.Status = "erro";
|
||||
// msg.Message = "数据异常/当前存在拣药任务";
|
||||
// main.msg = msg;
|
||||
// LogHelper.WriteLogInfo("数据异常/当前存在拣药任务");
|
||||
// return resultxml = XmlHelper.ModelToXml(main);
|
||||
//}
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg.Status = "erro";
|
||||
msg.Message = "数据异常:未在XML内获取到数据,请检查后再进行推送!";
|
||||
msg.Message = "数据异常:" + ex.Message + "";
|
||||
main.msg = msg;
|
||||
resultxml = XmlHelper.ModelToXml(main);
|
||||
LogHelper.WriteLogInfo("数据异常:未在XML内获取到数据,请检查后再进行推送!");
|
||||
LogHelper.WriteLogInfo("数据异常:" + ex.Message + "");
|
||||
return resultxml = XmlHelper.ModelToXml(main);
|
||||
}
|
||||
return resultxml;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// msg.Status = "erro";
|
||||
// msg.Message = "数据异常/当前存在拣药任务";
|
||||
// main.msg = msg;
|
||||
// LogHelper.WriteLogInfo("数据异常/当前存在拣药任务");
|
||||
// return resultxml = XmlHelper.ModelToXml(main);
|
||||
//}
|
||||
}
|
||||
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