From f4b525c564bf76f8e8a745fb98c99f7f2b1cd08a Mon Sep 17 00:00:00 2001 From: jl Date: Fri, 29 Nov 2024 11:19:47 +0800 Subject: [PATCH] --- Epost.BLL/SkuInfoBLL.cs | 32 ++++++++----------- Epost.BLL/Work_JobDownThread.cs | 2 +- Epost.DAL/OrdersQueueDAL.cs | 4 +-- Epost.DAL/SkuInfoDAL.cs | 4 +-- .../Controllers/UnitTest1.cs | 12 ++++--- Epost.TestToolsWeb/Epost.DPS.csproj.user | 26 ++++++++++++++- .../PublishProfiles/Toolsweb.pubxml.user | 28 ++++++++-------- 7 files changed, 65 insertions(+), 43 deletions(-) diff --git a/Epost.BLL/SkuInfoBLL.cs b/Epost.BLL/SkuInfoBLL.cs index 729aa31..d3af5a6 100644 --- a/Epost.BLL/SkuInfoBLL.cs +++ b/Epost.BLL/SkuInfoBLL.cs @@ -14,26 +14,20 @@ namespace Epost.BLL WmsTaskBLL taskbll = new WmsTaskBLL(); public DataTable GetSkuInfoList(string sku) { - //if (sku.Substring(0, 1) == "2") - //{ - // if (sku.Substring(1, 1) == "5") - // { - // if (sku.Length >= 7) - // { - // sku = sku.Substring(2, 6); - // } - // } - // else { - // if (sku.Length >= 7) - // { - // sku = sku.Substring(1, 6); - // } - // } - // return dal.GetSkuInfo(sku); - //} - //else { + if (sku.Substring(0, 1) == "2") + { + + if (sku.Length >= 8) + { + sku = sku.Substring(0, 8); + } + + return dal.GetSkuInfo(sku); + } + else + { return dal.GetSkuInfoList(sku); - // } + } } diff --git a/Epost.BLL/Work_JobDownThread.cs b/Epost.BLL/Work_JobDownThread.cs index 518fde0..f09bab0 100644 --- a/Epost.BLL/Work_JobDownThread.cs +++ b/Epost.BLL/Work_JobDownThread.cs @@ -248,7 +248,7 @@ namespace Epost.BLL //修改订单状态 orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity); LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter); - bool skuInish = orderbll.IsFinishWork(1, block, "", area, model.Sku); + bool skuInish = orderbll.IsFinishWork(1, block, "", area, model.Sku,"", model.Matchid); model.State = 3; if (skuInish) { diff --git a/Epost.DAL/OrdersQueueDAL.cs b/Epost.DAL/OrdersQueueDAL.cs index 024a4b8..1b1881c 100644 --- a/Epost.DAL/OrdersQueueDAL.cs +++ b/Epost.DAL/OrdersQueueDAL.cs @@ -290,10 +290,10 @@ namespace Epost.DAL { strwhere += "and Taskarea='" + model.Taskarea + "'"; } - string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and sku = '{1}' and matchid='{2}' and usercode='{3}'"+ strwhere, + string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and sku = '{1}' and matchid='{2}' "+ strwhere, model.State ,model.Sku, - model.Matchid,model.UserCode + model.Matchid ); LogHelper.WriteLogInfo("修改作业区段"+sql); diff --git a/Epost.DAL/SkuInfoDAL.cs b/Epost.DAL/SkuInfoDAL.cs index 632f480..406986a 100644 --- a/Epost.DAL/SkuInfoDAL.cs +++ b/Epost.DAL/SkuInfoDAL.cs @@ -29,8 +29,8 @@ namespace Epost.DAL // sku); //string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'", // sku, sku); - string sql = string.Format(" SELECT * FROM skuinfo WHERE sku='{0}'", - sku); + string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'", + sku, sku); return db.GetsqlForDT(sql); } diff --git a/Epost.TestToolsWeb.Tests/Controllers/UnitTest1.cs b/Epost.TestToolsWeb.Tests/Controllers/UnitTest1.cs index a14d123..1db3895 100644 --- a/Epost.TestToolsWeb.Tests/Controllers/UnitTest1.cs +++ b/Epost.TestToolsWeb.Tests/Controllers/UnitTest1.cs @@ -9,6 +9,7 @@ using Epost.Common; using System.Web.Helpers; using System.Data; using System.Configuration; +using System.Windows.Forms; namespace Epost.TestToolsWeb.Tests.Controllers { @@ -19,13 +20,16 @@ namespace Epost.TestToolsWeb.Tests.Controllers [TestMethod] public void d() { - string sku = "211100"; - if (sku.Substring(0, 1) == "2" && sku.Substring(1, 1) != "5") + string sku = "2509267236248"; + if (sku.Substring(0, 1) == "2") { - if (sku.Length >= 7) + + if (sku.Length >= 8) { - sku = sku.Substring(1, 6); + sku = sku.Substring(0, 8); } + + } } } diff --git a/Epost.TestToolsWeb/Epost.DPS.csproj.user b/Epost.TestToolsWeb/Epost.DPS.csproj.user index 9425c57..2eaafac 100644 --- a/Epost.TestToolsWeb/Epost.DPS.csproj.user +++ b/Epost.TestToolsWeb/Epost.DPS.csproj.user @@ -21,5 +21,29 @@ ApiControllerEmptyScaffolder root/Common/Web API - + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + False + + + + \ No newline at end of file diff --git a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user index 0a03f03..77f5b02 100644 --- a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user +++ b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user @@ -33,19 +33,19 @@ 04/04/2018 15:45:12 - 11/27/2024 18:53:46 + 11/28/2024 15:05:51 - 11/27/2024 18:53:45 + 11/28/2024 15:05:51 02/24/2020 15:29:24 - 11/27/2024 18:53:33 + 11/28/2024 11:43:05 - 11/27/2024 18:53:33 + 11/28/2024 11:43:05 04/29/2020 16:50:14 @@ -63,31 +63,31 @@ 10/23/2017 13:15:20 - 11/27/2024 18:53:34 + 11/28/2024 15:05:39 - 11/27/2024 18:53:34 + 11/28/2024 15:05:39 08/26/2020 18:09:48 - 11/27/2024 18:53:33 + 11/28/2024 15:05:39 - 11/27/2024 18:53:33 + 11/28/2024 15:05:39 - 11/27/2024 18:53:37 + 11/28/2024 15:05:42 - 11/27/2024 18:53:37 + 11/28/2024 15:05:42 - 11/27/2024 18:53:33 + 11/28/2024 11:43:04 - 11/27/2024 18:53:33 + 11/28/2024 11:43:04 09/06/2018 11:57:11 @@ -5652,7 +5652,7 @@ 05/30/2022 16:58:47 - 11/27/2024 18:53:39 + 11/28/2024 15:05:44 04/04/2018 15:45:12 @@ -7572,7 +7572,7 @@ 07/04/2022 14:22:38 - 11/27/2024 18:53:38 + 11/28/2024 11:43:10 \ No newline at end of file