This commit is contained in:
@ -945,5 +945,11 @@ namespace Epost.BLL
|
|||||||
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public bool UpdateData(DataTable dt, Dictionary<string, string> diclist, string tablename)
|
||||||
|
{
|
||||||
|
|
||||||
|
return dal.UpdateData(dt, diclist, tablename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2585,5 +2585,10 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public bool UpdateData(DataTable dt, Dictionary<string, string> diclist, string tablename)
|
||||||
|
{
|
||||||
|
return db.UpdateData(dt, tablename, diclist);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,28 +8,36 @@ namespace Epost.Model
|
|||||||
{
|
{
|
||||||
public class WmsOrderModel
|
public class WmsOrderModel
|
||||||
{
|
{
|
||||||
private string orderid = string.Empty;
|
|
||||||
private int truequantity = 0;
|
|
||||||
private string oprationtime = string.Empty;
|
|
||||||
private string batchid = string.Empty;
|
|
||||||
private string sku = string.Empty;
|
|
||||||
private string matchid = string.Empty;
|
|
||||||
private string fromlocation = string.Empty;
|
|
||||||
private string boxcode = string.Empty;
|
|
||||||
private string oprationcode = string.Empty;
|
|
||||||
private int quantity = 0;
|
|
||||||
private string workblock = string.Empty;
|
|
||||||
|
|
||||||
public string Orderid { get => orderid; set => orderid = value; }
|
|
||||||
public int Truequantity { get => truequantity; set => truequantity = value; }
|
public class PutOrderReq
|
||||||
public string Oprationtime { get => oprationtime; set => oprationtime = value; }
|
{
|
||||||
public string Batchid { get => batchid; set => batchid = value; }
|
public string WAVENO { get; set; }
|
||||||
public string Sku { get => sku; set => sku = value; }
|
public string SHOPID { get; set; }
|
||||||
public string Matchid { get => matchid; set => matchid = value; }
|
public string SHOPNAME { get; set; }
|
||||||
public string Fromlocation { get => fromlocation; set => fromlocation = value; }
|
public string ORDERWAY { get; set; }
|
||||||
public string Boxcode { get => boxcode; set => boxcode = value; }
|
public string PRINO { get; set; }
|
||||||
public int Quantity { get => quantity; set => quantity = value; }
|
public string LOCATION { get; set; }
|
||||||
public string Oprationcode { get => oprationcode; set => oprationcode = value; }
|
public string WAREHOUSEID { get; set; }
|
||||||
public string Workblock { get => workblock; set => workblock = value; }
|
public List<ORDERITEM> ITEMS { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ORDERITEM
|
||||||
|
{
|
||||||
|
public string UUID { get; set; }
|
||||||
|
public string DOCNO { get; set; }
|
||||||
|
public string SKU { get; set; }
|
||||||
|
public string BARCODE { get; set; }
|
||||||
|
public object BATCHNO { get; set; }
|
||||||
|
public int ISBATCH { get; set; }
|
||||||
|
public int QUANTITY { get; set; }
|
||||||
|
public string DESCR_C { get; set; }
|
||||||
|
public string UDF01 { get; set; }
|
||||||
|
public string UDF02 { get; set; }
|
||||||
|
public string UDF03 { get; set; }
|
||||||
|
public string UDF04 { get; set; }
|
||||||
|
public string UDF05 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
135
Epost.TestToolsWeb/Controllers/TaskAPIController.cs
Normal file
135
Epost.TestToolsWeb/Controllers/TaskAPIController.cs
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
using Epost.BLL;
|
||||||
|
using Epost.Common;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||||
|
using System.Web.Http;
|
||||||
|
using static Epost.Model.WmsOrderModel;
|
||||||
|
|
||||||
|
namespace Epost.DPS.Controllers
|
||||||
|
{
|
||||||
|
[RoutePrefix("api/WebAPI")]
|
||||||
|
public class TaskAPIController : ApiController
|
||||||
|
{
|
||||||
|
private static object apiobj = new object();
|
||||||
|
OrderBLL orderbll = new OrderBLL();
|
||||||
|
|
||||||
|
[Route("PutOrderInfoRequest")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel PutOrderInfoRequest(List<PutOrderReq> data)
|
||||||
|
{
|
||||||
|
ResultModel result = new ResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string isdel = string.Empty;
|
||||||
|
lock (apiobj)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("PutOrderInfoRequest:" + JsonHelper.SerializeObject(data));
|
||||||
|
if (data.Any())
|
||||||
|
{
|
||||||
|
#region 创建datatable
|
||||||
|
DataTable dataTable = new DataTable();
|
||||||
|
dataTable.TableName = "orders";
|
||||||
|
dataTable.Columns.Add(new DataColumn("matchid", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("orderid", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("shopid", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("shopname", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("orderway", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("prino", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("tolocation", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("warehouseid", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("batchid", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("sku", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("barcode", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("goodscode", typeof(string)));//批次
|
||||||
|
dataTable.Columns.Add(new DataColumn("goodsname", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("quantity", typeof(int)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("downdate", typeof(string)));
|
||||||
|
#endregion
|
||||||
|
foreach (PutOrderReq item in data)
|
||||||
|
{
|
||||||
|
foreach (ORDERITEM detailitem in item.ITEMS)
|
||||||
|
{
|
||||||
|
#region datatable
|
||||||
|
DataRow dataRow = dataTable.NewRow();
|
||||||
|
dataRow["matchid"] = item.WAVENO;//波次
|
||||||
|
dataRow["orderid"] = detailitem.DOCNO;//订单编号
|
||||||
|
dataRow["shopid"] = item.SHOPID;//货主
|
||||||
|
dataRow["shopname"] = item.SHOPNAME;
|
||||||
|
dataRow["orderway"] = item.ORDERWAY;
|
||||||
|
dataRow["prino"] = item.PRINO;
|
||||||
|
dataRow["tolocation"] = item.LOCATION;
|
||||||
|
dataRow["warehouseid"] = item.WAREHOUSEID;
|
||||||
|
dataRow["batchid"] = detailitem.UUID;
|
||||||
|
dataRow["sku"] = detailitem.SKU;
|
||||||
|
dataRow["barcode"] = detailitem.BARCODE;
|
||||||
|
dataRow["goodscode"] = detailitem.BATCHNO;
|
||||||
|
dataRow["goodsname"] = detailitem.DESCR_C;
|
||||||
|
dataRow["quantity"] = detailitem.QUANTITY;
|
||||||
|
dataRow["downdate"] = DateTime.Now.ToString();
|
||||||
|
dataTable.Rows.Add(dataRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#region Dic
|
||||||
|
Dictionary<string, string> diclist = new Dictionary<string, string>();
|
||||||
|
diclist.Add("matchid", "matchid");
|
||||||
|
diclist.Add("orderid", "orderid");
|
||||||
|
diclist.Add("shopid", "shopid");
|
||||||
|
diclist.Add("shopname", "shopname");
|
||||||
|
diclist.Add("orderway", "orderway");
|
||||||
|
diclist.Add("prino", "prino");
|
||||||
|
diclist.Add("tolocation", "tolocation");
|
||||||
|
diclist.Add("warehouseid", "warehouseid");
|
||||||
|
diclist.Add("batchid", "batchid");
|
||||||
|
diclist.Add("sku", "sku");
|
||||||
|
diclist.Add("barcode", "barcode");
|
||||||
|
diclist.Add("goodscode", "goodscode");
|
||||||
|
diclist.Add("goodsname", "goodsname");
|
||||||
|
diclist.Add("quantity", "quantity");
|
||||||
|
diclist.Add("downdate", "downdate");
|
||||||
|
#endregion
|
||||||
|
bool bo = orderbll.UpdateData(dataTable, diclist, "orders");
|
||||||
|
if (bo)
|
||||||
|
{
|
||||||
|
result.msg = "成功!";
|
||||||
|
result.result = "0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.msg = "请求失败!";
|
||||||
|
result.result = "-1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.msg = "参数异常!";
|
||||||
|
result.result = "-1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("PutOrderInfoRequest:" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
result.result = "-1";
|
||||||
|
result.msg = "请求接口异常!";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -224,6 +224,7 @@
|
|||||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\ServerController.cs" />
|
<Compile Include="Controllers\ServerController.cs" />
|
||||||
|
<Compile Include="Controllers\TaskAPIController.cs" />
|
||||||
<Compile Include="Controllers\WebAPIController.cs" />
|
<Compile Include="Controllers\WebAPIController.cs" />
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||||
<_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS</_PublishTargetUrl>
|
<_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS</_PublishTargetUrl>
|
||||||
<History>True|2025-06-04T07:01:49.8008687Z||;True|2025-01-16T15:37:40.8814043+08:00||;True|2024-12-19T15:11:44.2536385+08:00||;True|2024-12-10T19:10:26.6514077+08:00||;True|2024-12-10T18:30:34.7211512+08:00||;True|2024-12-09T14:06:46.4112259+08:00||;True|2024-12-03T14:23:26.2134334+08:00||;True|2024-11-27T18:53:48.7373661+08:00||;True|2024-11-27T14:27:33.0840789+08:00||;True|2024-11-27T14:08:15.6442660+08:00||;True|2024-11-27T12:10:03.9412549+08:00||;True|2024-11-27T11:45:31.3775097+08:00||;True|2024-11-27T11:32:00.8297320+08:00||;True|2024-11-23T20:50:04.5476409+08:00||;False|2024-11-04T17:48:25.2781696+08:00||;True|2024-11-01T16:04:56.3535724+08:00||;True|2024-09-01T10:13:37.1598955+08:00||;True|2024-08-31T17:27:57.5375469+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|2025-06-16T08:39:46.1896351Z||;True|2025-06-04T15:01:49.8008687+08:00||;True|2025-01-16T15:37:40.8814043+08:00||;True|2024-12-19T15:11:44.2536385+08:00||;True|2024-12-10T19:10:26.6514077+08:00||;True|2024-12-10T18:30:34.7211512+08:00||;True|2024-12-09T14:06:46.4112259+08:00||;True|2024-12-03T14:23:26.2134334+08:00||;True|2024-11-27T18:53:48.7373661+08:00||;True|2024-11-27T14:27:33.0840789+08:00||;True|2024-11-27T14:08:15.6442660+08:00||;True|2024-11-27T12:10:03.9412549+08:00||;True|2024-11-27T11:45:31.3775097+08:00||;True|2024-11-27T11:32:00.8297320+08:00||;True|2024-11-23T20:50:04.5476409+08:00||;False|2024-11-04T17:48:25.2781696+08:00||;True|2024-11-01T16:04:56.3535724+08:00||;True|2024-09-01T10:13:37.1598955+08:00||;True|2024-08-31T17:27:57.5375469+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/04/2018 15:45:12</publishTime>
|
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.compiled">
|
<File Include="bin/App_global.asax.compiled">
|
||||||
<publishTime>06/05/2025 15:04:03</publishTime>
|
<publishTime>06/16/2025 16:39:42</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.dll">
|
<File Include="bin/App_global.asax.dll">
|
||||||
<publishTime>06/05/2025 15:04:03</publishTime>
|
<publishTime>06/16/2025 16:39:42</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>06/04/2025 18:11:41</publishTime>
|
<publishTime>06/16/2025 16:29:30</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Common.pdb">
|
<File Include="bin/Common.pdb">
|
||||||
<publishTime>06/04/2025 18:11:41</publishTime>
|
<publishTime>06/16/2025 16:29:30</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/ComposerSDK.dll">
|
<File Include="bin/ComposerSDK.dll">
|
||||||
<publishTime>04/29/2020 16:50:14</publishTime>
|
<publishTime>04/29/2020 16:50:14</publishTime>
|
||||||
@ -63,31 +63,31 @@
|
|||||||
<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>06/05/2025 15:03:46</publishTime>
|
<publishTime>06/16/2025 16:29:31</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.pdb">
|
<File Include="bin/Epost.BLL.pdb">
|
||||||
<publishTime>06/05/2025 15:03:46</publishTime>
|
<publishTime>06/16/2025 16:29:31</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>06/05/2025 15:03:45</publishTime>
|
<publishTime>06/16/2025 16:29:30</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DAL.pdb">
|
<File Include="bin/Epost.DAL.pdb">
|
||||||
<publishTime>06/05/2025 15:03:45</publishTime>
|
<publishTime>06/16/2025 16:29:30</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.dll">
|
<File Include="bin/Epost.DPS.dll">
|
||||||
<publishTime>06/05/2025 15:03:50</publishTime>
|
<publishTime>06/16/2025 16:39:25</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.pdb">
|
<File Include="bin/Epost.DPS.pdb">
|
||||||
<publishTime>06/05/2025 15:03:50</publishTime>
|
<publishTime>06/16/2025 16:39:25</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.Model.dll">
|
<File Include="bin/Epost.Model.dll">
|
||||||
<publishTime>06/04/2025 18:11:40</publishTime>
|
<publishTime>06/16/2025 16:29:29</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.Model.pdb">
|
<File Include="bin/Epost.Model.pdb">
|
||||||
<publishTime>06/04/2025 18:11:40</publishTime>
|
<publishTime>06/16/2025 16:29:29</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.TestToolsWeb.dll">
|
<File Include="bin/Epost.TestToolsWeb.dll">
|
||||||
<publishTime>09/06/2018 11:57:11</publishTime>
|
<publishTime>09/06/2018 11:57:11</publishTime>
|
||||||
@ -5652,7 +5652,7 @@
|
|||||||
<publishTime>05/30/2022 16:58:47</publishTime>
|
<publishTime>05/30/2022 16:58:47</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="PrecompiledApp.config">
|
<File Include="PrecompiledApp.config">
|
||||||
<publishTime>06/05/2025 15:03:52</publishTime>
|
<publishTime>06/16/2025 16:39:28</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>07/04/2022 14:22:38</publishTime>
|
<publishTime>07/04/2022 14:22:38</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="Web.config">
|
<File Include="Web.config">
|
||||||
<publishTime>06/04/2025 15:01:24</publishTime>
|
<publishTime>06/16/2025 16:39:26</publishTime>
|
||||||
</File>
|
</File>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user