Compare commits
2 Commits
5712066e0a
...
7396d1b654
Author | SHA1 | Date |
---|---|---|
|
7396d1b654 | |
|
da9ea6d442 |
|
@ -36,3 +36,4 @@
|
|||
/SUBQHSEPackFile_2023-8-31_001/PackFile/aspnet_client/FreeTextBox/images/css/toolbarbutton.off.over.gif
|
||||
/SUBQHSE/Backup
|
||||
/SUBQHSE/BLLTests1
|
||||
/SGGL/FineUIPro.Web/ErrLog.txt
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
@echo off
|
||||
REM ---------------
|
||||
REM 发布包生成工具
|
||||
REM 执行此文件前请先用Release生成WebOA项目
|
||||
REM --------------
|
||||
|
||||
|
||||
|
||||
REM --------------
|
||||
REM 环境变量设置 Project_Src为如WebOA这样的分支
|
||||
REM --------------
|
||||
set PROJECT_SRC=%CD%
|
||||
cd..
|
||||
|
||||
REM 源代码Model项目文件夹
|
||||
set Model_ROOT=%PROJECT_SRC%\SGGL\Model
|
||||
|
||||
|
||||
REM --------------
|
||||
REM 发布程序包文件夹相关
|
||||
REM --------------
|
||||
|
||||
|
||||
|
||||
|
||||
@echo 设置.net控制台环境
|
||||
@echo.
|
||||
@call "%VS150%"
|
||||
|
||||
SqlMetal /views /server:47.104.102.122,14333 /database:SGGLDB_XJYJ /user:sa /password:p@ssw0rd /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
|
@ -0,0 +1,511 @@
|
|||
|
||||
/**************************************隐藏冗余菜单***************************************************************/
|
||||
|
||||
--1、项目级——设置隐藏部分菜单
|
||||
update Sys_Menu
|
||||
set IsUsed=0
|
||||
where MenuType='Menu_ProjectSet' and MenuName in ('项目概况','项目主项','单位工程','项目状态','项目进度设置')
|
||||
|
||||
--2、项目级——员工管理(原:安全管理)隐藏部分菜单
|
||||
update Sys_Menu
|
||||
set IsUsed=0
|
||||
where MenuType='Menu_HSSE' and MenuName in ('项目策划','教育培训','HSE技术','作业许可','HSE费用','安保管理','施工机具','HSE奖惩','应急信息','工作报告','事故管理','职业健康','环境保护','绩效评价管理','信息管理')
|
||||
|
||||
--3、公司级——资源库(原:大数据中心)隐藏部分菜单
|
||||
update Sys_Menu
|
||||
set IsUsed=0
|
||||
where MenuType='Menu_DigData' and SuperMenu='6A992AB8-A32D-448F-B06F-8DD4C112CC91' and MenuName in ('质量公共资源库','进度公共资源库')
|
||||
|
||||
/**************************************新增菜单***************************************************************/
|
||||
|
||||
--员工管理-HSE绩效考核
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '89451997-E575-4845-BF8A-444E9CA6A962')
|
||||
BEGIN
|
||||
--HSE绩效考核
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('89451997-E575-4845-BF8A-444E9CA6A962','HSE绩效考核','',120,'0','Menu_HSSE',0,0,1)
|
||||
END
|
||||
GO
|
||||
|
||||
--HSE绩效考核
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4')
|
||||
BEGIN
|
||||
--一人一档
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('AE58F042-DDAA-4980-A3E8-9A1F36349E45','员工HSE信息档案','HSSE/Examine/OnePersonPerFile.aspx',0,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--考核加分情况
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('6957A732-BA33-499E-AB32-DB1F73BEA8CE','考核加分情况','HSSE/Examine/BonusScoreSituation.aspx',1,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--考核扣分情况
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('0BCE76EA-319F-47BF-913A-A32735641F5C','考核扣分情况','HSSE/Examine/MinusScoreSituation.aspx',2,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--个人安全行动计划
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('7DD00BEF-821D-4996-ADF8-695139F201B4','个人安全行动计划','HSSE/Examine/PersonalSafetyActionPlan.aspx',10,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--安全经验分享
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','安全经验分享','HSSE/Examine/SharingOfSafetyExperience.aspx',20,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--领导人员参加班组作业分析会
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('05F4AC73-1BA2-4FF2-AAED-292DF5E44412','领导人员参加班组作业分析会','HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx',30,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--一线党员联系班组共建活动
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','一线党员联系班组共建活动','HSSE/Examine/CoConstructionActivities.aspx',40,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--行为安全观察与沟通
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('5049BB69-A75F-47D4-ABF3-DAA719D05C74','行为安全观察与沟通','HSSE/Examine/BehavioralSafetyObservation.aspx',50,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'AE58F042-DDAA-4980-A3E8-9A1F36349E45')
|
||||
BEGIN
|
||||
--员工HSE信息档案
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('4588FFE3-75FD-42A7-979C-6065857D1D8E','AE58F042-DDAA-4980-A3E8-9A1F36349E45','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('F049D5EB-C233-479B-A11C-EC8943898A5A','AE58F042-DDAA-4980-A3E8-9A1F36349E45','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('926D7FF6-446B-4946-ADF4-8CF76F65FDA0','AE58F042-DDAA-4980-A3E8-9A1F36349E45','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('70AB520C-B6EA-4D9F-A94E-AE56D2CD6829','AE58F042-DDAA-4980-A3E8-9A1F36349E45','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '6957A732-BA33-499E-AB32-DB1F73BEA8CE')
|
||||
BEGIN
|
||||
--考核加分情况
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('14DD87C3-2B71-42F6-A1EE-AA2B138583C0','6957A732-BA33-499E-AB32-DB1F73BEA8CE','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5A35CA7F-A244-4C02-BE26-EE6F14ACF443','6957A732-BA33-499E-AB32-DB1F73BEA8CE','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('0BD10961-0490-4130-B288-58253A52492F','6957A732-BA33-499E-AB32-DB1F73BEA8CE','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('DCE4B049-B421-4C32-AA2A-2A4E099E1441','6957A732-BA33-499E-AB32-DB1F73BEA8CE','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '0BCE76EA-319F-47BF-913A-A32735641F5C')
|
||||
BEGIN
|
||||
--考核扣分情况
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('61B22424-2AC8-4E34-A783-2C3A8CF9F840','0BCE76EA-319F-47BF-913A-A32735641F5C','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('C2A94DCA-2410-46CF-BF1C-16A67ECBAA82','0BCE76EA-319F-47BF-913A-A32735641F5C','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7587CD81-B7CA-40BD-AB80-31C9CC9D099B','0BCE76EA-319F-47BF-913A-A32735641F5C','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E1FA46F3-16AD-4490-88AD-78CEF5C6EEB5','0BCE76EA-319F-47BF-913A-A32735641F5C','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4')
|
||||
BEGIN
|
||||
--个人安全行动计划
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('2BF3A978-509B-4B1D-B753-44CD8022306E','7DD00BEF-821D-4996-ADF8-695139F201B4','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('3998D101-3D6C-4E2B-9A3E-D017C3AA6ECE','7DD00BEF-821D-4996-ADF8-695139F201B4','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7C4F9425-CB92-4CCE-9D0E-06704FDC0143','7DD00BEF-821D-4996-ADF8-695139F201B4','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5DE92E82-AD0A-4AF9-8C95-B95D4EA76EE9','7DD00BEF-821D-4996-ADF8-695139F201B4','保存',4)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D5FC7B12-0E81-482C-8B29-A9F43DF05D1F')
|
||||
BEGIN
|
||||
--安全经验分享
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('CBFABD5C-B06F-46F2-A16C-77D786842CCE','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EE65207D-0B5A-436B-9E05-9E3C83A7534B','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('ABCA59A7-EF1B-4048-B49F-DDB9E6EDB6B1','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('35C610A1-14C8-4EF7-AFC9-0AD6F3E9681C','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '05F4AC73-1BA2-4FF2-AAED-292DF5E44412')
|
||||
BEGIN
|
||||
--领导人员参加班组作业分析会
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E3B77A21-145E-4D49-8717-CE3E01520C82','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('A8DA2937-3EA0-4614-BAF1-2A33D2B75D0A','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('2E75AB23-2803-4443-8D32-3496637DFAC1','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5CA1D1DB-9277-4935-8B75-2B2D35EEACA3','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E')
|
||||
BEGIN
|
||||
--一线党员联系班组共建活动
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('00563682-98B7-4A1C-A350-1F8DB70D617F','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('01DE53E4-6F14-404F-9640-D3E3A9CA04EB','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('FFEC663E-A4B6-46E4-A828-B1385BDB63C3','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('11B87F2F-B1FA-455F-860B-C959C9C1AAC4','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '5049BB69-A75F-47D4-ABF3-DAA719D05C74')
|
||||
BEGIN
|
||||
--行为安全观察与沟通
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EB59D454-196F-4E25-9100-9008755A2B6C','5049BB69-A75F-47D4-ABF3-DAA719D05C74','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('42E7228B-E763-4A4D-AEC0-0CD4295173DC','5049BB69-A75F-47D4-ABF3-DAA719D05C74','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BBA6B3D1-27BD-4FFA-9385-0AB018CCFB85','5049BB69-A75F-47D4-ABF3-DAA719D05C74','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D0E6A314-D55D-4C1E-AA45-F77E05841008','5049BB69-A75F-47D4-ABF3-DAA719D05C74','保存',4)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
/**************************************新增数据表***************************************************************/
|
||||
|
||||
|
||||
--考核加分情况
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BonusScoreSituation') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_BonusScoreSituation](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Level] [nvarchar](200) NULL,
|
||||
[LevelName] [nvarchar](200) NULL,
|
||||
[Score] [int] NOT NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_BonusScoreSituation] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSituation_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] CHECK CONSTRAINT [FK_Examine_BonusScoreSituation_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSituation_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] CHECK CONSTRAINT [FK_Examine_BonusScoreSituation_User]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSituation_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSituation] CHECK CONSTRAINT [FK_Examine_BonusScoreSituation_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Level'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'LevelName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Score'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'考核加分情况' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSituation'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
--考核扣分情况
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_MinusScoreSituation') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_MinusScoreSituation](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Level] [nvarchar](200) NULL,
|
||||
[LevelName] [nvarchar](200) NULL,
|
||||
[Score] [int] NOT NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_MinusScoreSituation] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_MinusScoreSituation_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] CHECK CONSTRAINT [FK_Examine_MinusScoreSituation_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_MinusScoreSituation_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] CHECK CONSTRAINT [FK_Examine_MinusScoreSituation_User]
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] WITH CHECK ADD CONSTRAINT [FK_Examine_MinusScoreSituation_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_MinusScoreSituation] CHECK CONSTRAINT [FK_Examine_MinusScoreSituation_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Level'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'LevelName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Score'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'考核扣分情况' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_MinusScoreSituation'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
--个人安全行动计划
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_PersonalSafetyActionPlan') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_PersonalSafetyActionPlan](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_PersonalSafetyActionPlan] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] WITH CHECK ADD CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] CHECK CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] WITH CHECK ADD CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] CHECK CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_User]
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] WITH CHECK ADD CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_PersonalSafetyActionPlan] CHECK CONSTRAINT [FK_Examine_PersonalSafetyActionPlan_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'个人安全行动计划' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_PersonalSafetyActionPlan'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
--安全经验分享
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_SharingOfSafetyExperience') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_SharingOfSafetyExperience](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_SharingOfSafetyExperience] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] WITH CHECK ADD CONSTRAINT [FK_Examine_SharingOfSafetyExperience_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] CHECK CONSTRAINT [FK_Examine_SharingOfSafetyExperience_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] WITH CHECK ADD CONSTRAINT [FK_Examine_SharingOfSafetyExperience_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] CHECK CONSTRAINT [FK_Examine_SharingOfSafetyExperience_User]
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] WITH CHECK ADD CONSTRAINT [FK_Examine_SharingOfSafetyExperience_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_SharingOfSafetyExperience] CHECK CONSTRAINT [FK_Examine_SharingOfSafetyExperience_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全经验分享' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_SharingOfSafetyExperience'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
--领导人员参加班组作业分析会
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_LeadershipJoinHomeworkAnalysisMeeting') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_LeadershipJoinHomeworkAnalysisMeeting] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] WITH CHECK ADD CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] CHECK CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] WITH CHECK ADD CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] CHECK CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_User]
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] WITH CHECK ADD CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_LeadershipJoinHomeworkAnalysisMeeting] CHECK CONSTRAINT [FK_Examine_LeadershipJoinHomeworkAnalysisMeeting_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'领导人员参加班组作业分析会' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_LeadershipJoinHomeworkAnalysisMeeting'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
--一线党员联系班组共建活动
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_CoConstructionActivities') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_CoConstructionActivities](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_CoConstructionActivities] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] WITH CHECK ADD CONSTRAINT [FK_Examine_CoConstructionActivities_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] CHECK CONSTRAINT [FK_Examine_CoConstructionActivities_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] WITH CHECK ADD CONSTRAINT [FK_Examine_CoConstructionActivities_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] CHECK CONSTRAINT [FK_Examine_CoConstructionActivities_User]
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] WITH CHECK ADD CONSTRAINT [FK_Examine_CoConstructionActivities_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_CoConstructionActivities] CHECK CONSTRAINT [FK_Examine_CoConstructionActivities_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'一线党员联系班组共建活动' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_CoConstructionActivities'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
--行为安全观察与沟通
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BehavioralSafetyObservation') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_BehavioralSafetyObservation](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[UserId] [nvarchar](50) NULL,
|
||||
[DateTime] [datetime] NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_BehavioralSafetyObservation] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] WITH CHECK ADD CONSTRAINT [FK_Examine_BehavioralSafetyObservation_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] CHECK CONSTRAINT [FK_Examine_BehavioralSafetyObservation_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] WITH CHECK ADD CONSTRAINT [FK_Examine_BehavioralSafetyObservation_User] FOREIGN KEY([UserId])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] CHECK CONSTRAINT [FK_Examine_BehavioralSafetyObservation_User]
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] WITH CHECK ADD CONSTRAINT [FK_Examine_BehavioralSafetyObservation_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BehavioralSafetyObservation] CHECK CONSTRAINT [FK_Examine_BehavioralSafetyObservation_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'UserId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'DateTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'行为安全观察与沟通' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BehavioralSafetyObservation'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
|
||||
--View_SitePerson_PersonList
|
||||
|
||||
ALTER VIEW [dbo].[View_SitePerson_PersonList]
|
||||
AS
|
||||
|
||||
SELECT
|
||||
Person.PersonId,
|
||||
Person.ProjectId,
|
||||
Person.IsUsed,
|
||||
Person.IsForeign,
|
||||
Person.IsOutside,
|
||||
Person.BlackList,
|
||||
Person.CardNo,
|
||||
Person.PersonName,
|
||||
Person.UnitId,
|
||||
Unit.UnitName,
|
||||
Post.WorkPostName,
|
||||
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
TeamGroup.TeamGroupName,
|
||||
Person.InTime,
|
||||
Person.OutTime,
|
||||
(CASE Person.IsUsed WHEN 'TRUE' THEN '是' ELSE '否' END) AS IsUsedName,
|
||||
Person.IdentityCard,
|
||||
Person.TeamGroupId,
|
||||
Person.WorkPostId,
|
||||
Person.IdcardType,
|
||||
Person.PhotoUrl,
|
||||
edu.TrainCount,
|
||||
PoliticsStatus.dictName AS PoliticsStatusName
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId
|
||||
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId
|
||||
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId
|
||||
LEFT JOIN RealName_BasicData AS PoliticsStatus ON PoliticsStatus.dictCode = Person.PoliticsStatus AND PoliticsStatus.DictTypeCode='POLITICAL_LANDSCAPE'
|
||||
LEFT JOIN (select PersonId,count(PersonId)as TrainCount from EduTrain_TrainRecordDetail group by PersonId) as edu on edu.PersonId= Person.PersonId
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
--Weld_RecycleMat
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[Weld_RecycleMat](
|
||||
[RecycleMatId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Jot_ID] [nvarchar](50) NULL,
|
||||
[WeldId] [nvarchar](50) NULL,
|
||||
[UsingMatId] [nvarchar](50) NULL,
|
||||
[UsingPlanId] [nvarchar](50) NULL,
|
||||
[RecycleAmount] [numeric](9, 3) NULL,
|
||||
[UsingAmount] [numeric](9, 3) NULL,
|
||||
[RecycleMan] [nvarchar](50) NULL,
|
||||
[RecycleDate] [datetime] NULL,
|
||||
[StockMan] [nvarchar](50) NULL,
|
||||
[Warrantybook] [nvarchar](50) NULL,
|
||||
[Number] [nvarchar](50) NULL,
|
||||
[IsWelderConfirm] [bit] NULL,
|
||||
[IsStoreManConfirm] [bit] NULL,
|
||||
[ReturnMat] [numeric](9, 3) NULL,
|
||||
[ReturnMatTop] [int] NULL,
|
||||
[UsePosition] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Weld_RecycleMat] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[RecycleMatId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] WITH CHECK ADD CONSTRAINT [FK_Weld_RecycleMat_Weld_RecycleMat] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] CHECK CONSTRAINT [FK_Weld_RecycleMat_Weld_RecycleMat]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] WITH CHECK ADD CONSTRAINT [FK_Weld_RecycleMat_Weld_UsingMat] FOREIGN KEY([UsingMatId])
|
||||
REFERENCES [dbo].[Weld_UsingMat] ([UsingMatId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] CHECK CONSTRAINT [FK_Weld_RecycleMat_Weld_UsingMat]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] WITH CHECK ADD CONSTRAINT [FK_Weld_RecycleMat_Weld_UsingPlan] FOREIGN KEY([UsingPlanId])
|
||||
REFERENCES [dbo].[Weld_UsingPlan] ([UsingPlanId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Weld_RecycleMat] CHECK CONSTRAINT [FK_Weld_RecycleMat_Weld_UsingPlan]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'RecycleMatId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'焊缝' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'Jot_ID'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'焊材ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'WeldId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'领料ID(标记从些单退回)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'UsingMatId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'领用计划ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'UsingPlanId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回收数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'RecycleAmount'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'领用数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'UsingAmount'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退回人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'RecycleMan'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退回日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'RecycleDate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'保管员确认' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'StockMan'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质保书号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'Warrantybook'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流水号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'Number'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退料人确认' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'IsWelderConfirm'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'保管员确认' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat', @level2type=N'COLUMN',@level2name=N'IsStoreManConfirm'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'焊材回收表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Weld_RecycleMat'
|
||||
GO
|
||||
|
||||
|
|
@ -0,0 +1,664 @@
|
|||
|
||||
--岗位培训
|
||||
|
||||
/*******************************岗位培训菜单******************************************************************************************/
|
||||
|
||||
--员工管理-人员培训
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = 'BEA50D7C-60FE-488B-8D7D-255020EEB4C2')
|
||||
BEGIN
|
||||
--人员培训
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('BEA50D7C-60FE-488B-8D7D-255020EEB4C2','人员培训','',90,'0','Menu_HSSE',0,0,1)
|
||||
END
|
||||
GO
|
||||
|
||||
--岗位培训
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = 'CEF2A108-DDC2-46A2-A47B-7431F1F890F1')
|
||||
BEGIN
|
||||
--岗位培训记录
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('CEF2A108-DDC2-46A2-A47B-7431F1F890F1','岗位培训记录','HSSE/PostTraining/Record.aspx',10,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训类别
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('465786B2-AD20-483A-A082-B2C944BE998F','岗位培训类别','HSSE/PostTraining/Category.aspx',100,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训课程
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467','岗位培训课程','HSSE/PostTraining/Course.aspx',110,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训标准
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('7BCA5AD9-D0FB-4850-A9D1-88364008984D','岗位培训标准','HSSE/PostTraining/Standard.aspx',120,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训角色
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','岗位培训角色','HSSE/PostTraining/Role.aspx',130,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训方式
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('919853EB-A8FA-4BE5-9964-70F43E000961','岗位培训方式','HSSE/PostTraining/Method.aspx',140,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训教资
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('026F0A23-AECD-4BB8-8504-1EB8CB9151C0','岗位培训教资','HSSE/PostTraining/Teachers.aspx',150,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'CEF2A108-DDC2-46A2-A47B-7431F1F890F1')
|
||||
BEGIN
|
||||
--岗位培训记录
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D35FC243-EAB1-47DF-9590-7E9403F969F9','CEF2A108-DDC2-46A2-A47B-7431F1F890F1','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('3121AEDD-C697-4B70-ADB4-619B17636888','CEF2A108-DDC2-46A2-A47B-7431F1F890F1','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D517703B-3232-4296-892E-944372715424','CEF2A108-DDC2-46A2-A47B-7431F1F890F1','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E927076D-EC0E-44D5-816A-99A401D7051C','CEF2A108-DDC2-46A2-A47B-7431F1F890F1','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '465786B2-AD20-483A-A082-B2C944BE998F')
|
||||
BEGIN
|
||||
--岗位培训类别
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('00C1E0D6-52D2-434D-91D3-78F4DEC1D2ED','465786B2-AD20-483A-A082-B2C944BE998F','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('4E3D31DF-9846-4867-8A11-0FDBBFC9D54F','465786B2-AD20-483A-A082-B2C944BE998F','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('6C1E4EF0-CD74-4236-AB93-4856EE0B367F','465786B2-AD20-483A-A082-B2C944BE998F','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('F2FE3B94-6827-4EF9-B0E8-D34F91054630','465786B2-AD20-483A-A082-B2C944BE998F','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467')
|
||||
BEGIN
|
||||
--岗位培训课程
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('2D24F443-898F-484D-B88D-41D1B8FF6D44','95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EEBDFFA2-CC58-48C5-A4F6-91BECA90FEC7','95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('AB52A4F2-D384-4599-8E99-2C3AE4641C71','95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('767C4D8E-6A50-4221-8A60-E0CD6E5E8F96','95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '7BCA5AD9-D0FB-4850-A9D1-88364008984D')
|
||||
BEGIN
|
||||
--岗位培训标准
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('18AAE15C-6210-4E39-AC08-FAB006AA4DA5','7BCA5AD9-D0FB-4850-A9D1-88364008984D','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B6BAFF4C-3C70-4838-863D-04156CF39507','7BCA5AD9-D0FB-4850-A9D1-88364008984D','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('875D7BDE-5010-4835-A06E-3AC7DA622074','7BCA5AD9-D0FB-4850-A9D1-88364008984D','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('CC75D488-288C-4883-9452-617818AD5A84','7BCA5AD9-D0FB-4850-A9D1-88364008984D','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '50F80CAF-08BA-4A16-9EF8-76DF0A8078CF')
|
||||
BEGIN
|
||||
--岗位培训角色
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('93D2A0CB-1388-4059-9C28-8DEDCAD56093','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E3A54064-7D8B-49D8-AE32-89EF002A6D0E','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BF0EA069-3B5A-4685-92AC-0AD13AF81010','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7C57B206-FC52-4622-A276-50FA49691532','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '919853EB-A8FA-4BE5-9964-70F43E000961')
|
||||
BEGIN
|
||||
--岗位培训方式
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('590947CC-0956-496D-A5E9-B888B5B326E3','919853EB-A8FA-4BE5-9964-70F43E000961','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('19400C8D-B5A9-44B9-8345-EF858B0E8B7F','919853EB-A8FA-4BE5-9964-70F43E000961','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EFDF9021-17D8-414F-B402-3181AD5AAF7C','919853EB-A8FA-4BE5-9964-70F43E000961','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B038C6EA-6321-44FF-B167-71D075ACEBC3','919853EB-A8FA-4BE5-9964-70F43E000961','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '026F0A23-AECD-4BB8-8504-1EB8CB9151C0')
|
||||
BEGIN
|
||||
--岗位培训教资
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D83CF41C-F418-419F-ADF1-1509B6F9F83E','026F0A23-AECD-4BB8-8504-1EB8CB9151C0','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('AB78F0DE-84ED-4907-8047-BA29EF86BE1E','026F0A23-AECD-4BB8-8504-1EB8CB9151C0F','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('49D5178F-9AB6-45E1-904A-0E28C0F509D2','026F0A23-AECD-4BB8-8504-1EB8CB9151C0','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5797B84F-556D-44C8-9261-3EE857E350DA','026F0A23-AECD-4BB8-8504-1EB8CB9151C0','保存',4)
|
||||
END
|
||||
GO
|
||||
|
||||
--1、用户补充培训岗位Id
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SitePerson_Person' AND COLUMN_NAME = 'PostTrainingRoleId')
|
||||
BEGIN
|
||||
ALTER TABLE SitePerson_Person ADD PostTrainingRoleId nvarchar(50);
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
/*******************************岗位培训数据表******************************************************************************************/
|
||||
|
||||
--岗位培训记录
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Record') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Record](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Content] [nvarchar](500) NULL,
|
||||
[CategoryId] [nvarchar](50) NULL,
|
||||
[CategoryName] [nvarchar](200) NULL,
|
||||
[CourseId] [nvarchar](50) NOT NULL,
|
||||
[CourseName] [nvarchar](200) NULL,
|
||||
[Location] [nvarchar](200) NULL,
|
||||
[Method] [nvarchar](200) NULL,
|
||||
[Lecturer] [nvarchar](200) NULL,
|
||||
[UnitIds] [nvarchar](max) NULL,
|
||||
[RoleIds] [nvarchar](max) NULL,
|
||||
[PersonNum] [int] NOT NULL,
|
||||
[TrainingTime] [datetime] NOT NULL,
|
||||
[Duration] [decimal](10, 2) NOT NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Record] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Record] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Record_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[PostTraining_Record] CHECK CONSTRAINT [FK_PostTraining_Record_Base_Project]
|
||||
ALTER TABLE [dbo].[PostTraining_Record] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Record_PostTraining_Category] FOREIGN KEY([CategoryId])
|
||||
REFERENCES [dbo].[PostTraining_Category] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Record] CHECK CONSTRAINT [FK_PostTraining_Record_PostTraining_Category]
|
||||
ALTER TABLE [dbo].[PostTraining_Record] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Record_PostTraining_Course] FOREIGN KEY([CourseId])
|
||||
REFERENCES [dbo].[PostTraining_Course] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Record] CHECK CONSTRAINT [FK_PostTraining_Record_PostTraining_Course]
|
||||
ALTER TABLE [dbo].[PostTraining_Record] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Record_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Record] CHECK CONSTRAINT [FK_PostTraining_Record_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CategoryId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CategoryName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课程Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CourseId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课程名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CourseName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Location'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训方式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Method'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授课人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Lecturer'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'UnitIds'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训岗位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'RoleIds'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训人数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'PersonNum'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'TrainingTime'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学时(小时)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Duration'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训课程' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
--岗位培训人员记录明细表
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Record_Detail') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Record_Detail](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[RecordId] [nvarchar](50) NULL,
|
||||
[PersonId] [nvarchar](50) NULL
|
||||
CONSTRAINT [PK_PostTraining_Record_Detail] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Record_Detail] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Record_Detail_PostTraining_Record] FOREIGN KEY([RecordId])
|
||||
REFERENCES [dbo].[PostTraining_Record] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Record_Detail] CHECK CONSTRAINT [FK_PostTraining_Record_Detail_PostTraining_Record]
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record_Detail', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训记录Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record_Detail', @level2type=N'COLUMN',@level2name=N'RecordId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训对象人员Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record_Detail', @level2type=N'COLUMN',@level2name=N'PersonId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训人员记录表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Record_Detail'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
--岗位培训类别
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Category') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Category](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Category] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Category] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Category_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Category] CHECK CONSTRAINT [FK_PostTraining_Category_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Category'
|
||||
END
|
||||
|
||||
GO
|
||||
--岗位培训类别基础数据
|
||||
IF NOT EXISTS (SELECT * FROM PostTraining_Category)
|
||||
BEGIN
|
||||
INSERT INTO PostTraining_Category(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('c106f9ea-d7d9-4ddb-b88a-ed5fb0ad263f','001','通用安全知识','通用安全知识',getdate(),null);
|
||||
INSERT INTO PostTraining_Category(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('aa858051-fcef-4d4d-a288-1b589eb3f750','002','岗位基本操作技能','岗位基本操作技能',getdate(),null);
|
||||
INSERT INTO PostTraining_Category(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('b3bcf59b-e4cf-44f8-afe7-35f9295dd25b','003','生产受控管理流程','生产受控管理流程',getdate(),null);
|
||||
INSERT INTO PostTraining_Category(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('7f9083a6-9be3-43f3-966f-53addb5d9e1d','004','HSE知识、方法、工具','HSE知识、方法、工具',getdate(),null);
|
||||
END
|
||||
GO
|
||||
|
||||
--岗位培训角色
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Role') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Role](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Role] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Role] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Role_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Role] CHECK CONSTRAINT [FK_PostTraining_Role_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训角色' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
--岗位培训课程
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Course') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Course](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[CategoryId] [nvarchar](50) NULL,
|
||||
[CategoryName] [nvarchar](200) NULL,
|
||||
[Method1] [nvarchar](200) NULL,
|
||||
[Method2] [nvarchar](200) NULL,
|
||||
[Teachers1] [nvarchar](200) NULL,
|
||||
[Teachers2] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Course] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Course] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Course_PostTraining_Category] FOREIGN KEY([CategoryId])
|
||||
REFERENCES [dbo].[PostTraining_Category] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Course] CHECK CONSTRAINT [FK_PostTraining_Course_PostTraining_Category]
|
||||
ALTER TABLE [dbo].[PostTraining_Course] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Course_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Course] CHECK CONSTRAINT [FK_PostTraining_Course_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课程名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'CategoryId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'CategoryName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训方式一' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Method1'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训方式二' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Method2'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训师资一' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Teachers1'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训师资二' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Teachers2'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训课程' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Course'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
--岗位培训标准
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Standard') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Standard](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[RoleId] [nvarchar](50) NOT NULL,
|
||||
[CourseId] [nvarchar](50) NOT NULL,
|
||||
[ClassHour] [decimal](10, 2) NOT NULL,
|
||||
[Cycle] [decimal](10, 2) NOT NULL,
|
||||
[Method] [nvarchar](200) NULL,
|
||||
[Outcome] [nvarchar](200) NULL,
|
||||
[Teachers] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Standard] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_PostTraining_Role] FOREIGN KEY([RoleId])
|
||||
REFERENCES [dbo].[PostTraining_Role] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] CHECK CONSTRAINT [FK_PostTraining_Standard_PostTraining_Role]
|
||||
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_PostTraining_Course] FOREIGN KEY([CourseId])
|
||||
REFERENCES [dbo].[PostTraining_Course] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] CHECK CONSTRAINT [FK_PostTraining_Standard_PostTraining_Course]
|
||||
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] CHECK CONSTRAINT [FK_PostTraining_Standard_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'RoleId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课程id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'CourseId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训课时(学时)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'ClassHour'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训周期(年/次)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Cycle'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训方式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Method'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训效果' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Outcome'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'培训师资' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Teachers'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训标准' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Standard'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
--岗位培训方式
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Method') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Method](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Method] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Method] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Method_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Method] CHECK CONSTRAINT [FK_PostTraining_Method_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训方式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Method'
|
||||
END
|
||||
|
||||
GO
|
||||
--岗位培训方式基础数据
|
||||
IF NOT EXISTS (SELECT * FROM PostTraining_Method)
|
||||
BEGIN
|
||||
INSERT INTO PostTraining_Method(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('C4068604-B6CE-4CA3-BF32-09AF438680E6','001','课堂授课','课堂授课',getdate(),null);
|
||||
INSERT INTO PostTraining_Method(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('56E2F7C6-3C9E-43A2-ACB2-528CAF0C9FD9','002','实操演练','实操演练',getdate(),null);
|
||||
INSERT INTO PostTraining_Method(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('A33B9EE5-39EF-4600-81C3-9EB652F95CE0','003','案例研讨','案例研讨',getdate(),null);
|
||||
INSERT INTO PostTraining_Method(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('A0AA2D97-838A-4550-970F-46096985A857','004','人机系统','人机系统',getdate(),null);
|
||||
INSERT INTO PostTraining_Method(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('B8609955-7D92-4E5D-AEFB-AC49E7538A65','005','其它','其它',getdate(),null);
|
||||
END
|
||||
|
||||
GO
|
||||
--岗位培训师资
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Teachers') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Teachers](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Teachers] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[PostTraining_Teachers] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Teachers_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Teachers] CHECK CONSTRAINT [FK_PostTraining_Teachers_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位培训师资' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Teachers'
|
||||
END
|
||||
|
||||
GO
|
||||
--岗位培训师资基础数据
|
||||
IF NOT EXISTS (SELECT * FROM PostTraining_Teachers)
|
||||
BEGIN
|
||||
INSERT INTO PostTraining_Teachers(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('2FC909EB-CB7A-4470-BC04-B37FD9818A27','001','直线领导','直线领导',getdate(),null);
|
||||
INSERT INTO PostTraining_Teachers(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('30646530-7AD1-4098-89E0-D74D36AC2A73','002','内部培训师','内部培训师',getdate(),null);
|
||||
INSERT INTO PostTraining_Teachers(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('5D0A278A-7D0A-4B36-B581-AF4FEE84BCE6','003','外聘师资','外聘师资',getdate(),null);
|
||||
INSERT INTO PostTraining_Teachers(Id,Code,Name,Remark,CompileDate,CompileMan)
|
||||
VALUES('4CCC415D-BC3A-4A36-ACE2-757A43C25B16','004','其他','其他',getdate(),null);
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
/****** Object: View [dbo].[View_PostTraining_RecordDetail] Script Date: 2025-2-20 17:56:03 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
--岗位培训记录明细列表视图
|
||||
CREATE VIEW [dbo].[View_PostTraining_RecordDetail] AS
|
||||
SELECT recordDetail.Id AS DetailId,
|
||||
recordDetail.RecordId,
|
||||
recordDetail.PersonId,
|
||||
person.UnitId,
|
||||
unit.UnitName,
|
||||
person.PersonName,
|
||||
pRole.Name AS RoleName
|
||||
FROM dbo.PostTraining_Record_Detail AS recordDetail
|
||||
LEFT JOIN dbo.SitePerson_Person AS person ON person.PersonId = recordDetail.PersonId
|
||||
LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=person.UnitId
|
||||
LEFT JOIN dbo.PostTraining_Role AS pRole ON pRole.Id=person.PostTrainingRoleId
|
||||
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[View_SitePerson_Person]
|
||||
AS
|
||||
SELECT Person.PersonId,
|
||||
Person.CardNo,
|
||||
Person.PersonName,
|
||||
Person.Sex,
|
||||
(Case Person.Sex WHEN '1' THEN '男' WHEN '2' THEN '女' ELSE '' END) AS SexName,
|
||||
Person.IdentityCard,
|
||||
Person.Address,
|
||||
Person.ProjectId,
|
||||
Person.UnitId,
|
||||
Person.Birthday,
|
||||
Person.TeamGroupId,
|
||||
Person.WorkAreaId,
|
||||
Person.WorkPostId,
|
||||
Person.InTime,
|
||||
Person.OutTime,
|
||||
Person.OutResult,
|
||||
Person.Telephone,
|
||||
Person.PositionId,
|
||||
Person.PostTitleId,
|
||||
Person.PhotoUrl,
|
||||
Person.IsUsed,
|
||||
(CASE Person.IsUsed WHEN 'TRUE' THEN '是' ELSE '否' END) AS IsUsedName,
|
||||
Person.IsCardUsed,
|
||||
(CASE Person.IsCardUsed WHEN 'TRUE' THEN '是' ELSE '否' END) AS IsCardUsedName,
|
||||
Person.PersonIndex,
|
||||
Project.ProjectCode,
|
||||
Project.ProjectName,
|
||||
Unit.UnitCode,
|
||||
Unit.UnitName,
|
||||
TeamGroup.TeamGroupName,
|
||||
--WorkArea.UnitWorkCode AS WorkAreaCode,
|
||||
WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
--WorkArea.UnitWorkName AS WorkAreaName
|
||||
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
Post.WorkPostName,
|
||||
Position.PositionName,
|
||||
Title.PostTitleName,
|
||||
Depart.DepartName,
|
||||
Post.PostType,
|
||||
Post.IsHsse,
|
||||
(SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T WHERE T.PersonId=Person.PersonId) AS TrainCount,
|
||||
Person.AuditorId,
|
||||
sysUser.UserName AS AuditorName,
|
||||
Person.AuditorDate,
|
||||
Person.IDCardUrl,
|
||||
Person.IsForeign,
|
||||
case when Person.IsForeign=1 then '是' else '否' end as IsForeignStr,
|
||||
Person.IdcardType,
|
||||
BasicData1.dictName as IdcardTypeName,
|
||||
Person.IdcardStartDate,
|
||||
Person.IdcardEndDate,
|
||||
Person.IdcardForever,
|
||||
case when Person.IdcardForever='Y' then '是' else '否' end as IdcardForeverStr,
|
||||
Person.PoliticsStatus,
|
||||
BasicData2.dictName as PoliticsStatusName,
|
||||
Person.IdcardAddress,
|
||||
Person.Nation,
|
||||
BasicData3.dictName as NationName,
|
||||
Person.EduLevel,
|
||||
BasicData4.dictName as EduLevelName,
|
||||
Person.MaritalStatus,
|
||||
BasicData5.dictName as MaritalStatusName,
|
||||
Person.CountryCode,
|
||||
Country.cname as CountryName,
|
||||
Person.ProvinceCode,
|
||||
City.cname as ProvinceName,
|
||||
Person.MainCNProfessionalId,
|
||||
CNProfessional.ProfessionalName as MainCNProfessionalName,
|
||||
Person.ViceCNProfessionalId,
|
||||
'' as ViceCNProfessionalName,
|
||||
Person.IsOutside,
|
||||
case when Person.IsOutside=1 then '是' else '否' end as IsOutsideStr,
|
||||
Person.BlackList,
|
||||
Person.BlackReason,
|
||||
Person.States,
|
||||
sysUser.StarLevelId,
|
||||
StarLevel.StarMark,
|
||||
StarLevel.LevelValue,
|
||||
Person.PostTrainingRoleId,
|
||||
PostRole.Name AS PostTrainingRoleName
|
||||
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId
|
||||
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId
|
||||
--LEFT JOIN WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Person.WorkAreaId
|
||||
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId
|
||||
LEFT JOIN Base_Position AS Position ON Position.PositionId = Person.PositionId
|
||||
Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Person.PostTitleId
|
||||
Left JOIN Base_Depart AS Depart ON Depart.DepartId = Person.DepartId
|
||||
Left JOIN Sys_User AS sysUser ON sysUser.UserId = Person.AuditorId
|
||||
Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Person.IdcardType
|
||||
Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Person.PoliticsStatus
|
||||
Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Person.Nation
|
||||
Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Person.EduLevel
|
||||
Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Person.MaritalStatus
|
||||
Left JOIN RealName_Country AS Country ON Country.CountryId = Person.CountryCode
|
||||
Left JOIN RealName_City AS City ON City.provinceCode = Person.ProvinceCode
|
||||
Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId
|
||||
Left JOIN Base_StarLevel AS StarLevel ON sysUser.StarLevelId = StarLevel.StarLevelId
|
||||
Left JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[View_SitePerson_PersonList]
|
||||
AS
|
||||
|
||||
SELECT
|
||||
Person.PersonId,
|
||||
Person.ProjectId,
|
||||
Person.IsUsed,
|
||||
Person.IsForeign,
|
||||
Person.IsOutside,
|
||||
Person.BlackList,
|
||||
Person.CardNo,
|
||||
Person.PersonName,
|
||||
Person.UnitId,
|
||||
Unit.UnitName,
|
||||
Post.WorkPostName,
|
||||
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
TeamGroup.TeamGroupName,
|
||||
Person.InTime,
|
||||
Person.OutTime,
|
||||
(CASE Person.IsUsed WHEN 'TRUE' THEN '是' ELSE '否' END) AS IsUsedName,
|
||||
Person.IdentityCard,
|
||||
Person.TeamGroupId,
|
||||
Person.WorkPostId,
|
||||
Person.IdcardType,
|
||||
Person.PhotoUrl,
|
||||
edu.TrainCount,
|
||||
PoliticsStatus.dictName AS PoliticsStatusName,
|
||||
Person.PostTrainingRoleId,
|
||||
PostRole.Name AS PostTrainingRoleName
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId
|
||||
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId
|
||||
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId
|
||||
LEFT JOIN RealName_BasicData AS PoliticsStatus ON PoliticsStatus.dictCode = Person.PoliticsStatus AND PoliticsStatus.DictTypeCode='POLITICAL_LANDSCAPE'
|
||||
LEFT JOIN (select PersonId,count(PersonId)as TrainCount from EduTrain_TrainRecordDetail group by PersonId) as edu on edu.PersonId= Person.PersonId
|
||||
LEFT JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
|
@ -81,6 +81,9 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_16.0.0.0__89845dcd8080cc91\新建文件夹\Microsoft.SQLServer.ManagedDTS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MiniExcel, Version=1.38.0.0, Culture=neutral, PublicKeyToken=e7310002a53eac39, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MiniExcel.1.38.0\lib\net45\MiniExcel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -122,6 +125,7 @@
|
|||
</Reference>
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
|
@ -273,6 +277,7 @@
|
|||
<Compile Include="Common\UserShowColumnsService.cs" />
|
||||
<Compile Include="Common\WeatherService.cs" />
|
||||
<Compile Include="Common\WeekDayService.cs" />
|
||||
<Compile Include="Common\StringHelper.cs" />
|
||||
<Compile Include="Common\WordHelp.cs" />
|
||||
<Compile Include="CostGoods\MeasuresPlanService.cs" />
|
||||
<Compile Include="CostGoods\PayRegistrationService.cs" />
|
||||
|
@ -548,6 +553,13 @@
|
|||
<Compile Include="HSSE\Environmental\EnvironmentalMonitoringService.cs" />
|
||||
<Compile Include="HSSE\Environmental\UnexpectedEnvironmentalService.cs" />
|
||||
<Compile Include="HSSE\Epidemic\Epidemic_MaterialService.cs" />
|
||||
<Compile Include="HSSE\Examine\MinusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingService.cs" />
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivitiesService.cs" />
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservationService.cs" />
|
||||
<Compile Include="HSSE\Examine\BonusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperienceService.cs" />
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlanService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\FinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\HSEFinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\OtherDocumentListService.cs" />
|
||||
|
@ -678,6 +690,14 @@
|
|||
<Compile Include="HSSE\OccupationHealth\PhysicalExaminationService.cs" />
|
||||
<Compile Include="HSSE\Perfomance\PerfomanceRecordService.cs" />
|
||||
<Compile Include="HSSE\Perfomance\PersonPerfomanceService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingRecordDetailService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingRecordService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingStandardService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingMethodService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingTeachersService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingCourseService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingRoleService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingCategoryService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentPersonQualityService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentQualityAuditDetailService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentQualityService.cs" />
|
||||
|
|
|
@ -6,10 +6,12 @@ using System.Text;
|
|||
namespace BLL
|
||||
{
|
||||
public static class Const
|
||||
{ /// <summary>
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间书签(用于筛选数据范围)
|
||||
/// </summary>
|
||||
public static DateTime DtmarkTime = DateTime.Parse("2023-01-01");
|
||||
|
||||
public const string SYHSE_PromiseMenuId = "3712B547-06B1-4D54-80B8-1358D222CB23";
|
||||
public const string SYHSE_BaseMenuId = "FEC432D0-FBE5-47B9-8E21-B259D96525E6";
|
||||
public const string SYHSE_HiddenDangersMenuId = "7C30F10B-868C-418A-A729-5568DFA1719B";
|
||||
|
@ -22,6 +24,7 @@ namespace BLL
|
|||
/// 焊条发放回收纪录
|
||||
/// </summary>
|
||||
public const string HJGL_ElectrodeRecoveryReportId = "13";
|
||||
|
||||
#region 焊接材料
|
||||
/// <summary>
|
||||
/// 焊丝烘烤记录
|
||||
|
@ -67,6 +70,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string HJGL_EWeldRHRecordMenuId = "5BADA90D-EB19-47DE-6666-CA22517AF415";
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日报导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
|
@ -143,9 +147,6 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string CheckReport4Id = "111";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 热处理管理
|
||||
/// </summary>
|
||||
|
@ -238,6 +239,7 @@ namespace BLL
|
|||
/// 施工区域
|
||||
/// </summary>
|
||||
public const string WorkAreaMenuId = "F7BED9C2-49D7-478D-BD65-E3916F1152F8";
|
||||
|
||||
#region 基础信息
|
||||
/// <summary>
|
||||
/// 焊接耗材
|
||||
|
@ -457,7 +459,6 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string HJGL_TestApplicationTemplateUrl = "File\\Excel\\HJGL_DataIn\\焊工考试申请导入模板.xls";
|
||||
|
||||
|
||||
#region 工程签证确认单流程定义
|
||||
|
||||
///// <summary>
|
||||
|
@ -486,20 +487,17 @@ namespace BLL
|
|||
public static string ConfirmForm_Complete = "4";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 密级
|
||||
/// </summary>
|
||||
public const string SecretLevelMenuId = "45B0DFE5-4A86-4F84-9C4B-FB753986D383";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工程签证申请/评审表
|
||||
/// </summary>
|
||||
public const string VisaApplicationMenuId = "C4ED62E6-3D2D-4DD9-937D-2AA039032B79";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目管理
|
||||
/// </summary>
|
||||
|
@ -784,7 +782,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
//public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglA56Ux1q0sZF0WCFLfK70Cs";
|
||||
public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglF9s6bk6eyV0WVrT5tqFq8I";
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 按钮描述
|
||||
|
@ -940,7 +938,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string ProjectState_3 = "3";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 项目单位类型
|
||||
/// <summary>
|
||||
/// 总包
|
||||
|
@ -953,15 +951,15 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 监理
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_3 = "3";
|
||||
public const string ProjectUnitType_3 = "3";
|
||||
/// <summary>
|
||||
/// 业主
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_4 = "4";
|
||||
public const string ProjectUnitType_4 = "4";
|
||||
/// <summary>
|
||||
/// 检测单位
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_5 = "6";
|
||||
public const string ProjectUnitType_5 = "6";
|
||||
|
||||
/// <summary>
|
||||
/// 其他
|
||||
|
@ -1006,7 +1004,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSE工程师岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e";
|
||||
public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e";
|
||||
|
||||
/// <summary>
|
||||
/// HSE经理岗位Id
|
||||
|
@ -1337,7 +1335,7 @@ namespace BLL
|
|||
/// 党建群团
|
||||
/// </summary>
|
||||
public const string Menu_Party = "Menu_Party";
|
||||
|
||||
|
||||
/*项目*/
|
||||
/// <summary>
|
||||
/// 项目设置
|
||||
|
@ -1727,6 +1725,86 @@ namespace BLL
|
|||
public const string ProjectProjectMapMenuId = "F266456A-991F-45A3-BCD6-CF2515D71E39";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 岗位培训
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训记录
|
||||
/// </summary>
|
||||
public const string PostTrainingRecordMenuId = "CEF2A108-DDC2-46A2-A47B-7431F1F890F1";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训类别
|
||||
/// </summary>
|
||||
public const string PostTrainingCategoryMenuId = "465786B2-AD20-483A-A082-B2C944BE998F";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public const string PostTrainingCourseMenuId = "95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public const string PostTrainingStandardMenuId = "7BCA5AD9-D0FB-4850-A9D1-88364008984D";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训角色
|
||||
/// </summary>
|
||||
public const string PostTrainingRoleMenuId = "50F80CAF-08BA-4A16-9EF8-76DF0A8078CF";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训方式
|
||||
/// </summary>
|
||||
public const string PostTrainingMethodMenuId = "919853EB-A8FA-4BE5-9964-70F43E000961";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训教资
|
||||
/// </summary>
|
||||
public const string PostTrainingTeachersMenuId = "026F0A23-AECD-4BB8-8504-1EB8CB9151C0";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region HSE绩效考核
|
||||
|
||||
/// <summary>
|
||||
/// 考核加分情况
|
||||
/// </summary>
|
||||
public const string BonusScoreSituationMenuId = "6957A732-BA33-499E-AB32-DB1F73BEA8CE";
|
||||
|
||||
/// <summary>
|
||||
/// 考核扣分情况
|
||||
/// </summary>
|
||||
public const string MinusScoreSituationMenuId = "0BCE76EA-319F-47BF-913A-A32735641F5C";
|
||||
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public const string PersonalSafetyActionPlanMenuId = "7DD00BEF-821D-4996-ADF8-695139F201B4";
|
||||
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public const string SharingOfSafetyExperienceMenuId = "D5FC7B12-0E81-482C-8B29-A9F43DF05D1F";
|
||||
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public const string LeadershipJoinHomeworkAnalysisMeetingMenuId = "05F4AC73-1BA2-4FF2-AAED-292DF5E44412";
|
||||
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public const string CoConstructionActivitiesMenuId = "D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E";
|
||||
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public const string BehavioralSafetyObservationMenuId = "5049BB69-A75F-47D4-ABF3-DAA719D05C74";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 公共资源
|
||||
#region 安全合规
|
||||
/// <summary>
|
||||
|
@ -1758,8 +1836,8 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSSE安全组织架构图
|
||||
/// </summary>
|
||||
public const string HSSESafeOrganizePicMenuId = "9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F";
|
||||
|
||||
public const string HSSESafeOrganizePicMenuId = "9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F";
|
||||
|
||||
/// <summary>
|
||||
/// 安全管理机构
|
||||
/// </summary>
|
||||
|
@ -2005,7 +2083,7 @@ namespace BLL
|
|||
public const string ServerSafeUnitReportMenuId = "2C673125-AAA4-4F41-A827-0F04DFE55DED";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 企业安全大检查
|
||||
/// <summary>
|
||||
/// 安全监督检查报告
|
||||
|
@ -2229,20 +2307,24 @@ namespace BLL
|
|||
|
||||
#region 项目菜单
|
||||
|
||||
/// <summary>
|
||||
/// 看板数据维护
|
||||
/// </summary>
|
||||
public const string ProjectBoardDataMenuId = "087F4FAF-3B00-462A-9040-4CB3556F8177";
|
||||
|
||||
#region 安全体系
|
||||
/// <summary>
|
||||
/// 安全组织机构
|
||||
/// </summary>
|
||||
public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2";
|
||||
public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2";
|
||||
/// <summary>
|
||||
/// 安全体系
|
||||
/// </summary>
|
||||
public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0";
|
||||
public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0";
|
||||
/// <summary>
|
||||
/// 安全制度
|
||||
/// </summary>
|
||||
public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815";
|
||||
public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815";
|
||||
/// <summary>
|
||||
/// 安全管理组织机构
|
||||
/// </summary>
|
||||
|
@ -2300,7 +2382,7 @@ namespace BLL
|
|||
/// 车辆管理
|
||||
/// </summary>
|
||||
public const string VehicleMenuId = "E1D76B04-9A28-436D-BA49-83AC80B36B0C";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一般机具设备资质
|
||||
/// </summary>
|
||||
|
@ -2471,8 +2553,8 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 现场人员统计
|
||||
/// </summary>
|
||||
public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E";
|
||||
|
||||
public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E";
|
||||
|
||||
/// <summary>
|
||||
/// 人员变化
|
||||
/// </summary>
|
||||
|
@ -2511,7 +2593,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 培训考试记录
|
||||
/// </summary>
|
||||
public const string ProjectTrainTestRecordMenuId1= "10736CAC-A343-4D73-9D03-E6A3D1909A7B";
|
||||
public const string ProjectTrainTestRecordMenuId1 = "10736CAC-A343-4D73-9D03-E6A3D1909A7B";
|
||||
/// <summary>
|
||||
/// 模拟考试
|
||||
/// </summary>
|
||||
|
@ -2538,7 +2620,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 安全技术交底
|
||||
/// </summary>
|
||||
public const string ProjectHSETechnicalMenuId = "49485F7E-8E71-4EED-87B4-BF6CC180C69C";
|
||||
public const string ProjectHSETechnicalMenuId = "49485F7E-8E71-4EED-87B4-BF6CC180C69C";
|
||||
/// <summary>
|
||||
/// 作业票申请
|
||||
/// </summary>
|
||||
|
@ -2613,7 +2695,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSSE专项检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB";
|
||||
public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB";
|
||||
/// <summary>
|
||||
/// HSSE综合检查
|
||||
/// </summary>
|
||||
|
@ -2629,11 +2711,11 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 开工前HSSE检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F";
|
||||
public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F";
|
||||
/// <summary>
|
||||
/// 季节性/节假日HSSE检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529";
|
||||
public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529";
|
||||
/// <summary>
|
||||
/// 危险因素统计分析
|
||||
/// </summary>
|
||||
|
@ -2751,11 +2833,11 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSSE月例会
|
||||
/// </summary>
|
||||
public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684";
|
||||
public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684";
|
||||
/// <summary>
|
||||
/// HSSE专题会议
|
||||
/// </summary>
|
||||
public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F";
|
||||
public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F";
|
||||
/// <summary>
|
||||
/// 其他会议记录
|
||||
/// </summary>
|
||||
|
@ -2847,11 +2929,11 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 合同HSE费用及支付台账
|
||||
/// </summary>
|
||||
public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4";
|
||||
public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4";
|
||||
/// <summary>
|
||||
/// HSSE费用统计表
|
||||
/// </summary>
|
||||
public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0";
|
||||
public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0";
|
||||
/// <summary>
|
||||
/// HSSE物资管理
|
||||
/// </summary>
|
||||
|
@ -2859,11 +2941,11 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 物资入库管理
|
||||
/// </summary>
|
||||
public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A";
|
||||
public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A";
|
||||
/// <summary>
|
||||
/// 物资出库管理
|
||||
/// </summary>
|
||||
public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC";
|
||||
public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC";
|
||||
/// <summary>
|
||||
/// 物资库存管理
|
||||
/// </summary>
|
||||
|
@ -2890,19 +2972,19 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSSE检查类别设置
|
||||
/// </summary>
|
||||
public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8";
|
||||
public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8";
|
||||
/// <summary>
|
||||
/// HSSE行政管理检查记录
|
||||
/// </summary>
|
||||
public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857";
|
||||
public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857";
|
||||
/// <summary>
|
||||
/// 现场车辆管理
|
||||
/// </summary>
|
||||
public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5";
|
||||
public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5";
|
||||
/// <summary>
|
||||
/// 现场驾驶员管理
|
||||
/// </summary>
|
||||
public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0";
|
||||
public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0";
|
||||
/// <summary>
|
||||
/// 职业健康管理
|
||||
/// </summary>
|
||||
|
@ -2917,7 +2999,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 月度安全评比
|
||||
/// </summary>
|
||||
public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7";
|
||||
public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7";
|
||||
/// <summary>
|
||||
/// 全国安全月
|
||||
/// </summary>
|
||||
|
@ -2931,7 +3013,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string ProjectOtherActivitiesMenuId = "446D702B-F0C1-4D12-A862-0B8317D95928";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 职业健康
|
||||
/// <summary>
|
||||
/// 危害检测
|
||||
|
@ -2977,7 +3059,7 @@ namespace BLL
|
|||
/// HSSE管理周报
|
||||
/// </summary>
|
||||
public const string ProjectManagerWeekMenuId = "AE118E9C-C309-43B7-A198-8CA90A8D98EB";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 月报(赛鼎)
|
||||
/// </summary>
|
||||
|
@ -3025,7 +3107,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 企业安全管理资料
|
||||
/// </summary>
|
||||
public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC";
|
||||
public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC";
|
||||
/// <summary>
|
||||
/// HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
|
@ -3059,7 +3141,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string ProjectHSEDiaryMenuId = "8E5B4A8E-B06E-4C8A-A2C8-1091A9BCAF72";
|
||||
#endregion
|
||||
|
||||
|
||||
#region HSSE绩效评价管理
|
||||
/// <summary>
|
||||
/// HSSE分包方绩效评价
|
||||
|
@ -3144,27 +3226,27 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// HSSE宣传活动
|
||||
/// </summary>
|
||||
public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386";
|
||||
public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386";
|
||||
/// <summary>
|
||||
/// 项目图片
|
||||
/// </summary>
|
||||
public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354";
|
||||
public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354";
|
||||
/// <summary>
|
||||
/// 一般来文管理
|
||||
/// </summary>
|
||||
public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD";
|
||||
public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD";
|
||||
/// <summary>
|
||||
/// 项目文件夹
|
||||
/// </summary>
|
||||
public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54";
|
||||
public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54";
|
||||
/// <summary>
|
||||
/// 文件柜1
|
||||
/// </summary>
|
||||
public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B";
|
||||
public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B";
|
||||
/// <summary>
|
||||
/// 文件柜2
|
||||
/// </summary>
|
||||
public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73";
|
||||
public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73";
|
||||
/// <summary>
|
||||
/// 信息统计
|
||||
/// </summary>
|
||||
|
@ -3539,6 +3621,16 @@ namespace BLL
|
|||
/// Excel附件路径
|
||||
/// </summary>
|
||||
public const string ExcelUrl = "File\\Excel\\Temp\\";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public const string PostTrainingCourseTemplateUrl = "File\\Excel\\DataIn\\岗位培训课程导入模板.xlsx";
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public const string PostTrainingStandardTemplateUrl = "File\\Excel\\DataIn\\岗位培训标准导入模板.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 数据导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
|
@ -3813,19 +3905,19 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表
|
||||
/// </summary>
|
||||
public const string Information_AccidentCauseReportId = "2";
|
||||
public const string Information_AccidentCauseReportId = "2";
|
||||
/// <summary>
|
||||
/// 安全生产数据季报
|
||||
/// </summary>
|
||||
public const string Information_SafetyQuarterlyReportId = "3";
|
||||
public const string Information_SafetyQuarterlyReportId = "3";
|
||||
/// <summary>
|
||||
/// 应急演练开展情况季报表
|
||||
/// </summary>
|
||||
public const string Information_DrillConductedQuarterlyReportId = "4";
|
||||
public const string Information_DrillConductedQuarterlyReportId = "4";
|
||||
/// <summary>
|
||||
/// 应急演练工作计划半年报表
|
||||
/// </summary>
|
||||
public const string Information_DrillPlanHalfYearReportId = "5";
|
||||
public const string Information_DrillPlanHalfYearReportId = "5";
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
|
@ -3833,7 +3925,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 环境危险源辨识与评价打印报表
|
||||
/// </summary>
|
||||
public const string EnvironmentalRiskReportId = "12";
|
||||
public const string EnvironmentalRiskReportId = "12";
|
||||
/// <summary>
|
||||
/// 环境危险源辨识与评价(重要环境因素)打印报表
|
||||
/// </summary>
|
||||
|
@ -3841,7 +3933,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 职业健康安全危险源辨识与评价打印报表
|
||||
/// </summary>
|
||||
public const string HazardListReportId = "14";
|
||||
public const string HazardListReportId = "14";
|
||||
/// <summary>
|
||||
/// 职业健康安全危险源辨识与评价(重大危险源)打印报表
|
||||
/// </summary>
|
||||
|
@ -3872,7 +3964,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 已完成/已闭环
|
||||
/// </summary>
|
||||
public const string State_3 = "3";
|
||||
public const string State_3 = "3";
|
||||
/// <summary>
|
||||
/// 已完成/已上报
|
||||
/// </summary>
|
||||
|
@ -5001,7 +5093,7 @@ namespace BLL
|
|||
/// 重报
|
||||
/// </summary>
|
||||
public const string Comprehensive_ReCompile = "0";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 驳回
|
||||
/// </summary>
|
||||
|
@ -5526,7 +5618,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 审批完成
|
||||
/// </summary>
|
||||
public const string ConstructionPlan_Complete= "5";
|
||||
public const string ConstructionPlan_Complete = "5";
|
||||
#endregion
|
||||
|
||||
#region 总承包商施工报告
|
||||
|
@ -6126,8 +6218,6 @@ namespace BLL
|
|||
public const string IsoCompreInfoMenuId = "CF3CB43C-4031-4CFD-905F-154DC1CB881E";
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 焊材申请流程定义
|
||||
/// <summary>
|
||||
/// 重新编制
|
||||
|
@ -6150,6 +6240,7 @@ namespace BLL
|
|||
public static string MaterialApply_Complete = "3";//分包
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 不参与规则设置菜单
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 字符串操作辅助类
|
||||
/// </summary>
|
||||
public class StringHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 字符串转换
|
||||
/// 'A,B,C' => 'A','B','C'
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string StringConvert(string str)
|
||||
{
|
||||
string result = string.Empty;
|
||||
if (!string.IsNullOrWhiteSpace(str))
|
||||
{
|
||||
string[] items = str.Split(',');
|
||||
result = string.Join(",", items.Select(x => $"'{x}'"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public static class BehavioralSafetyObservationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取行为安全观察与沟通信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BehavioralSafetyObservation GetBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加行为安全观察与沟通
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation model = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 考核加分情况
|
||||
/// </summary>
|
||||
public static class BonusScoreSituationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取考核加分情况信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreSituation GetBonusScoreSituationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加考核加分情况
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreSituation(Model.Examine_BonusScoreSituation model)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation newModel = new Model.Examine_BonusScoreSituation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Level = model.Level,
|
||||
LevelName = model.LevelName,
|
||||
Score = model.Score,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreSituation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreSituation(Model.Examine_BonusScoreSituation model)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation newModel = Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Level = model.Level;
|
||||
newModel.LevelName = model.LevelName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreSituationById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation model = Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreSituation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public static class CoConstructionActivitiesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取一线党员联系班组共建活动信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_CoConstructionActivities GetCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_CoConstructionActivities.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities model = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_CoConstructionActivities.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public static class LeadershipJoinHomeworkAnalysisMeetingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取领导人员参加班组作业分析会信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_LeadershipJoinHomeworkAnalysisMeeting GetLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 考核扣分情况
|
||||
/// </summary>
|
||||
public static class MinusScoreSituationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取考核扣分情况信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_MinusScoreSituation GetMinusScoreSituationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加考核扣分情况
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddMinusScoreSituation(Model.Examine_MinusScoreSituation model)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation newModel = new Model.Examine_MinusScoreSituation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Level = model.Level,
|
||||
LevelName = model.LevelName,
|
||||
Score = model.Score,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_MinusScoreSituation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateMinusScoreSituation(Model.Examine_MinusScoreSituation model)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation newModel = Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Level = model.Level;
|
||||
newModel.LevelName = model.LevelName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteMinusScoreSituationById(string Id)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation model = Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_MinusScoreSituation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public static class PersonalSafetyActionPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取个人安全行动计划信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_PersonalSafetyActionPlan GetPersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加个人安全行动计划
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddPersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeletePersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan model = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public static class SharingOfSafetyExperienceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全经验分享信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_SharingOfSafetyExperience GetSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全经验分享
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience model = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训类别
|
||||
/// </summary>
|
||||
public static class PostTrainingCategoryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训类别信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Category GetCategoryById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训类别信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Category GetCategoryByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训类别
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCategory(Model.PostTraining_Category model)
|
||||
{
|
||||
Model.PostTraining_Category newModel = new Model.PostTraining_Category
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Category.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCategory(Model.PostTraining_Category model)
|
||||
{
|
||||
Model.PostTraining_Category newModel = Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCategoryById(string Id)
|
||||
{
|
||||
Model.PostTraining_Category model = Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Category.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训类别List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Category> GetCategoryList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Category orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训类别下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingCategoryDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingCategoryList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训类别下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Category> GetPostTrainingCategoryList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Category orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,324 @@
|
|||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public static class PostTrainingCourseService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训课程信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Course GetCourseById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训课程
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCourse(Model.PostTraining_Course model)
|
||||
{
|
||||
Model.PostTraining_Course newModel = new Model.PostTraining_Course
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CategoryId = model.CategoryId,
|
||||
CategoryName = model.CategoryName,
|
||||
Method1 = model.Method1,
|
||||
Method2 = model.Method2,
|
||||
Teachers1 = model.Teachers1,
|
||||
Teachers2 = model.Teachers2,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Course.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCourse(Model.PostTraining_Course model)
|
||||
{
|
||||
Model.PostTraining_Course newModel = Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.CategoryId = model.CategoryId;
|
||||
newModel.CategoryName = model.CategoryName;
|
||||
newModel.Method1 = model.Method1;
|
||||
newModel.Method2 = model.Method2;
|
||||
newModel.Teachers1 = model.Teachers1;
|
||||
newModel.Teachers2 = model.Teachers2;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCourseById(string Id)
|
||||
{
|
||||
Model.PostTraining_Course model = Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Course.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训课程List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Course> GetCourseList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Course orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入数据
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="creatUserId"></param>
|
||||
/// <param name="errorList"></param>
|
||||
/// <returns></returns>
|
||||
public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId, ref List<Model.ErrorInfo> errorList)
|
||||
{
|
||||
var responeData = new ResponeData();
|
||||
List<PostTrainingCourse_InputDataIn> temeplateDtoIns;
|
||||
try
|
||||
{
|
||||
//A2:开始行
|
||||
temeplateDtoIns = MiniExcel.Query<PostTrainingCourse_InputDataIn>(path, startCell: "A2").ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "模板错误:" + ex.ToString();
|
||||
return responeData;
|
||||
}
|
||||
|
||||
if (temeplateDtoIns.Count == 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入数据为空!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
//培训课程
|
||||
var lstCourse = GetCourseList();
|
||||
//培训类别
|
||||
var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
//培训方式
|
||||
var lstMethod = PostTrainingMethodService.GetMethodList();
|
||||
//培训教资
|
||||
var lstTeachers = PostTrainingTeachersService.GetTeachersList();
|
||||
|
||||
#region 数据校验
|
||||
|
||||
string errorMsg = string.Empty;
|
||||
int rowIndex = 3;
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string name = !string.IsNullOrWhiteSpace(item.Name) ? item.Name.Trim() : string.Empty;
|
||||
string method1 = !string.IsNullOrWhiteSpace(item.Method1) ? item.Method1.Trim() : string.Empty;
|
||||
string method2 = !string.IsNullOrWhiteSpace(item.Method2) ? item.Method2.Trim() : string.Empty;
|
||||
string teachers1 = !string.IsNullOrWhiteSpace(item.Teachers1) ? item.Teachers1.Trim() : string.Empty;
|
||||
string teachers2 = !string.IsNullOrWhiteSpace(item.Teachers2) ? item.Teachers2.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName))
|
||||
{
|
||||
if (!lstCategory.Where(x => x.Name == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = $"培训类别不存在:{categoryName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName) && !string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
if (temeplateDtoIns.Where(x => x.Name == name && x.CategoryName == categoryName).Count() > 1)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = $"导入数据重复:{name}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
if (lstCourse.Where(x => x.Name == name && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = $"已存在课程:{name}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(method1))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method1).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式一";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method1}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(method2))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method2).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式二";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method2}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers1))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers1).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资一";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers1}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers2))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers2).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资二";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers2}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
if (errorList.Any())
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "存在异常数据!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string name = !string.IsNullOrWhiteSpace(item.Name) ? item.Name.Trim() : string.Empty;
|
||||
string method1 = !string.IsNullOrWhiteSpace(item.Method1) ? item.Method1.Trim() : string.Empty;
|
||||
string method2 = !string.IsNullOrWhiteSpace(item.Method2) ? item.Method2.Trim() : string.Empty;
|
||||
string teachers1 = !string.IsNullOrWhiteSpace(item.Teachers1) ? item.Teachers1.Trim() : string.Empty;
|
||||
string teachers2 = !string.IsNullOrWhiteSpace(item.Teachers2) ? item.Teachers2.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
Model.PostTraining_Course newModel = new Model.PostTraining_Course
|
||||
{
|
||||
Id = SQLHelper.GetNewID(typeof(Model.PostTraining_Course)),
|
||||
Code = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Course", "Code", ""),
|
||||
//ProjectId = this.ProjectId,
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = creatUserId
|
||||
};
|
||||
newModel.Name = name;
|
||||
newModel.CategoryId = lstCategory.Where(x => x.Name == categoryName).FirstOrDefault().Id;
|
||||
newModel.CategoryName = categoryName;
|
||||
newModel.Method1 = method1;
|
||||
newModel.Method2 = method2;
|
||||
newModel.Teachers1 = teachers1;
|
||||
newModel.Teachers2 = teachers2;
|
||||
newModel.Remark = remark;
|
||||
|
||||
AddCourse(newModel);
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训课程下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="categoryId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingCourseDropDownList(FineUIPro.DropDownList dropName, string categoryId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingCourseList(categoryId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训课程下拉项
|
||||
/// </summary>
|
||||
/// <param name="categoryId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Course> GetPostTrainingCourseList(string categoryId)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Course orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(categoryId))
|
||||
{
|
||||
lst = lst.Where(x => x.CategoryId == categoryId).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训方式
|
||||
/// </summary>
|
||||
public static class PostTrainingMethodService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训方式信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Method GetMethodById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训方式信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Method GetMethodByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训方式
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddMethod(Model.PostTraining_Method model)
|
||||
{
|
||||
Model.PostTraining_Method newModel = new Model.PostTraining_Method
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Method.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateMethod(Model.PostTraining_Method model)
|
||||
{
|
||||
Model.PostTraining_Method newModel = Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteMethodById(string Id)
|
||||
{
|
||||
Model.PostTraining_Method model = Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Method.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训方式List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Method> GetMethodList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Method orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训方式下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingMethodDropDownList(FineUIPro.DropDownList dropName, string excludeName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Name";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingMethodList(excludeName);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训方式下拉项
|
||||
/// </summary>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Method> GetPostTrainingMethodList(string excludeName)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Method orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(excludeName))
|
||||
{
|
||||
lst = lst.Where(x => x.Name != excludeName).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训记录明细
|
||||
/// </summary>
|
||||
public static class PostTrainingRecordDetailService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训记录明细信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static PostTraining_Record_Detail GetRecordDetailById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Record_Detail.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据记录Id、人员Id获取岗位培训记录明细信息
|
||||
/// </summary>
|
||||
/// <param name="recordId"></param>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static PostTraining_Record_Detail GetRecordDetailByRecordIdPersonId(string recordId, string personId)
|
||||
{
|
||||
return Funs.DB.PostTraining_Record_Detail.FirstOrDefault(e => e.RecordId == recordId && e.PersonId == personId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键记录Id获取所有的培训明细信息
|
||||
/// </summary>
|
||||
/// <param name="recordId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Record_Detail> GetRecordDetailByRecordId(string recordId)
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Record_Detail where x.RecordId == recordId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训记录明细
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddRecordDetail(PostTraining_Record_Detail model)
|
||||
{
|
||||
PostTraining_Record_Detail newModel = new PostTraining_Record_Detail
|
||||
{
|
||||
Id = model.Id,
|
||||
RecordId = model.RecordId,
|
||||
PersonId = model.PersonId
|
||||
};
|
||||
Funs.DB.PostTraining_Record_Detail.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateRecordDetail(PostTraining_Record_Detail model)
|
||||
{
|
||||
PostTraining_Record_Detail newModel = Funs.DB.PostTraining_Record_Detail.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.RecordId = model.RecordId;
|
||||
newModel.PersonId = model.PersonId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteRecordDetailById(string Id)
|
||||
{
|
||||
PostTraining_Record_Detail model = Funs.DB.PostTraining_Record_Detail.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Record_Detail.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除培训记录
|
||||
/// </summary>
|
||||
/// <param name="detailId"></param>
|
||||
public static void DeleteTrainDetailByTrainDetail(string detailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.PostTraining_Record_Detail trainDetails = Funs.DB.PostTraining_Record_Detail.FirstOrDefault(e => e.Id == detailId);
|
||||
if (trainDetails != null)
|
||||
{
|
||||
db.PostTraining_Record_Detail.DeleteOnSubmit(trainDetails);
|
||||
db.SubmitChanges();
|
||||
|
||||
var record = PostTrainingRecordService.GetRecordById(trainDetails.RecordId);
|
||||
if (record != null)
|
||||
{
|
||||
record.PersonNum -= 1;
|
||||
BLL.PostTrainingRecordService.UpdateRecord(record);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,391 @@
|
|||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训记录
|
||||
/// </summary>
|
||||
public static class PostTrainingRecordService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训记录信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static PostTraining_Record GetRecordById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Record.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训记录
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddRecord(PostTraining_Record model)
|
||||
{
|
||||
PostTraining_Record newModel = new PostTraining_Record
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Content = model.Content,
|
||||
CategoryId = model.CategoryId,
|
||||
CategoryName = model.CategoryName,
|
||||
CourseId = model.CourseId,
|
||||
CourseName = model.CourseName,
|
||||
Location = model.Location,
|
||||
Method = model.Method,
|
||||
Lecturer = model.Lecturer,
|
||||
UnitIds = model.UnitIds,
|
||||
RoleIds = model.RoleIds,
|
||||
PersonNum = model.PersonNum,
|
||||
TrainingTime = model.TrainingTime,
|
||||
Duration = model.Duration,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Record.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateRecord(PostTraining_Record model)
|
||||
{
|
||||
PostTraining_Record newModel = Funs.DB.PostTraining_Record.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Content = model.Content;
|
||||
newModel.CategoryId = model.CategoryId;
|
||||
newModel.CategoryName = model.CategoryName;
|
||||
newModel.CourseId = model.CourseId;
|
||||
newModel.CourseName = model.CourseName;
|
||||
newModel.Location = model.Location;
|
||||
newModel.Method = model.Method;
|
||||
newModel.Lecturer = model.Lecturer;
|
||||
newModel.UnitIds = model.UnitIds;
|
||||
newModel.RoleIds = model.RoleIds;
|
||||
newModel.PersonNum = model.PersonNum;
|
||||
newModel.TrainingTime = model.TrainingTime;
|
||||
newModel.Duration = model.Duration;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteRecordById(string Id)
|
||||
{
|
||||
PostTraining_Record model = Funs.DB.PostTraining_Record.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Record.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
#region 导入数据
|
||||
|
||||
///// <summary>
|
||||
///// 导入数据
|
||||
///// </summary>
|
||||
///// <param name="path"></param>
|
||||
///// <param name="projectid"></param>
|
||||
///// <param name="creatUserId"></param>
|
||||
///// <param name="errorList"></param>
|
||||
///// <returns></returns>
|
||||
//public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId, ref List<ErrorInfo> errorList)
|
||||
//{
|
||||
// var responeData = new ResponeData();
|
||||
// List<PostTrainingRecord_InputDataIn> temeplateDtoIns;
|
||||
// try
|
||||
// {
|
||||
// temeplateDtoIns = MiniExcel.Query<PostTrainingRecord_InputDataIn>(path, startCell: "A1").ToList();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// responeData.code = 0;
|
||||
// responeData.message = "模板错误:" + ex.ToString();
|
||||
// return responeData;
|
||||
// }
|
||||
|
||||
// if (temeplateDtoIns.Count == 0)
|
||||
// {
|
||||
// responeData.code = 0;
|
||||
// responeData.message = "导入数据为空!";
|
||||
// return responeData;
|
||||
// }
|
||||
|
||||
// //培训标准
|
||||
// var lstRecord = GetRecordInfoList();
|
||||
// //培训课程
|
||||
// var lstCourse = PostTrainingCourseService.GetCourseList();
|
||||
// //培训角色
|
||||
// var lstRole = PostTrainingRoleService.GetRoleList();
|
||||
// //培训类别
|
||||
// var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
// //培训方式
|
||||
// var lstMethod = PostTrainingMethodService.GetMethodList();
|
||||
// //培训教资
|
||||
// var lstTeachers = PostTrainingTeachersService.GetTeachersList();
|
||||
// //培训效果
|
||||
// var lstOutcome = GetPostTrainingOutcomeList();
|
||||
|
||||
// #region 数据校验
|
||||
|
||||
// string errorMsg = string.Empty;
|
||||
// int rowIndex = 3;
|
||||
// foreach (var item in temeplateDtoIns)
|
||||
// {
|
||||
// string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
// string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
// string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
// string classHourStr = !string.IsNullOrWhiteSpace(item.ClassHour) ? item.ClassHour.Trim() : string.Empty;
|
||||
// string cycleStr = !string.IsNullOrWhiteSpace(item.Cycle) ? item.Cycle.Trim() : string.Empty;
|
||||
// decimal classHour = 0;
|
||||
// decimal cycle = 0;
|
||||
// string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
// string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
// string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
// string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(roleName))
|
||||
// {
|
||||
// if (!lstRole.Where(x => x.Name == roleName).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "适用岗位角色";
|
||||
// errorInfo.Reason = $"角色不存在:{roleName}";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "适用岗位角色";
|
||||
// errorInfo.Reason = "不可为空";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(categoryName))
|
||||
// {
|
||||
// if (!lstCategory.Where(x => x.Name == categoryName).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训类别";
|
||||
// errorInfo.Reason = $"培训类别不存在:{categoryName}";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训类别";
|
||||
// errorInfo.Reason = "不可为空";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
|
||||
// if (string.IsNullOrWhiteSpace(courseName))
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课程";
|
||||
// errorInfo.Reason = "不可为空";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(categoryName) && !string.IsNullOrWhiteSpace(courseName))
|
||||
// {
|
||||
// if (temeplateDtoIns.Where(x => x.RoleName == roleName && x.CourseName == courseName && x.CategoryName == categoryName).Count() > 1)
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课程";
|
||||
// errorInfo.Reason = $"【{roleName}】导入数据重复:{courseName}({categoryName})";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// if (!lstCourse.Where(x => x.Name == courseName && x.CategoryName == categoryName).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课程";
|
||||
// errorInfo.Reason = $"【{roleName}】不存在培训课程:{courseName}({categoryName})";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// else if (lstRecord.Where(x => x.CourseName == courseName && x.CategoryName == categoryName).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课程";
|
||||
// errorInfo.Reason = $"培训标准已存在:{courseName}({categoryName})";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrEmpty(classHourStr))
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// classHour = decimal.Parse(classHourStr);
|
||||
// if (classHour <= 0)
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课时";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课时";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训课时";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrEmpty(cycleStr))
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// cycle = decimal.Parse(cycleStr);
|
||||
// if (cycle <= 0)
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训周期";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训周期";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训周期";
|
||||
// errorInfo.Reason = "请填写大于0的数值";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(method))
|
||||
// {
|
||||
// if (!lstMethod.Where(x => x.Name == method).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训方式";
|
||||
// errorInfo.Reason = $"培训方式字典不存在:{method}";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(outcome))
|
||||
// {
|
||||
// if (!lstOutcome.Where(x => x.Text == outcome).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训效果";
|
||||
// errorInfo.Reason = $"培训效果字典不存在:{outcome}";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(teachers))
|
||||
// {
|
||||
// if (!lstTeachers.Where(x => x.Name == teachers).Any())
|
||||
// {
|
||||
// ErrorInfo errorInfo = new ErrorInfo();
|
||||
// errorInfo.Row = rowIndex.ToString();
|
||||
// errorInfo.Column = "培训师资";
|
||||
// errorInfo.Reason = $"培训师资字典不存在:{teachers}";
|
||||
// errorList.Add(errorInfo);
|
||||
// }
|
||||
// }
|
||||
|
||||
// rowIndex++;
|
||||
// }
|
||||
|
||||
// if (errorList.Any())
|
||||
// {
|
||||
// responeData.code = 0;
|
||||
// responeData.message = "存在异常数据!";
|
||||
// return responeData;
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// foreach (var item in temeplateDtoIns)
|
||||
// {
|
||||
// string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
// string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
// string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
// decimal classHour = decimal.Parse(item.ClassHour);
|
||||
// decimal cycle = decimal.Parse(item.Cycle);
|
||||
// string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
// string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
// string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
// string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
// PostTraining_Record newModel = new PostTraining_Record
|
||||
// {
|
||||
// Id = SQLHelper.GetNewID(typeof(PostTraining_Record)),
|
||||
// Code = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Record", "Code", ""),
|
||||
// //ProjectId = this.ProjectId,
|
||||
// CompileDate = DateTime.Now,
|
||||
// CompileMan = creatUserId
|
||||
// };
|
||||
// newModel.CourseId = lstCourse.Where(x => x.Name == courseName).FirstOrDefault().Id;
|
||||
// newModel.RoleId = lstRole.Where(x => x.Name == roleName).FirstOrDefault().Id;
|
||||
// newModel.ClassHour = classHour;
|
||||
// newModel.Cycle = cycle;
|
||||
// newModel.Method = method;
|
||||
// newModel.Outcome = outcome;
|
||||
// newModel.Teachers = teachers;
|
||||
// newModel.Remark = remark;
|
||||
|
||||
// AddRecord(newModel);
|
||||
// }
|
||||
// return responeData;
|
||||
//}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训角色
|
||||
/// </summary>
|
||||
public static class PostTrainingRoleService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训角色信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Role GetRoleById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训角色
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddRole(Model.PostTraining_Role model)
|
||||
{
|
||||
Model.PostTraining_Role newModel = new Model.PostTraining_Role
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Role.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateRole(Model.PostTraining_Role model)
|
||||
{
|
||||
Model.PostTraining_Role newModel = Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteRoleById(string Id)
|
||||
{
|
||||
Model.PostTraining_Role model = Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Role.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训角色List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Role> GetRoleList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Role orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取岗位培训角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingRoleDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingRoleList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取岗位培训角色下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Role> GetPostTrainingRoleList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Role orderby x.Code select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,439 @@
|
|||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public static class PostTrainingStandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训标准信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Standard GetStandardById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训标准
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddStandard(Model.PostTraining_Standard model)
|
||||
{
|
||||
Model.PostTraining_Standard newModel = new Model.PostTraining_Standard
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
RoleId = model.RoleId,
|
||||
CourseId = model.CourseId,
|
||||
ClassHour = model.ClassHour,
|
||||
Cycle = model.Cycle,
|
||||
Method = model.Method,
|
||||
Outcome = model.Outcome,
|
||||
Teachers = model.Teachers,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Standard.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateStandard(Model.PostTraining_Standard model)
|
||||
{
|
||||
Model.PostTraining_Standard newModel = Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.RoleId = model.RoleId;
|
||||
newModel.CourseId = model.CourseId;
|
||||
newModel.ClassHour = model.ClassHour;
|
||||
newModel.Cycle = model.Cycle;
|
||||
newModel.Method = model.Method;
|
||||
newModel.Outcome = model.Outcome;
|
||||
newModel.Teachers = model.Teachers;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteStandardById(string Id)
|
||||
{
|
||||
Model.PostTraining_Standard model = Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Standard.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训标准List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Standard> GetStandardList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Standard orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训标准信息List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTrainingStandardInfo> GetStandardInfoList()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var lst = (from x in db.PostTraining_Standard
|
||||
join y in db.PostTraining_Course on x.CourseId equals y.Id
|
||||
join z in db.PostTraining_Role on x.RoleId equals z.Id
|
||||
orderby x.Code
|
||||
select new PostTrainingStandardInfo
|
||||
{
|
||||
RoleId = x.RoleId,
|
||||
RoleName = z.Name,
|
||||
CourseId = x.CourseId,
|
||||
CourseName = y.Name,
|
||||
CategoryName = y.CategoryName,
|
||||
ClassHour = x.ClassHour,
|
||||
Cycle = x.Cycle,
|
||||
Method = x.Method,
|
||||
Outcome = x.Outcome,
|
||||
Teachers = x.Teachers,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
return lst;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入数据
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="creatUserId"></param>
|
||||
/// <param name="errorList"></param>
|
||||
/// <returns></returns>
|
||||
public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId, ref List<Model.ErrorInfo> errorList)
|
||||
{
|
||||
var responeData = new ResponeData();
|
||||
List<PostTrainingStandard_InputDataIn> temeplateDtoIns;
|
||||
try
|
||||
{
|
||||
temeplateDtoIns = MiniExcel.Query<PostTrainingStandard_InputDataIn>(path, startCell: "A1").ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "模板错误:" + ex.ToString();
|
||||
return responeData;
|
||||
}
|
||||
|
||||
if (temeplateDtoIns.Count == 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入数据为空!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
//培训标准
|
||||
var lstStandard = GetStandardInfoList();
|
||||
//培训课程
|
||||
var lstCourse = PostTrainingCourseService.GetCourseList();
|
||||
//培训角色
|
||||
var lstRole = PostTrainingRoleService.GetRoleList();
|
||||
//培训类别
|
||||
var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
//培训方式
|
||||
var lstMethod = PostTrainingMethodService.GetMethodList();
|
||||
//培训教资
|
||||
var lstTeachers = PostTrainingTeachersService.GetTeachersList();
|
||||
//培训效果
|
||||
var lstOutcome = GetPostTrainingOutcomeList();
|
||||
|
||||
#region 数据校验
|
||||
|
||||
string errorMsg = string.Empty;
|
||||
int rowIndex = 3;
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
string classHourStr = !string.IsNullOrWhiteSpace(item.ClassHour) ? item.ClassHour.Trim() : string.Empty;
|
||||
string cycleStr = !string.IsNullOrWhiteSpace(item.Cycle) ? item.Cycle.Trim() : string.Empty;
|
||||
decimal classHour = 0;
|
||||
decimal cycle = 0;
|
||||
string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(roleName))
|
||||
{
|
||||
if (!lstRole.Where(x => x.Name == roleName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "适用岗位角色";
|
||||
errorInfo.Reason = $"角色不存在:{roleName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "适用岗位角色";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName))
|
||||
{
|
||||
if (!lstCategory.Where(x => x.Name == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = $"培训类别不存在:{categoryName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(courseName))
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName) && !string.IsNullOrWhiteSpace(courseName))
|
||||
{
|
||||
if (temeplateDtoIns.Where(x => x.RoleName == roleName && x.CourseName == courseName && x.CategoryName == categoryName).Count() > 1)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"【{roleName}】导入数据重复:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
if (!lstCourse.Where(x => x.Name == courseName && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"【{roleName}】不存在培训课程:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
else if (lstStandard.Where(x => x.CourseName == courseName && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"培训标准已存在:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(classHourStr))
|
||||
{
|
||||
try
|
||||
{
|
||||
classHour = decimal.Parse(classHourStr);
|
||||
if (classHour <= 0)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(cycleStr))
|
||||
{
|
||||
try
|
||||
{
|
||||
cycle = decimal.Parse(cycleStr);
|
||||
if (cycle <= 0)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(method))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(outcome))
|
||||
{
|
||||
if (!lstOutcome.Where(x => x.Text == outcome).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训效果";
|
||||
errorInfo.Reason = $"培训效果字典不存在:{outcome}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
if (errorList.Any())
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "存在异常数据!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
decimal classHour = decimal.Parse(item.ClassHour);
|
||||
decimal cycle = decimal.Parse(item.Cycle);
|
||||
string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
Model.PostTraining_Standard newModel = new Model.PostTraining_Standard
|
||||
{
|
||||
Id = SQLHelper.GetNewID(typeof(Model.PostTraining_Standard)),
|
||||
Code = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Standard", "Code", ""),
|
||||
//ProjectId = this.ProjectId,
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = creatUserId
|
||||
};
|
||||
newModel.CourseId = lstCourse.Where(x => x.Name == courseName).FirstOrDefault().Id;
|
||||
newModel.RoleId = lstRole.Where(x => x.Name == roleName).FirstOrDefault().Id;
|
||||
newModel.ClassHour = classHour;
|
||||
newModel.Cycle = cycle;
|
||||
newModel.Method = method;
|
||||
newModel.Outcome = outcome;
|
||||
newModel.Teachers = teachers;
|
||||
newModel.Remark = remark;
|
||||
|
||||
AddStandard(newModel);
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingOutcomeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Text";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetPostTrainingOutcomeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetPostTrainingOutcomeList()
|
||||
{
|
||||
ListItem[] lis = null;
|
||||
lis = new ListItem[3];
|
||||
lis[0] = new ListItem("掌握", "0");
|
||||
lis[1] = new ListItem("熟悉", "1");
|
||||
lis[2] = new ListItem("了解", "2");
|
||||
return lis;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训师资
|
||||
/// </summary>
|
||||
public static class PostTrainingTeachersService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训师资信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Teachers GetTeachersById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训师资信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Teachers GetTeachersByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训师资
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddTeachers(Model.PostTraining_Teachers model)
|
||||
{
|
||||
Model.PostTraining_Teachers newModel = new Model.PostTraining_Teachers
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Teachers.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateTeachers(Model.PostTraining_Teachers model)
|
||||
{
|
||||
Model.PostTraining_Teachers newModel = Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteTeachersById(string Id)
|
||||
{
|
||||
Model.PostTraining_Teachers model = Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Teachers.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训师资List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Teachers> GetTeachersList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Teachers orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训师资下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingTeachersDropDownList(FineUIPro.DropDownList dropName, string excludeName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Name";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingTeachersList(excludeName);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训师资下拉项
|
||||
/// </summary>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Teachers> GetPostTrainingTeachersList(string excludeName)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Teachers orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(excludeName))
|
||||
{
|
||||
lst = lst.Where(x => x.Name != excludeName).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -111,6 +111,16 @@ namespace BLL
|
|||
return Funs.DB.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.View_SitePerson_PersonList GetPersonInfoById(string personId)
|
||||
{
|
||||
return Funs.DB.View_SitePerson_PersonList.FirstOrDefault(e => e.PersonId == personId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
/// </summary>
|
||||
|
@ -334,6 +344,7 @@ namespace BLL
|
|||
TeamGroupId = person.TeamGroupId,
|
||||
WorkAreaId = person.WorkAreaId,
|
||||
WorkPostId = person.WorkPostId,
|
||||
PostTrainingRoleId = person.PostTrainingRoleId,
|
||||
OutTime = person.OutTime,
|
||||
OutResult = person.OutResult,
|
||||
Telephone = person.Telephone,
|
||||
|
@ -413,6 +424,7 @@ namespace BLL
|
|||
newPerson.TeamGroupId = person.TeamGroupId;
|
||||
newPerson.WorkAreaId = person.WorkAreaId;
|
||||
newPerson.WorkPostId = person.WorkPostId;
|
||||
newPerson.PostTrainingRoleId = person.PostTrainingRoleId;
|
||||
newPerson.InTime = person.InTime;
|
||||
newPerson.OutTime = person.OutTime;
|
||||
newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue