From cc38437359a49fa886e87096d12b0dd4f52ded80 Mon Sep 17 00:00:00 2001 From: jl Date: Tue, 24 Jun 2025 21:27:13 +0800 Subject: [PATCH] --- Epost.BLL/OrderBLL.cs | 11 ++--- Epost.BLL/OrdersQueueBLL.cs | 4 +- Epost.BLL/Work_JobDownThread.cs | 24 +++++++---- Epost.BLL/Work_ScanThread.cs | 10 +++-- Epost.DAL/OrdersDAL.cs | 7 ++-- Epost.DAL/OrdersQueueDAL.cs | 6 +-- .../PublishProfiles/Toolsweb.pubxml.user | 36 ++++++++--------- PrintBoxFormsApp/Form1.Designer.cs | 40 ------------------- PrintBoxFormsApp/Form1.cs | 20 ---------- PrintBoxFormsApp/PrintBoxFormsApp.csproj | 6 --- 10 files changed, 55 insertions(+), 109 deletions(-) delete mode 100644 PrintBoxFormsApp/Form1.Designer.cs delete mode 100644 PrintBoxFormsApp/Form1.cs diff --git a/Epost.BLL/OrderBLL.cs b/Epost.BLL/OrderBLL.cs index aacb72d..93dda00 100644 --- a/Epost.BLL/OrderBLL.cs +++ b/Epost.BLL/OrderBLL.cs @@ -660,7 +660,7 @@ namespace Epost.BLL //} if (OrderDt != null && OrderDt.Rows.Count > 0) { - string usercode = string.Empty; + // string usercode = string.Empty; string lightcolor = string.Empty; //DataTable udt = dal.GetOrderUseerXCode(matchid, sku, area, block); //if (udt != null && udt.Rows.Count > 0) @@ -692,12 +692,12 @@ namespace Epost.BLL demodel.Discount = item["Discount"].ToString(); demodel.WholeUnit = item["WholeUnit"].ToString(); demodel.Unit = item["Unit"].ToString(); - + #region 获取库位信息 demodel.Block = item["Block"].ToString(); demodel.Area = item["Area"].ToString(); demodel.Address = item["address"].ToString(); - demodel.UserCode = usercode; + demodel.UserCode = UserCode; demodel.ColorCode = lightcolor; demodel.Bkaddress = "0"; demodel.Addresstype = "1"; @@ -718,6 +718,7 @@ namespace Epost.BLL // demodel.No = "04"; // demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue); //} + demodel.UserCode = UserCode; list.Add(demodel); if (!isecho) { //修改数据为已读 @@ -835,9 +836,9 @@ namespace Epost.BLL #endregion #region 修改订单信息 - public bool Updatestate(string matchid,string readdate) + public bool Updatestate(string matchid,string shopid) { - return dal.Updatestate(matchid,readdate); + return dal.Updatestate(matchid, shopid); } #endregion diff --git a/Epost.BLL/OrdersQueueBLL.cs b/Epost.BLL/OrdersQueueBLL.cs index 28ff4b0..4bdb627 100644 --- a/Epost.BLL/OrdersQueueBLL.cs +++ b/Epost.BLL/OrdersQueueBLL.cs @@ -141,10 +141,10 @@ namespace Epost.BLL } #endregion #region 获取sku是否正在作业 - public DataTable GetOrderQueue(string block,string area, string state) + public DataTable GetOrderQueue(string block,string area, string state,string sku) { - return dal.GetOrderQueue(block,area, state); + return dal.GetOrderQueue(block,area, state,sku); } #endregion diff --git a/Epost.BLL/Work_JobDownThread.cs b/Epost.BLL/Work_JobDownThread.cs index 78f9467..4d954d7 100644 --- a/Epost.BLL/Work_JobDownThread.cs +++ b/Epost.BLL/Work_JobDownThread.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Linq; +using System.Runtime.Remoting.Metadata.W3cXsd2001; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -161,7 +162,7 @@ namespace Epost.BLL if (finjob.Any()) { JobModel finmodel = finjob.FirstOrDefault(); - qmodel.UserCode = finmodel.UserCode; + // qmodel.UserCode = finmodel.UserCode; qmodel.Sku = finmodel.Sku; qmodel.Matchid = finmodel.Matchid; @@ -275,22 +276,29 @@ namespace Epost.BLL #endregion } - - bool shopfinish = orderbll.IsFinishWork(1, block, "", area,"", model.ShopID, model.Matchid); + + bool shopfinish = orderbll.IsFinishWork(1, block, "", area, "", model.ShopID, model.Matchid); if (shopfinish) { LogHelper.WriteLogInfo("门店拣选完成换箱" + model.ShopID); - orderbll.ChangeBox(model, 2); + orderbll.Updatestate(model.Matchid, model.ShopID); } else { - #region 换箱 if (type == 2) { - LogHelper.WriteLogInfo("开始换箱" + model.ShopID); - orderbll.ChangeBox(model); + LogHelper.WriteLogInfo("拣选人员操作换箱"); + orderbll.Updatestate(model.Matchid, model.ShopID); } - #endregion } + //else { + // #region 换箱 + // if (type == 2) + // { + // LogHelper.WriteLogInfo("开始换箱" + model.ShopID); + // orderbll.ChangeBox(model); + // } + // #endregion + //} } diff --git a/Epost.BLL/Work_ScanThread.cs b/Epost.BLL/Work_ScanThread.cs index 561b5c1..1386456 100644 --- a/Epost.BLL/Work_ScanThread.cs +++ b/Epost.BLL/Work_ScanThread.cs @@ -417,7 +417,7 @@ namespace Epost.BLL location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString(); } data.Parameter = scanStr; - DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "2"); + DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "2", scanStr); List scanlist = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Address == data.Address && m.Parameter == scanStr && m.Parameter != "888888" && m.Block == data.Block && m.Area == data.Area); if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0)) @@ -429,12 +429,14 @@ namespace Epost.BLL //show.Area = sarea; //show.Type = 8; //comBLL.ShowBoxMessage_M(show); + logBLL.SaveShowMesError("商品重复扫描或正在拣配!", "商品重复扫描或正在拣配"); downCacheDAL.UpdateJobDownModelList(new List { data }, EdownCommend.Execute); - } + } else { + DataTable OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block); if (OrderDt != null && OrderDt.Rows.Count > 0) { @@ -454,7 +456,7 @@ namespace Epost.BLL qmodel.State = 2; qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red); queueBLL.insertQueueOrders(qmodel); - + } else @@ -484,7 +486,7 @@ namespace Epost.BLL qmodel.Matchid = umodel.Matchid; // qmodel.Location = location; qmodel.Shopid = echoDt.Rows[0]["GoodsName"].ToString(); - + qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Blue); queueBLL.insertQueueOrders(qmodel); diff --git a/Epost.DAL/OrdersDAL.cs b/Epost.DAL/OrdersDAL.cs index b836394..1987753 100644 --- a/Epost.DAL/OrdersDAL.cs +++ b/Epost.DAL/OrdersDAL.cs @@ -2419,15 +2419,16 @@ namespace Epost.DAL } #endregion #region 修改订单信息 - public bool Updatestate(string matchid, string readdate) + public bool Updatestate(string matchid, string shopid) { try { - string sql = string.Format(" update orders set state =0 where matchid='{0}' and readtime='{1}' and state=99", + string sql = string.Format(" update orders set state =3 where matchid='{0}' and shopid='{1}' and state = 0 and oprationstate=3", matchid, - readdate); + shopid); long x = db.UpdateSql(sql); + LogHelper.WriteLogInfo(x + "换箱"+sql); if (x > 0) return true; return false; diff --git a/Epost.DAL/OrdersQueueDAL.cs b/Epost.DAL/OrdersQueueDAL.cs index 72b6430..80ccbbe 100644 --- a/Epost.DAL/OrdersQueueDAL.cs +++ b/Epost.DAL/OrdersQueueDAL.cs @@ -211,11 +211,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 sku) { - string sql = string.Format("select * from OrdersQueue where state ='{0}' and taskblock='{1}' and taskarea='{2}'", + string sql = string.Format("select * from OrdersQueue where state ='{0}' or (state = 1 and sku='{3}') and taskblock='{1}' and taskarea='{2}'", state, - block,area); + block,area,sku); LogHelper.WriteLogInfo("获取sku是否正在作业" + sql); return db.GetsqlForDT(sql); diff --git a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user index 5dd7b87..98c9127 100644 --- a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user +++ b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user @@ -7,7 +7,7 @@ <_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS - True|2025-06-24T06:58:06.2128620Z||;False|2025-06-24T14:57:07.8710970+08:00||;True|2025-06-24T14:54:53.0047658+08:00||;True|2025-06-24T14:21:21.1147627+08:00||;False|2025-06-24T14:20:37.2040902+08:00||;True|2025-06-24T13:14:08.5696828+08:00||;True|2025-06-24T11:28:41.9414169+08:00||;False|2025-06-24T11:28:18.5427055+08:00||;True|2025-06-23T18:49:19.8150434+08:00||;False|2025-06-23T18:47:53.8200239+08:00||;True|2025-06-23T18:13:17.9954519+08:00||;True|2025-06-16T16:39:46.1896351+08:00||;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||; + True|2025-06-24T11:52:28.3640036Z||;True|2025-06-24T19:41:27.8431415+08:00||;True|2025-06-24T19:02:20.3384315+08:00||;True|2025-06-24T14:58:06.2128620+08:00||;False|2025-06-24T14:57:07.8710970+08:00||;True|2025-06-24T14:54:53.0047658+08:00||;True|2025-06-24T14:21:21.1147627+08:00||;False|2025-06-24T14:20:37.2040902+08:00||;True|2025-06-24T13:14:08.5696828+08:00||;True|2025-06-24T11:28:41.9414169+08:00||;False|2025-06-24T11:28:18.5427055+08:00||;True|2025-06-23T18:49:19.8150434+08:00||;False|2025-06-23T18:47:53.8200239+08:00||;True|2025-06-23T18:13:17.9954519+08:00||;True|2025-06-16T16:39:46.1896351+08:00||;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||; @@ -33,19 +33,19 @@ 04/04/2018 15:45:12 - 06/24/2025 14:54:49 + 06/24/2025 19:52:24 - 06/24/2025 14:54:49 + 06/24/2025 19:52:24 02/24/2020 15:29:24 - 06/24/2025 11:28:02 + 06/24/2025 19:02:01 - 06/24/2025 11:28:02 + 06/24/2025 19:02:01 04/29/2020 16:50:14 @@ -63,31 +63,31 @@ 10/23/2017 13:15:20 - 06/24/2025 14:54:36 + 06/24/2025 19:52:12 - 06/24/2025 14:54:36 + 06/24/2025 19:52:12 08/26/2020 18:09:48 - 06/24/2025 14:54:36 + 06/24/2025 19:02:02 - 06/24/2025 14:54:36 + 06/24/2025 19:02:02 - 06/24/2025 14:54:40 + 06/24/2025 19:52:15 - 06/24/2025 14:54:40 + 06/24/2025 19:52:15 - 06/24/2025 11:28:01 + 06/24/2025 15:55:11 - 06/24/2025 11:28:01 + 06/24/2025 15:55:11 09/06/2018 11:57:11 @@ -105,13 +105,13 @@ 04/29/2020 16:50:14 - 06/24/2025 09:50:48 + 06/24/2025 15:50:35 - 06/24/2025 09:50:48 + 06/24/2025 15:50:35 - 06/24/2025 09:50:48 + 06/24/2025 15:50:35 08/10/2018 18:51:54 @@ -5661,7 +5661,7 @@ 05/30/2022 16:58:47 - 06/24/2025 14:54:41 + 06/24/2025 19:52:17 04/04/2018 15:45:12 @@ -7581,7 +7581,7 @@ 07/04/2022 14:22:38 - 06/24/2025 11:28:07 + 06/24/2025 19:02:07 \ No newline at end of file diff --git a/PrintBoxFormsApp/Form1.Designer.cs b/PrintBoxFormsApp/Form1.Designer.cs deleted file mode 100644 index 86ae7ac..0000000 --- a/PrintBoxFormsApp/Form1.Designer.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace PrintBoxFormsApp -{ - partial class Form1 - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows 窗体设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} - diff --git a/PrintBoxFormsApp/Form1.cs b/PrintBoxFormsApp/Form1.cs deleted file mode 100644 index f743ec8..0000000 --- a/PrintBoxFormsApp/Form1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace PrintBoxFormsApp -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/PrintBoxFormsApp/PrintBoxFormsApp.csproj b/PrintBoxFormsApp/PrintBoxFormsApp.csproj index 52872c2..0fff60c 100644 --- a/PrintBoxFormsApp/PrintBoxFormsApp.csproj +++ b/PrintBoxFormsApp/PrintBoxFormsApp.csproj @@ -50,12 +50,6 @@ - - Form - - - Form1.cs - Form