From 642c5d4bd16a6b45dceaebef7dd86beb64a8175a Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 11 Apr 2025 14:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E8=AE=AD=E7=94=B3=E8=AF=B7=5F?= =?UTF-8?q?=E5=AE=9D=E8=BF=9E=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Model/ViewModels/Menu.cs | 2 ++ Tiobon.Core.Services/CommonServices.cs | 31 +++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Model/ViewModels/Menu.cs b/Tiobon.Core.Model/ViewModels/Menu.cs index 0414390d..138214a4 100644 --- a/Tiobon.Core.Model/ViewModels/Menu.cs +++ b/Tiobon.Core.Model/ViewModels/Menu.cs @@ -267,6 +267,8 @@ public class FlowTableColumn public bool @required { get; set; } public bool multipleSelect { get; set; } public int rowNum { get; set; } + public int? isFullWidth { get; set; } + public int? hasMarginLeft { get; set; } public string GroupName { get; set; } } diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index bd4c9a1a..31947059 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -2853,6 +2853,9 @@ public partial class CommonServices : BaseServices>, ICommon { var flowReturn = new FlowReturn(); + + + #region JM_PageFormT1 var sql = $@"DECLARE @SQL NVARCHAR (MAX) = '', @@ -2916,10 +2919,13 @@ public partial class CommonServices : BaseServices>, ICommon flowReturn.JM_PageFormActionsT1.Toolbar = await Db.Ado.SqlQueryAsync(sql); #endregion + var flowId = param.jsonParam.FlowID; + sql = $"SELECT FlowId FROM Ghrw_Flow where FlowNo='{param.menuName}'"; + flowId = Convert.ToInt16(DbAccess.ExecuteScalar(sql)); #region JM_TableColumnT1 sql = $@"DECLARE @SQL NVARCHAR (MAX) = '', - @FlowID INT = {param.jsonParam.FlowID}, + @FlowID INT = {flowId}, @DoType NVARCHAR (MAX) = '{param.doType}', @SQL2 NVARCHAR (MAX) = '', @JsonString NVARCHAR (MAX) = '', @@ -2949,6 +2955,8 @@ public partial class CommonServices : BaseServices>, ICommon dynamicShow INT, PrivFlag INT, multipleSelect NVARCHAR (100), + isFullWidth INT, + hasMarginLeft INT, canBatchPageDisplay NVARCHAR (100) ) @@ -2982,6 +2990,7 @@ public partial class CommonServices : BaseServices>, ICommon pp.dynamicShow, isnull (kk.PrivFlag, 1) PrivFlag, -- 申请页默认都是可以编辑的 iif (pp.IsMultipleSelect = 1, 'true', 'false'), + pp.isFullWidth, pp.hasMarginLeft, iif (pp.IsBatchPageDisplay = 1, 'true', 'false') FROM Ghrw_FlowPageDesign pp LEFT JOIN Ghrw_FlowNodesColumnPriv kk @@ -3028,6 +3037,8 @@ public partial class CommonServices : BaseServices>, ICommon CONVERT (INT, columnWidth) columnWidth, dynamicShow, multipleSelect, + isFullWidth, + hasMarginLeft, canBatchPageDisplay FROM [dbo].[#TempInitUserPageEditColumn] FOR JSON PATH) @@ -3893,12 +3904,17 @@ public partial class CommonServices : BaseServices>, ICommon } break; - case "F_ESS_ExternalTrainApply_Boltone": + case "F_ESS_ExternalTrainApplyOrder_Boltone": if (param.doType == "Insert") { flowReturn.DT_TableDataT1 = new List() { - + new InsertGhre_ExternalTrainApplyOrder_BoltoneInput() + { + ApplicantId = App.User.StaffId, + ApplicantDeptId = GetStaffDeptId(), + ApplicantTime = DateTime.Now + } }; } break; @@ -4296,6 +4312,15 @@ public partial class CommonServices : BaseServices>, ICommon StaffId = Convert.ToInt32(StaffId1); return StaffId; } + public int? GetStaffDeptId() + { + int? StaffId = null; + string sql = $"SELECT DeptID FROM Ghra_Staff where StaffID='{App.User.StaffId}'"; + string StaffId1 = Convert.ToString(DbAccess.ExecuteScalar(sql)); + if (!StaffId1.IsNull()) + StaffId = Convert.ToInt32(StaffId1); + return StaffId; + } #endregion #region 自动编号