This commit is contained in:
@ -374,5 +374,12 @@ 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);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,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
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1043,5 +1043,17 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
return dal.GetDataIfRepeat(transderMid, transderDid);
|
return dal.GetDataIfRepeat(transderMid, transderDid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrdersDT(string address, string ControlIP)
|
||||||
|
{
|
||||||
|
return dal.GetOrdersDT(address, ControlIP);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 校验货位
|
||||||
|
public DataTable GetlocationInfo(string location)
|
||||||
|
{
|
||||||
|
return dal.GetlocationInfo(location);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,6 +206,28 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public ResultModel Forcedend(string orderid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ResultModel resultModel = comBLL.Forcedend(orderid);
|
||||||
|
|
||||||
|
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 查询波次通道列表
|
||||||
@ -418,7 +440,7 @@ 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);
|
||||||
|
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);
|
||||||
#region 处理合并数据
|
#region 处理合并数据
|
||||||
//int endcount = 1;
|
//int endcount = 1;
|
||||||
@ -436,16 +458,17 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||||
LogHelper.WriteLogInfo("标记------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
LogHelper.WriteLogInfo("标记------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
||||||
bool skuInish = dal.IsFinishWork(1, block, "", area, model.Sku, "", model.OrderID);
|
bool skuInish = dal.IsFinishWork(1, block, "", area, "", "", model.OrderID);
|
||||||
if (skuInish)
|
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拣选完成--------------");
|
||||||
//删除sku缓存信息
|
//删除sku缓存信息
|
||||||
List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Area == data.Area && m.Sku == model.Sku);
|
//List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Area == data.Area && m.Sku == model.Sku);
|
||||||
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
//JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
|
|
||||||
bool allfinish = dal.IsFinishWork_box("", 0, model.OrderID);
|
bool allfinish = dal.IsFinishWork_box("", 0, model.OrderID);
|
||||||
if (allfinish)
|
if (allfinish)
|
||||||
@ -461,7 +484,7 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
//修改订单状态
|
//修改订单状态
|
||||||
dal.UpdateStateByCar(model.OrderID);
|
dal.UpdateStateByCar(model.OrderID);
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Block, data.Area, "0");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -809,5 +809,13 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 根据订单获取要熄灭的标签
|
||||||
|
public DataTable GetForcedendAddress(string orderid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from v_orders where orderid='20416' and oprationstate!=3");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1089,11 +1089,11 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2890,5 +2890,21 @@ namespace Epost.DAL
|
|||||||
DataTable dt = db.GetsqlForDT(sql);
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrdersDT(string address, string ControlIP)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select address,type,area,block,ControlIP,v_orders.id,tolocation,quantity,oprationstate,v_orders.sku,v_orders.orderid from v_orders left join OrdersQueue on v_orders.block=OrdersQueue.Taskblock where address='2001' and ControlIP='192.168.3.118' and oprationstate!=3");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<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>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||||
<_PublishTargetUrl>D:\驿传\抚远</_PublishTargetUrl>
|
<_PublishTargetUrl>D:\驿传\抚远</_PublishTargetUrl>
|
||||||
<History>True|2023-07-25T09:25:54.2443213Z;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-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>
|
||||||
<LastFailureDetails />
|
<LastFailureDetails />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -33,19 +33,19 @@
|
|||||||
<publishTime>04/16/2023 15:06:26</publishTime>
|
<publishTime>04/16/2023 15:06:26</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.compiled">
|
<File Include="bin/App_global.asax.compiled">
|
||||||
<publishTime>07/25/2023 17:23:54</publishTime>
|
<publishTime>08/11/2023 10:58:36</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.dll">
|
<File Include="bin/App_global.asax.dll">
|
||||||
<publishTime>07/25/2023 17:23:54</publishTime>
|
<publishTime>08/11/2023 10:58:36</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||||
<publishTime>02/24/2020 15:29:24</publishTime>
|
<publishTime>02/24/2020 15:29:24</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Common.dll">
|
<File Include="bin/Common.dll">
|
||||||
<publishTime>07/25/2023 17:23:35</publishTime>
|
<publishTime>08/01/2023 10:41:25</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Common.pdb">
|
<File Include="bin/Common.pdb">
|
||||||
<publishTime>07/25/2023 17:23:35</publishTime>
|
<publishTime>08/01/2023 10:41:25</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/ComposerSDK.dll">
|
<File Include="bin/ComposerSDK.dll">
|
||||||
<publishTime>04/16/2023 15:06:26</publishTime>
|
<publishTime>04/16/2023 15:06:26</publishTime>
|
||||||
@ -63,25 +63,25 @@
|
|||||||
<publishTime>10/23/2017 13:15:20</publishTime>
|
<publishTime>10/23/2017 13:15:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.dll">
|
<File Include="bin/Epost.BLL.dll">
|
||||||
<publishTime>07/25/2023 17:23:37</publishTime>
|
<publishTime>08/11/2023 10:58:14</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.pdb">
|
<File Include="bin/Epost.BLL.pdb">
|
||||||
<publishTime>07/25/2023 17:23:37</publishTime>
|
<publishTime>08/11/2023 10:58:14</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
||||||
<publishTime>08/26/2020 18:09:48</publishTime>
|
<publishTime>08/26/2020 18:09:48</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DAL.dll">
|
<File Include="bin/Epost.DAL.dll">
|
||||||
<publishTime>07/25/2023 17:23:36</publishTime>
|
<publishTime>08/11/2023 10:58:13</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DAL.pdb">
|
<File Include="bin/Epost.DAL.pdb">
|
||||||
<publishTime>07/25/2023 17:23:36</publishTime>
|
<publishTime>08/11/2023 10:58:13</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.dll">
|
<File Include="bin/Epost.DPS.dll">
|
||||||
<publishTime>07/25/2023 17:23:41</publishTime>
|
<publishTime>08/11/2023 10:58:21</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.pdb">
|
<File Include="bin/Epost.DPS.pdb">
|
||||||
<publishTime>07/25/2023 17:23:41</publishTime>
|
<publishTime>08/11/2023 10:58:21</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.Model.dll">
|
<File Include="bin/Epost.Model.dll">
|
||||||
<publishTime>07/19/2023 15:37:56</publishTime>
|
<publishTime>07/19/2023 15:37:56</publishTime>
|
||||||
@ -5652,7 +5652,7 @@
|
|||||||
<publishTime>04/16/2023 15:06:27</publishTime>
|
<publishTime>04/16/2023 15:06:27</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="PrecompiledApp.config">
|
<File Include="PrecompiledApp.config">
|
||||||
<publishTime>07/25/2023 17:23:46</publishTime>
|
<publishTime>08/11/2023 10:58:26</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="Scripts/ai.0.22.9-build00167.js">
|
<File Include="Scripts/ai.0.22.9-build00167.js">
|
||||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||||
@ -7572,7 +7572,7 @@
|
|||||||
<publishTime>04/16/2023 15:06:27</publishTime>
|
<publishTime>04/16/2023 15:06:27</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="Web.config">
|
<File Include="Web.config">
|
||||||
<publishTime>07/19/2023 15:38:06</publishTime>
|
<publishTime>08/02/2023 10:43:56</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="WebService/WebService.asmx">
|
<File Include="WebService/WebService.asmx">
|
||||||
<publishTime>07/19/2023 15:30:16</publishTime>
|
<publishTime>07/19/2023 15:30:16</publishTime>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using Epost.BLL;
|
using Epost.BLL;
|
||||||
using Epost.Common;
|
using Epost.Common;
|
||||||
|
using Epost.DAL;
|
||||||
|
using Epost.DAL.Cache;
|
||||||
using Epost.Model;
|
using Epost.Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -7,6 +9,8 @@ using System.Data;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Policy;
|
using System.Security.Policy;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using System.Web.Helpers;
|
||||||
|
using System.Web.Razor.Tokenizer.Symbols;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
|
|
||||||
namespace Epost.DPS.WebService
|
namespace Epost.DPS.WebService
|
||||||
@ -23,6 +27,9 @@ namespace Epost.DPS.WebService
|
|||||||
{
|
{
|
||||||
OrderBLL bll = new OrderBLL();
|
OrderBLL bll = new OrderBLL();
|
||||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||||
|
CommandDAL dal = new CommandDAL();
|
||||||
|
|
||||||
|
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public string ReceiveDataInfo_XML(string action, string messages)
|
public string ReceiveDataInfo_XML(string action, string messages)
|
||||||
@ -41,18 +48,66 @@ namespace Epost.DPS.WebService
|
|||||||
//{
|
//{
|
||||||
if (!string.IsNullOrEmpty(messages))
|
if (!string.IsNullOrEmpty(messages))
|
||||||
{
|
{
|
||||||
|
bool flag = true;
|
||||||
string mms = string.Empty;
|
string mms = string.Empty;
|
||||||
LogHelper.WriteLogInfo("======开始处理数据======");
|
LogHelper.WriteLogInfo("======开始处理数据======");
|
||||||
DataSet set = XmlHelper.GetDataSetStrXml(messages);
|
DataSet set = XmlHelper.GetDataSetStrXml(messages.Replace("&", "").Replace("#", ""));
|
||||||
if (set != null && set.Tables.Count > 0 && set.Tables[0].Rows.Count > 0)
|
if (set != null && set.Tables.Count > 0 && set.Tables[0].Rows.Count > 0)
|
||||||
{
|
{
|
||||||
var ReturnDt = set.Tables["pick"];
|
var ReturnDt = set.Tables["pick"];
|
||||||
DataTable dtResult = ReturnDt.Clone();
|
DataTable dtResult = ReturnDt.Clone();
|
||||||
|
|
||||||
foreach (DataRow item in ReturnDt.Rows)
|
foreach (DataRow item in ReturnDt.Rows)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item["labelNo"].ToString()))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(item["labelIP"].ToString()))
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
|
||||||
|
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 = "数据异常:标签对应控制器IP未传值,请检查数据后重试!";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("数据异常:标签对应控制器IP未传值,请检查数据后重试!");
|
||||||
|
return resultxml;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
DataTable dt = bll.GetDataIfRepeat(item["transderMid"].ToString(), item["transderDid"].ToString());
|
DataTable dt = bll.GetDataIfRepeat(item["transderMid"].ToString(), item["transderDid"].ToString());
|
||||||
if (dt == null || dt.Rows.Count <= 0)
|
if (dt == null || dt.Rows.Count <= 0)
|
||||||
|
{
|
||||||
|
DataTable locdt = bll.GetlocationInfo(item["areaId"].ToString());
|
||||||
|
if (locdt != null && locdt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DataRow dataRow = dtResult.NewRow();
|
DataRow dataRow = dtResult.NewRow();
|
||||||
dataRow["transderMid"] = item["transderMid"].ToString();
|
dataRow["transderMid"] = item["transderMid"].ToString();
|
||||||
@ -76,15 +131,21 @@ namespace Epost.DPS.WebService
|
|||||||
dtResult.Rows.Add(dataRow);
|
dtResult.Rows.Add(dataRow);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("" + item["areaId"].ToString() + "该货位无对应关系");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mms += "主键重复 (" + item["transderMid"].ToString() + "-" + item["transderDid"].ToString() + "),";
|
mms += "主键重复 (" + item["transderMid"].ToString() + "-" + item["transderDid"].ToString() + "),";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(mms))
|
if (!string.IsNullOrEmpty(mms))
|
||||||
{
|
{
|
||||||
mms = mms.Substring(mms.Length - 1, 1);
|
mms = mms.Substring(0, mms.Length - 1);
|
||||||
|
|
||||||
msg.Status = "erro";
|
msg.Status = "erro";
|
||||||
msg.Message = "数据异常:" + mms + "";
|
msg.Message = "数据异常:" + mms + "";
|
||||||
@ -94,8 +155,8 @@ namespace Epost.DPS.WebService
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
Dictionary<string, string> diclist = new Dictionary<string, string>();
|
Dictionary<string, string> diclist = new Dictionary<string, string>();
|
||||||
diclist.Add("transderMid", "orderid");
|
diclist.Add("transderMid", "orderid");
|
||||||
diclist.Add("transderDid", "transderDid");
|
diclist.Add("transderDid", "transderDid");
|
||||||
@ -133,6 +194,16 @@ namespace Epost.DPS.WebService
|
|||||||
LogHelper.WriteLogInfo("数据异常:数据接收失败,请重试!");
|
LogHelper.WriteLogInfo("数据异常:数据接收失败,请重试!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.Status = "ok";
|
||||||
|
msg.Message = "熄灭成功";
|
||||||
|
main.msg = msg;
|
||||||
|
resultxml = XmlHelper.ModelToXml(main);
|
||||||
|
LogHelper.WriteLogInfo("熄灭成功");
|
||||||
|
return resultxml;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user