From 3afe6eada77db385a0fea1c6d93fea7802d90f13 Mon Sep 17 00:00:00 2001
From: xiaju <1784803958@qq.com>
Date: Thu, 6 Mar 2025 16:48:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/GetFileName.sql | 42 +++
SGGL/BLL/API/APIBaseInfoService.cs | 9 +-
SGGL/BLL/BaseInfo/WorkPostService.cs | 29 ++
.../HSSE/EduTrain/CompanyTraining.aspx | 254 +++++++++---------
.../HSSE/EduTrain/CompanyTraining.aspx.cs | 35 ++-
.../EduTrain/CompanyTraining.aspx.designer.cs | 77 +++---
SGGL/FineUIPro.Web/HSSE/EduTrain/Plan.aspx.cs | 12 +-
.../HSSE/EduTrain/PlanEdit.aspx.cs | 17 +-
8 files changed, 296 insertions(+), 179 deletions(-)
create mode 100644 DataBase/版本日志/GetFileName.sql
diff --git a/DataBase/版本日志/GetFileName.sql b/DataBase/版本日志/GetFileName.sql
new file mode 100644
index 0000000..fa27203
--- /dev/null
+++ b/DataBase/版本日志/GetFileName.sql
@@ -0,0 +1,42 @@
+USE [SGGLDB_XJYJ]
+GO
+
+/****** Object: UserDefinedFunction [dbo].[GetFileName] Script Date: 2025-3-5 18:28:21 ******/
+SET ANSI_NULLS ON
+GO
+
+SET QUOTED_IDENTIFIER ON
+GO
+
+
+-- =============================================
+-- Author: Paul Griffin
+-- Create date: 18 January 2015
+-- Description: Returns a filename with extension
+-- from a full path:
+-- D:\Temp\Resources\Images\My.Picture.jpg
+-- ==> My.Picture.jpg
+-- =============================================
+ALTER FUNCTION [dbo].[GetFileName]
+(
+ @Path NVARCHAR(MAX)
+)
+RETURNS NVARCHAR(MAX)
+AS
+BEGIN
+ DECLARE @FileName NVARCHAR(MAX)
+ DECLARE @ReversedPath NVARCHAR(MAX)
+
+ SET @Path=REPLACE(@Path,'/','\');
+ SET @ReversedPath = REVERSE(@Path)
+
+ if CHARINDEX('\', @ReversedPath)>0
+
+ SELECT @FileName = RIGHT(@Path, CHARINDEX('\', @ReversedPath)-1)
+
+ RETURN @FileName
+
+END
+GO
+
+
diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs
index fb134ad..631fdb4 100644
--- a/SGGL/BLL/API/APIBaseInfoService.cs
+++ b/SGGL/BLL/API/APIBaseInfoService.cs
@@ -456,6 +456,13 @@ namespace BLL
return getDataLists;
}
}
+
+ ///
+ /// 获取职务工种list
+ ///
+ ///
+ ///
+ ///
public static List getWorkPost(string projectId,string strParam)
{
List res = new List();
@@ -463,7 +470,7 @@ namespace BLL
{
var getDataLists = (from x in db.Base_WorkPost
where strParam == null || x.WorkPostName.Contains(strParam)
- orderby x.WorkPostName
+ orderby x.WorkPostCode
select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId, BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList();
if (!string.IsNullOrEmpty(projectId))
{
diff --git a/SGGL/BLL/BaseInfo/WorkPostService.cs b/SGGL/BLL/BaseInfo/WorkPostService.cs
index 7195602..bd5be85 100644
--- a/SGGL/BLL/BaseInfo/WorkPostService.cs
+++ b/SGGL/BLL/BaseInfo/WorkPostService.cs
@@ -157,6 +157,35 @@ namespace BLL
}
}
+ ///
+ /// 表下拉框
+ ///
+ /// 下拉框名字
+ /// 项目id
+ /// 是否显示请选择
+ public static void InitWorkPostByProjectIdDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
+ {
+ List postIds = new List();
+ if (!string.IsNullOrWhiteSpace(projectId))
+ {
+ postIds = (from u in Funs.DB.SitePerson_Person where u.ProjectId == projectId select u.WorkPostId).Distinct().ToList();
+ }
+ else
+ {
+ postIds = (from u in Funs.DB.SitePerson_Person select u.WorkPostId).Distinct().ToList();
+ }
+ var workPost = (from x in Funs.DB.Base_WorkPost where postIds.Contains(x.WorkPostId) orderby x.WorkPostCode select x).ToList();
+
+ dropName.DataValueField = "WorkPostId";
+ dropName.DataTextField = "WorkPostName";
+ dropName.DataSource = workPost;
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
///
/// 表下拉框
///
diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTraining.aspx b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTraining.aspx
index b5e7fe4..ae0f461 100644
--- a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTraining.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTraining.aspx
@@ -10,142 +10,146 @@