From d59a5b71668af5a7f43d79cd692cad6705c483ea Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 11 Aug 2026 10:39:16 +0800 Subject: [PATCH] 1 --- .../WeldMat/UsingPlan/UsingPlan.aspx.cs | 84 +++++++++++++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 16 ++-- 2 files changed, 92 insertions(+), 8 deletions(-) diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan.aspx.cs index e3028f3..b418b68 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan.aspx.cs @@ -42,6 +42,90 @@ namespace FineUIPro.Web.WeldMat.UsingPlan // BLL.UsingPlanService.UpdateIsCancel(usingPlanId, "超时未领用"); // } //} + #region 自动作废过期记录 + bool b = false; + int intHour = DateTime.Now.Hour; + string orderTime = string.Empty; + if (intHour == 8) + { + orderTime = "7:00 - 8:00"; + } + else if (intHour == 9) + { + orderTime = "8:00 - 9:00"; + } + else if (intHour == 10) + { + orderTime = "9:00 - 10:00"; + } + else if (intHour == 11) + { + orderTime = "10:00 - 11:00"; + } + else if (intHour == 12) + { + orderTime = "11:00 - 12:00"; + } + else if (intHour == 13) + { + orderTime = "12:00 - 13:00"; + } + else if (intHour == 14) + { + orderTime = "13:00 - 14:00"; + } + else if (intHour == 15) + { + orderTime = "14:00 - 15:00"; + } + else if (intHour == 16) + { + orderTime = "15:00 - 16:00"; + } + else if (intHour == 17) + { + orderTime = "16:00 - 17:00"; + } + else if (intHour == 18) + { + orderTime = "17:00 - 18:00"; + } + else if (intHour == 19) + { + orderTime = "18:00 - 19:00"; + } + else if (intHour == 20) + { + orderTime = "19:00 - 20:00"; + } + else if (intHour == 21) + { + orderTime = "20:00 - 21:00"; + } + if (!string.IsNullOrEmpty(orderTime)) + { + b = true; + } + if (b) + { + string lastPlan = @"SELECT p.UsingPlanId FROM dbo.Weld_UsingPlan p + WHERE p.OrderDate listStr = new List(); + listStr.Add(new SqlParameter("@OrderTime", orderTime)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable dt = SQLHelper.GetDataTableRunText(lastPlan, parameter); + if (dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + string usingPlanId = dt.Rows[i]["UsingPlanId"].ToString(); + BLL.UsingPlanService.UpdateIsCancel(usingPlanId, "超时未领用"); + } + } + } + #endregion // 绑定表格 BindGrid(); diff --git a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 54ce89f..bf1ffe5 100644 --- a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -85,13 +85,13 @@ 04/12/2024 09:54:20 - 08/10/2026 17:52:37 + 08/10/2026 17:58:50 12/31/2025 16:32:37 - 08/10/2026 17:52:37 + 08/10/2026 17:58:50 12/17/2020 21:32:28 @@ -121,10 +121,10 @@ 07/25/2012 11:48:56 - 08/10/2026 17:52:36 + 08/10/2026 17:58:50 - 08/10/2026 17:52:36 + 08/10/2026 17:58:50 11/28/2018 02:07:34 @@ -295,13 +295,13 @@ 05/24/2018 13:38:24 - 08/10/2026 17:52:43 + 08/10/2026 17:58:52 07/28/2025 11:00:31 - 08/10/2026 17:52:43 + 08/10/2026 17:58:52 02/01/2018 12:17:18 @@ -337,10 +337,10 @@ 06/29/2015 16:49:52 - 08/10/2026 17:52:46 + 08/10/2026 17:58:53 - 08/10/2026 17:52:46 + 08/10/2026 17:58:53 01/23/2014 13:57:34