diff --git a/DataBase/版本日志/SUBQHSE_V2026-02-02-lpf.sql b/DataBase/版本日志/SUBQHSE_V2026-02-02-lpf.sql new file mode 100644 index 00000000..12135b66 --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-02-02-lpf.sql @@ -0,0 +1,142 @@ +-- auto-generated definition +create table dbo.Supervise_UnitHazardRegister +( + UnitHazardRegisterId nvarchar(50) not null + primary key, + UnitHazardRegisterCode nvarchar(50) not null, + CheckDate datetime, + CheckMainType nvarchar(2), + CheckType nvarchar(50), + ProjectId nvarchar(50) + constraint FK_UnitHazardRegister_Project + references dbo.Base_Project, + UnitId nvarchar(50) + constraint FK_UnitHazardRegister_Unit + references dbo.Base_Unit, + CheckObjectId nvarchar(200), + CheckUnitId nvarchar(50) + constraint FK_UnitHazardRegister_CheckUnit + references dbo.Base_Unit, + CheckTeam nvarchar(200), + CheckManIds nvarchar(max), + CheckManNames nvarchar(max), + EvaluationResult nvarchar(max), + AttachUrl nvarchar(2000), + States int default 0, + CompileMan nvarchar(50), + CreateDate datetime, + UpdateDate datetime, + IsUpdate bit +) +go + +create index IX_UnitHazardRegister_CheckDate + on dbo.Supervise_UnitHazardRegister (CheckDate desc) +go + +create index IX_UnitHazardRegister_CheckMainType + on dbo.Supervise_UnitHazardRegister (CheckMainType) +go + +create index IX_UnitHazardRegister_ProjectId + on dbo.Supervise_UnitHazardRegister (ProjectId) +go + +-- auto-generated definition +create table dbo.Supervise_UnitHazardRegisterItem +( + UnitHazardRegisterItemId nvarchar(50) not null + primary key, + UnitHazardRegisterId nvarchar(50) not null + constraint FK_UnitHazardRegisterItem_Register + references dbo.Supervise_UnitHazardRegister + on delete cascade, + ProblemDescription nvarchar(max), + ProblemType nvarchar(50), + RiskLevel nvarchar(50), + RectifyRequirement nvarchar(max), + CompleteStatus int default 0, + CompletedDate datetime, + SortIndex int default 0, + RectificationMeasures nvarchar(100), + IsUpdate bit +) +go + +create index IX_UnitHazardRegisterItem_RegisterId + on dbo.Supervise_UnitHazardRegisterItem (UnitHazardRegisterId) +go + +/*************** + +delete Sys_Menu where MenuId='C46C007E-A100-4A52-9317-3B885442E130' +delete Sys_Menu where MenuId='73283863-CF67-44CA-9DF8-67071734A528' +delete Sys_Menu where MenuId='73283863-CF67-44CA-9DF8-67071734A529' +delete Sys_Menu where MenuId='FDA7722C-383E-4BB1-B29D-BB0BF87AA942' +delete Sys_Menu where MenuId='15511354-9822-4A21-AB24-2483D889FDB8' +delete Sys_Menu where MenuId='15511354-9822-4A21-AB24-2483D889FDB9' + +delete Sys_ButtonToMenu where MenuId='C46C007E-A100-4A52-9317-3B885442E130' +delete Sys_ButtonToMenu where MenuId='FDA7722C-383E-4BB1-B29D-BB0BF87AA942' + + ********/ + + + --֮ǰҵ + update Sys_Menu set IsUsed=0 where MenuId='CD9FC4C8-4B02-4619-8B02-50DA6AE6146E' or SuperMenu='CD9FC4C8-4B02-4619-8B02-50DA6AE6146E' +GO + + + + --ҵ + IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '8CA4A1EC-3218-4E6B-9CA2-125C814A8141') +BEGIN +INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'ҵ', N'', 40, N'0', N'Menu_ZHGL', 1,0, 1); +END +GO + +--˾ +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'C46C007E-A100-4A52-9317-3B885442E130', N'ҵȫ', null, N'ZHGL/Supervise/UnitHazardRegister.aspx?type=0', 10, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1); +go +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'73283863-CF67-44CA-9DF8-67071734A528', N'ҵȫ¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=0', 20, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1); +go +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'ҵ', null, N'ZHGL/Supervise/UnitHazardRegister.aspx?type=1', 30, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1); +go + +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'15511354-9822-4A21-AB24-2483D889FDB8', N'ҵ¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=1', 40, N'8CA4A1EC-3218-4E6B-9CA2-125C814A8141', N'Menu_ZHGL', 1, 1, 1); +go + + +--Ŀ + +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'73283863-CF67-44CA-9DF8-67071734A529', N'ҵȫ¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=0', 05, N'467A0CB9-737D-4451-965E-869EBC3A4BD6', N'Menu_HSSE', 1, 1, 1); + +go +INSERT INTO dbo.Sys_Menu (MenuId, MenuName, Icon, Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'15511354-9822-4A21-AB24-2483D889FDB9', N'ҵ¼', null, N'ZHGL/Supervise/UnitHazardRegisterRecord.aspx?type=1', 05, N'A54EC449-5F77-4068-83B9-AA305B721A0B', N'Menu_CQMS', 1, 1, 1); +go + + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'D15F74F2-CD1A-4F45-9501-DF00ED845730', N'C46C007E-A100-4A52-9317-3B885442E130', N'޸', 2); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'A2CCDFF7-9593-4BCB-9425-769C99F8EFEE', N'C46C007E-A100-4A52-9317-3B885442E130', N'ɾ', 3); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'435F26E9-232F-4CAA-835F-CAF41DA2B175', N'C46C007E-A100-4A52-9317-3B885442E130', N'', 4); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'B822D703-CFE3-422A-88F3-67B26B0A255A', N'C46C007E-A100-4A52-9317-3B885442E130', N'', 1); + +go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'B980C835-B079-4485-AE0E-EE721C191470', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'޸', 2); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'9BABA2CE-2593-422A-A792-80E826D164AB', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'ɾ', 3); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'5C9AF2B1-4AF0-4F16-BC5D-154055A6BF8F', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'', 4); + go + INSERT INTO dbo.Sys_ButtonToMenu (ButtonToMenuId, MenuId, ButtonName, SortIndex) VALUES (N'E3CD6629-9B4B-4B26-A24B-97F9F3E4428F', N'FDA7722C-383E-4BB1-B29D-BB0BF87AA942', N'', 1); +go + diff --git a/DataBase/版本日志/SUBQHSE_V2026-02-09-lpf.sql b/DataBase/版本日志/SUBQHSE_V2026-02-09-lpf.sql new file mode 100644 index 00000000..4ce60bbe --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-02-09-lpf.sql @@ -0,0 +1,17 @@ +alter table dbo.Supervise_UnitHazardRegister + add InsResponsibleUserId nvarchar(50) +go + +exec sp_addextendedproperty 'MS_Description', N'受检责任人', 'SCHEMA', 'dbo', 'TABLE', 'Supervise_UnitHazardRegister', + 'COLUMN', 'InsResponsibleUserId' +go +alter table dbo.Supervise_UnitHazardRegister + drop constraint FK_UnitHazardRegister_Unit +go +alter table dbo.Supervise_UnitHazardRegister + drop column UnitId +go + +alter table dbo.Supervise_UnitHazardRegister + drop column CheckObjectId +go diff --git a/DataBase/版本日志/SUBQHSE_V2026-02-13-xiaj.sql b/DataBase/版本日志/SUBQHSE_V2026-02-13-xiaj.sql index 0fca5210..d37360a5 100644 --- a/DataBase/版本日志/SUBQHSE_V2026-02-13-xiaj.sql +++ b/DataBase/版本日志/SUBQHSE_V2026-02-13-xiaj.sql @@ -34,3 +34,96 @@ GO update [dbo].[Sys_Menu] set MenuName = 'ȫ' WHERE MenuName = 'ȫճѲ' and IsUsed = '1' + + +--˵ȫ-ʱõ緽 +--ע⣺˵λøݶƵλṹá廷ʩ(Menu_HSSE)桿 + IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '09B2A0A6-A693-4F1D-A4F5-D5DEA803D771') +BEGIN +INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'09B2A0A6-A693-4F1D-A4F5-D5DEA803D771', N'ʱõ緽', N'HSSE/Solution/TemporaryElectricity.aspx', 40, '5FF7BBD8-3E0A-4C90-8976-AFF5CE7E17A5', 'Menu_HSSE', 0,1, 1); +END + +--ȫ-ʱõ緽 +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Solution_TemporaryElectricity') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[Solution_TemporaryElectricity]( + [TemporaryElectricityId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Code] [nvarchar](100) NULL, + [Name] [nvarchar](200) NULL, + [Content] [nvarchar](2000) NULL, + [Remark] [nvarchar](500) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_Solution_TemporaryElectricity] PRIMARY KEY CLUSTERED +( + [TemporaryElectricityId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TemporaryElectricity', @level2type=N'COLUMN',@level2name=N'TemporaryElectricityId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity' + +END + +GO + +update Sys_Menu set MenuName='ʱõ緽' +WHERE MenuId = '09B2A0A6-A693-4F1D-A4F5-D5DEA803D771' +update Sys_Menu set MenuName='ʱõ緽' +WHERE MenuId = 'B04483D5-4421-4046-8B1A-E97589952150' + +GO + +--ʱõ緽ֶ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Solution_TemporaryElectricity' AND COLUMN_NAME = 'Remark') +BEGIN + ALTER TABLE Solution_TemporaryElectricity ADD Content nvarchar(2000); + ALTER TABLE Solution_TemporaryElectricity ADD Remark nvarchar(500); + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TemporaryElectricity', @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'Solution_TemporaryElectricity', @level2type=N'COLUMN',@level2name=N'Remark' +END +GO + +--ȫ-ʱõť +IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '09B2A0A6-A693-4F1D-A4F5-D5DEA803D771') +BEGIN +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'A633C879-BE46-4D2B-BAC3-9A656396AD53', N'09B2A0A6-A693-4F1D-A4F5-D5DEA803D771', N'', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'3C001F6B-428B-4BDC-8913-FD00CAC63C64', N'09B2A0A6-A693-4F1D-A4F5-D5DEA803D771', N'޸', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'E510ABD6-50B2-4685-8DB8-E362B88E8F9E', N'09B2A0A6-A693-4F1D-A4F5-D5DEA803D771', N'ɾ', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'9552542D-879F-49A7-BB33-7F1B54D9658F', N'09B2A0A6-A693-4F1D-A4F5-D5DEA803D771', N'', 4); +END +GO + + + + +----˵ñű䴦 +--IF NOT EXISTS (SELECT * FROM Sys_Const WHERE ID = '28BF7713-44E7-43C1-B24A-7342CDD561A7') +--BEGIN +-- INSERT INTO dbo.Sys_Const (ID, ConstValue, ConstText, SortIndex, GroupId, Remark) +-- VALUES (N'28BF7713-44E7-43C1-B24A-7342CDD561A7', N'System_Qwms', N'뺸ӹϵͳ', 2, N'SystemClassification', null); +--END + +--GO + +--IF NOT EXISTS (SELECT * FROM Sys_Const WHERE ID = '5823ADE9-302E-4402-BA6E-80F440BF184E') +--BEGIN +-- INSERT INTO dbo.Sys_Const (ID, ConstValue, ConstText, SortIndex, GroupId, Remark) +-- VALUES (N'5823ADE9-302E-4402-BA6E-80F440BF184E', N'System_Hsse', N'ȫְҵϵͳ', 1, N'SystemClassification', null); +--END +--GO + + diff --git a/DataBase/版本日志/SUBQHSE_V2026-02-26-gf.sql b/DataBase/版本日志/SUBQHSE_V2026-02-26-gf.sql new file mode 100644 index 00000000..33e107f0 --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-02-26-gf.sql @@ -0,0 +1,4 @@ +alter table SitePerson_Person add IsSyncWelder bit null +GO +alter table BS_Welder add PersonId nvarchar(50) null +GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 22d94ed2..f1ac53d2 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -599,6 +599,7 @@ + @@ -929,6 +930,8 @@ + + diff --git a/SGGL/BLL/BLL.csproj.user b/SGGL/BLL/BLL.csproj.user index 0b246432..a607660d 100644 --- a/SGGL/BLL/BLL.csproj.user +++ b/SGGL/BLL/BLL.csproj.user @@ -1,6 +1,6 @@ - ProjectFiles + ShowAllFiles \ No newline at end of file diff --git a/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs b/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs index 2fd0e9f0..cc84c575 100644 --- a/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs +++ b/SGGL/BLL/BaseInfo/SuperviseCheckTypeService.cs @@ -103,5 +103,26 @@ namespace BLL Funs.FineUIPleaseSelect(dropName); } } + + + + /// + /// 根据检查大类和检查类别代码获取检查类别名称 + /// + /// 检查大类(0=安全,1=质量) + /// 检查类别代码 + /// 检查类别名称 + public static string GetCheckTypeName(string checkMainType, string checkTypeCode) + { + if (string.IsNullOrEmpty(checkMainType) || string.IsNullOrEmpty(checkTypeCode)) + { + return string.Empty; + } + + var checkType = Funs.DB.Base_SuperviseCheckType + .FirstOrDefault(x => x.CheckMainType == checkMainType && x.CheckTypeCode == checkTypeCode); + + return checkType?.CheckTypeName ?? string.Empty; + } } } \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index bb3beb27..8ced9896 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -1534,6 +1534,26 @@ namespace BLL /// 安全监督检查整改 /// public const string SuperviseCheckRectifyMenuId = "A02E0365-383C-49A0-BF1A-B3E42052959B"; + + + /// + /// 企业安全检查菜单ID + /// + public const string UnitHazardRegisterMenu_Safety = "C46C007E-A100-4A52-9317-3B885442E130"; + /// + /// 企业质量检查菜单ID + /// + public const string UnitHazardRegisterMenu_Quality = "FDA7722C-383E-4BB1-B29D-BB0BF87AA942"; + /// + /// 企业安全检查菜单记录ID + /// + public const string UnitHazardRegisterMenuRecord_Safety = "73283863-CF67-44CA-9DF8-67071734A528"; + + /// + /// 企业质量检查菜单记录ID + /// + public const string UnitHazardRegisterMenuRecord_Quality = "15511354-9822-4A21-AB24-2483D889FDB8"; + #endregion #region 集团安全监督 @@ -1971,6 +1991,10 @@ namespace BLL /// 危险性较大的工程清单 /// public const string ProjectLargerHazardListMenuId = "5B3D3F7B-9B50-4927-B131-11D13D4D1C19"; + /// + /// 临时用电 + /// + public const string ProjectTemporaryElectricityListMenuId = "09B2A0A6-A693-4F1D-A4F5-D5DEA803D771"; /// /// 专家论证清单 diff --git a/SGGL/BLL/Common/UploadAttachmentService.cs b/SGGL/BLL/Common/UploadAttachmentService.cs index eac45aac..7c485b52 100644 --- a/SGGL/BLL/Common/UploadAttachmentService.cs +++ b/SGGL/BLL/Common/UploadAttachmentService.cs @@ -201,6 +201,21 @@ namespace BLL return htmlStr; } + + public static string ConvertImageUrlByImage(object ToeyId) + { + string url = string.Empty; + if (ToeyId != null) + { + var imhurl = BLL.AttachFileService.getFileUrl(ToeyId.ToString()); + if (imhurl != null) + { + url = ShowImage(Funs.SGGLUrl, imhurl); + } + } + return url; + } + /// /// 工作台项目图片 /// diff --git a/SGGL/BLL/HSSE/Solution/TemporaryElectricityService.cs b/SGGL/BLL/HSSE/Solution/TemporaryElectricityService.cs new file mode 100644 index 00000000..f98a5fbc --- /dev/null +++ b/SGGL/BLL/HSSE/Solution/TemporaryElectricityService.cs @@ -0,0 +1,72 @@ +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace BLL +{ + public class TemporaryElectricityService + { + /// + /// 获取临时用电方案信息 + /// + /// + /// + public static Model.Solution_TemporaryElectricity GetTemporaryElectricityByTemporaryElectricityId(string TemporaryElectricityId) + { + return Funs.DB.Solution_TemporaryElectricity.FirstOrDefault(e => e.TemporaryElectricityId == TemporaryElectricityId); + } + /// + /// 添加临时用电方案信息 + /// + /// + public static void AddTemporaryElectricity(Model.Solution_TemporaryElectricity TemporaryElectricity) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TemporaryElectricity newTemporaryElectricity = new Model.Solution_TemporaryElectricity(); + newTemporaryElectricity.TemporaryElectricityId = TemporaryElectricity.TemporaryElectricityId; + newTemporaryElectricity.ProjectId = TemporaryElectricity.ProjectId; + newTemporaryElectricity.Code = TemporaryElectricity.Code; + newTemporaryElectricity.Name = TemporaryElectricity.Name; + newTemporaryElectricity.Content = TemporaryElectricity.Content; + newTemporaryElectricity.Remark = TemporaryElectricity.Remark; + newTemporaryElectricity.CompileMan = TemporaryElectricity.CompileMan; + newTemporaryElectricity.CompileDate = TemporaryElectricity.CompileDate; + db.Solution_TemporaryElectricity.InsertOnSubmit(newTemporaryElectricity); + db.SubmitChanges(); + } + + /// + /// 修改临时用电方案信息 + /// + /// + public static void UpdateTemporaryElectricity(Model.Solution_TemporaryElectricity TemporaryElectricity) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TemporaryElectricity newTemporaryElectricity = db.Solution_TemporaryElectricity.FirstOrDefault(e => e.TemporaryElectricityId == TemporaryElectricity.TemporaryElectricityId); + if (newTemporaryElectricity != null) + { + newTemporaryElectricity.Code = TemporaryElectricity.Code; + newTemporaryElectricity.Name = TemporaryElectricity.Name; + newTemporaryElectricity.Content = TemporaryElectricity.Content; + newTemporaryElectricity.Remark = TemporaryElectricity.Remark; + newTemporaryElectricity.CompileMan = TemporaryElectricity.CompileMan; + newTemporaryElectricity.CompileDate = TemporaryElectricity.CompileDate; + db.SubmitChanges(); + } + } + /// + /// 根据主键删除临时用电方案信息 + /// + /// + public static void DeleteTemporaryElectricityById(string TemporaryElectricityId) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TemporaryElectricity TemporaryElectricity = db.Solution_TemporaryElectricity.FirstOrDefault(e => e.TemporaryElectricityId == TemporaryElectricityId); + if (TemporaryElectricity != null) + { + db.Solution_TemporaryElectricity.DeleteOnSubmit(TemporaryElectricity); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 0a195574..c7438930 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -429,6 +429,32 @@ } #region 项目表下拉框 + + /// + /// 项目表下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitProjectDropDownList(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease) + { + var IsThisUnit = CommonService.GetThisUnitId() == unitId ? true : false; + dropName.DataValueField = "ProjectId"; + dropName.DataTextField = "ProjectName"; + if (IsThisUnit) + { + dropName.DataSource = BLL.ProjectService.GetProjectWorkList(); + } + else + { + dropName.DataSource = BLL.ProjectService.GetProjectWorkList(unitId); + } + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// /// 项目表下拉框 /// diff --git a/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs b/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs new file mode 100644 index 00000000..2e206567 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs @@ -0,0 +1,338 @@ +using System; +using Model; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 企业级检查明细服务 + /// + public static class UnitHazardRegisterItemService + { + #region Methods + + /// + /// 添加明细记录 + /// + /// 明细记录 + public static void AddUnitHazardRegisterItem(Model.Supervise_UnitHazardRegisterItem item) + { + Funs.DB.Supervise_UnitHazardRegisterItem.InsertOnSubmit(item); + Funs.DB.SubmitChanges(); + } + + /// + /// 根据主表ID删除所有明细 + /// + /// 主表ID + public static void DeleteItemsByRegisterId(string registerId) + { + var items = (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId + select x).ToList(); + if (items.Count > 0) + { + Funs.DB.Supervise_UnitHazardRegisterItem.DeleteAllOnSubmit(items); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 删除明细记录 + /// + /// 明细ID + public static void DeleteUnitHazardRegisterItemById(string itemId) + { + Model.Supervise_UnitHazardRegisterItem item = + Funs.DB.Supervise_UnitHazardRegisterItem.FirstOrDefault(e => e.UnitHazardRegisterItemId == itemId); + if (item != null) + { + Funs.DB.Supervise_UnitHazardRegisterItem.DeleteOnSubmit(item); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据风险级别获取明细数量 + /// + /// 主表ID + /// 风险级别 + /// 明细数量 + public static int GetCountByRiskLevel(string registerId, string riskLevel) + { + return (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId && x.RiskLevel == riskLevel + select x).Count(); + } + + /// + /// 获取已完成的明细数量 + /// + /// 主表ID + /// 已完成数量 + public static int GetFinishedCount(string registerId) + { + return (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId && x.CompleteStatus == 1 + select x).Count(); + } + + /// + /// 根据主表ID获取明细列表 + /// + /// 主表ID + /// 明细列表 + public static List GetItemsByRegisterId(string registerId) + { + return (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId + orderby x.SortIndex + select x).ToList(); + } + + /// + /// 获取主单的整改状态 + /// + /// 主单ID + /// 整改状态:0=全部未整改,1=部分整改,2=全部整改 + public static int GetRectifyStatus(string registerId) + { + var items = GetItemsByRegisterId(registerId); + + if (items.Count == 0) + { + return 0; // 无明细,视为全部未整改 + } + + int finishedCount = items.Count(x => x.CompleteStatus == 1); + int totalCount = items.Count; + + if (finishedCount == 0) + { + return 0; // 全部未整改 + } + else if (finishedCount < totalCount) + { + return 1; // 部分整改 + } + else + { + return 2; // 全部整改 + } + } + + /// + /// 获取整改状态文本 + /// + /// 主单ID + /// 状态文本 + public static string GetRectifyStatusText(string registerId) + { + int status = GetRectifyStatus(registerId); + switch (status) + { + case 0: + return "全部未整改"; + + case 1: + return "部分整改"; + + case 2: + return "全部整改"; + + default: + return "未知"; + } + } + + /// + /// 获取未完成的明细数量 + /// + /// 主表ID + /// 未完成数量 + public static int GetUnfinishedCount(string registerId) + { + return (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId && (x.CompleteStatus == null || x.CompleteStatus == 0) + select x).Count(); + } + + /// + /// 根据明细ID获取明细记录 + /// + /// 明细ID + /// 明细记录 + public static Model.Supervise_UnitHazardRegisterItem GetUnitHazardRegisterItemById(string itemId) + { + return Funs.DB.Supervise_UnitHazardRegisterItem.FirstOrDefault(e => e.UnitHazardRegisterItemId == itemId); + } + + + /// + /// 获取企业级检查明细列表(使用input对象,返回总数) + /// + /// 查询条件 + /// 页码(从0开始) + /// 每页大小 + /// 是否返回所有数据(不分页) + /// 总记录数 + /// 检查明细列表 + public static List GetUnitHazardRegisterItems( + UnitHazardRegisterItemInput input, + int pageIndex, + int pageSize, + bool returnAll, + out int totalCount) + { + var db = Funs.DB; + var query = from i in db.Supervise_UnitHazardRegisterItem + join r in db.Supervise_UnitHazardRegister + on i.UnitHazardRegisterId equals r.UnitHazardRegisterId + join ct in db.Base_SuperviseCheckType + on new { MainType = r.CheckMainType, TypeCode = r.CheckType } + equals new { MainType = ct.CheckMainType, TypeCode = ct.CheckTypeCode } into ctGroup + from ct in ctGroup.DefaultIfEmpty() + join u in db.Base_Unit + on r.CheckUnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join user in db.Sys_User on r.InsResponsibleUserId equals user.UserId into userGroup + from user in userGroup.DefaultIfEmpty() + select new UnitHazardRegisterItemOutput + { + UnitHazardRegisterItemId = i.UnitHazardRegisterItemId, + UnitHazardRegisterCode = r.UnitHazardRegisterCode, + CheckDate = r.CheckDate, + CheckMainTypeName = r.CheckMainType == "0" ? "安全" : "质量", + CheckTypeName = ct.CheckTypeName, + ProblemDescription = i.ProblemDescription, + ProblemType = i.ProblemType, + RiskLevel = i.RiskLevel, + RectifyRequirement = i.RectifyRequirement, + StatesName = UnitHazardRegisterService.ConvertState(r.States.Value), + CheckTeam = r.CheckTeam, + ProjectId = r.ProjectId, + CheckUnitName = u.UnitName, + States = r.States, + ProblemStatesName = i.CompleteStatus==1 ? "已整改":"未整改", + ProblemStates = i.CompleteStatus, + InsResponsibleUserId = r.InsResponsibleUserId, + InsResponsibleUserName= user.UserName + }; + + // 应用检查大类过滤 + if (input != null && !string.IsNullOrEmpty(input.CheckMainType)) + { + query = query.Where(x => x.CheckMainTypeName.Contains(input.CheckMainType == "0" ? "安全" : "质量")); + } + // 项目id过滤 + if (input != null && !string.IsNullOrEmpty(input.ProjectId)) + { + query = query.Where(x => x.ProjectId.Contains(input.ProjectId)); + } + // 检查组/人搜索 + if (input != null && !string.IsNullOrEmpty(input.CheckTeam)) + { + query = query.Where(x => x.CheckTeam.Contains(input.CheckTeam)); + } + + // 检查类别搜索 + if (input != null && !string.IsNullOrEmpty(input.CheckType)) + { + query = query.Where(x => x.CheckTypeName != null && x.CheckTypeName.Contains(input.CheckType)); + } + + // 问题描述搜索 + if (input != null && !string.IsNullOrEmpty(input.Problem)) + { + query = query.Where(x => x.ProblemDescription.Contains(input.Problem)); + } + + // 检查时间范围 + if (input != null && input.StartTime.HasValue) + { + query = query.Where(x => x.CheckDate >= input.StartTime.Value); + } + + if (input != null && input.EndTime.HasValue) + { + query = query.Where(x => x.CheckDate <= input.EndTime.Value); + } + + // 风险级别过滤 + if (input != null && !string.IsNullOrEmpty(input.RiskLevel) && input.RiskLevel != "null") + { + query = query.Where(x => x.RiskLevel == input.RiskLevel); + } + + // 状态过滤 + if (input != null && input.States != null) + { + query = query.Where(x => x.States == input.States); + } + // 问题整改状态过滤 + if (input != null && input.ProblemStates != null) + { + query = query.Where(x => x.ProblemStates == input.ProblemStates); + } + // 单位权限过滤 + if (input != null && !string.IsNullOrEmpty(input.UnitId)) + { + var thisUnit = BLL.CommonService.GetIsThisUnit(); + if (thisUnit.UnitId != input.UnitId) + { + // 先获取用户有权限的项目ID列表 + var projectIds = (from p in Funs.DB.Base_Project + where p.UnitId == input.UnitId + select p.ProjectId).ToList(); + + // 过滤查询结果 + query = query.Where(x => Funs.DB.Supervise_UnitHazardRegister + .Any(r => Funs.DB.Supervise_UnitHazardRegisterItem + .Any(i => i.UnitHazardRegisterItemId == x.UnitHazardRegisterItemId && + i.UnitHazardRegisterId == r.UnitHazardRegisterId && + projectIds.Contains(r.ProjectId)))); + } + } + + // 获取总数 + totalCount = query.Count(); + + // 排序和分页 + var orderedQuery = query.OrderByDescending(x => x.CheckDate); + + if (returnAll) + { + return orderedQuery.ToList(); + } + + return orderedQuery + .Skip(pageIndex * pageSize) + .Take(pageSize) + .ToList(); + } + + /// + /// 更新明细记录 + /// + /// 明细记录 + public static void UpdateUnitHazardRegisterItem(Model.Supervise_UnitHazardRegisterItem item) + { + Model.Supervise_UnitHazardRegisterItem oldItem = + Funs.DB.Supervise_UnitHazardRegisterItem.FirstOrDefault(e => e.UnitHazardRegisterItemId == item.UnitHazardRegisterItemId); + if (oldItem != null) + { + oldItem.ProblemDescription = item.ProblemDescription; + oldItem.ProblemType = item.ProblemType; + oldItem.RiskLevel = item.RiskLevel; + oldItem.RectifyRequirement = item.RectifyRequirement; + oldItem.CompleteStatus = item.CompleteStatus; + oldItem.CompletedDate = item.CompletedDate; + oldItem.SortIndex = item.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + #endregion Methods + } +} \ No newline at end of file diff --git a/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs b/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs new file mode 100644 index 00000000..3c5116eb --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs @@ -0,0 +1,301 @@ +using System; +using Model; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 企业级检查主表服务 + /// + public static class UnitHazardRegisterService + { + #region Fields + + public static Dictionary StateMap = new Dictionary + { + { "待提交" ,(int)StateInt.待提交}, + { "待整改" ,(int)StateInt.待整改}, + { "部分整改" ,(int)StateInt.部分整改}, + { "已闭环" ,(int)StateInt.已闭环}, + }; + + #endregion Fields + + #region Enums + + public enum StateInt : int + { + 待提交 = 0, + 待整改= 1, + 部分整改 = 2, + 已闭环 = 3, + } + + #endregion Enums + + #region Methods + + /// + /// 添加企业级检查记录 + /// + /// 企业级检查记录 + public static void AddUnitHazardRegister(Model.Supervise_UnitHazardRegister register) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Supervise_UnitHazardRegister newRegister = new Model.Supervise_UnitHazardRegister + { + UnitHazardRegisterId = register.UnitHazardRegisterId, + UnitHazardRegisterCode = register.UnitHazardRegisterCode, + CheckDate = register.CheckDate, + CheckMainType = register.CheckMainType, + CheckType = register.CheckType, + ProjectId = register.ProjectId, + CheckUnitId = register.CheckUnitId, + CheckTeam = register.CheckTeam, + CheckManIds = register.CheckManIds, + CheckManNames = register.CheckManNames, + InsResponsibleUserId = register.InsResponsibleUserId, + EvaluationResult = register.EvaluationResult, + AttachUrl = register.AttachUrl, + States = register.States??0, + CompileMan = register.CompileMan, + CreateDate = DateTime.Now + }; + db.Supervise_UnitHazardRegister.InsertOnSubmit(newRegister); + db.SubmitChanges(); + } + } + + public static string ConvertState(int state) + { + string result = string.Empty; + result = StateMap.First(c => c.Value == state).Key; + return result; + } + /// + /// 删除企业级检查记录 + /// + /// 检查记录ID + public static void DeleteUnitHazardRegisterById(string registerId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var register = db.Supervise_UnitHazardRegister.FirstOrDefault(e => e.UnitHazardRegisterId == registerId); + if (register != null) + { + // 删除附件 + if (!string.IsNullOrEmpty(register.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, register.AttachUrl); + } + // 删除编码记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(registerId); + // 删除附件 + BLL.CommonService.DeleteAttachFileById(registerId); + // 删除流程 + BLL.CommonService.DeleteFlowOperateByID(registerId); + + db.Supervise_UnitHazardRegister.DeleteOnSubmit(register); + db.SubmitChanges(); + } + } + } + + /// + /// 根据项目和时间段获取检查数量 + /// + /// 项目ID + /// 开始时间 + /// 结束时间 + /// 检查数量 + public static int GetCount(string projectId, DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Supervise_UnitHazardRegister + where x.ProjectId == projectId && x.CheckDate >= startTime && x.CheckDate <= endTime + select x).Count(); + } + public static int GetCount(string checkMainType) + { + return (from x in Funs.DB.Supervise_UnitHazardRegister + where x.CheckMainType ==checkMainType + select x.UnitHazardRegisterId).Count(); + } + /// + /// 根据ID获取企业级检查记录 + /// + /// 检查记录ID + /// 企业级检查记录 + public static Model.Supervise_UnitHazardRegister GetUnitHazardRegisterById(string registerId) + { + return Funs.DB.Supervise_UnitHazardRegister.FirstOrDefault(e => e.UnitHazardRegisterId == registerId); + } + + /// + /// 判断是否可以删除检查记录 + /// + /// 检查记录ID + /// true=可以删除,false=不能删除 + public static bool CanDeleteRegister(string registerId) + { + var register = GetUnitHazardRegisterById(registerId); + if (register == null) + { + return false; + } + // 只有"待提交"状态可以删除,其他状态不能删除 + return register.States <= (int)StateInt.待提交; + } + + /// + /// 获取企业级检查列表(使用input对象,返回总数) + /// + /// 查询条件 + /// 页码(从0开始) + /// 每页大小 + /// 是否返回所有数据(不分页) + /// 总记录数 + /// 检查记录列表 + public static List GetUnitHazardRegisters( + UnitHazardRegisterInput input, + int pageIndex, + int pageSize, + bool returnAll, + out int totalCount) + { + var db = Funs.DB; + // 使用JOIN一次性获取所有数据,解决N+1查询问题 + var query = from x in db.Supervise_UnitHazardRegister + join ct in db.Base_SuperviseCheckType + on new { MainType = x.CheckMainType, TypeCode = x.CheckType } + equals new { MainType = ct.CheckMainType, TypeCode = ct.CheckTypeCode } into ctGroup + from ct in ctGroup.DefaultIfEmpty() + join u in db.Base_Unit + on x.CheckUnitId equals u.UnitId into uGroup + from u in uGroup.DefaultIfEmpty() + join p in db.Base_Project on x.ProjectId equals p.ProjectId into pGroup + from p in pGroup.DefaultIfEmpty() + select new UnitHazardRegisterOutput + { + UnitHazardRegisterId = x.UnitHazardRegisterId, + UnitHazardRegisterCode = x.UnitHazardRegisterCode, + CheckDate = x.CheckDate, + ProjectId = x.ProjectId, + CheckMainTypeName = x.CheckMainType == "0" ? "安全" : "质量", + CheckType = x.CheckType, + CheckTypeName = ct.CheckTypeName, + CheckObjectText = p.ProjectName, + CheckUnitName = u.UnitName, + CheckTeam = x.CheckTeam, + EvaluationResult = x.EvaluationResult, + StatesName = ConvertState(x.States.Value), + AttachUrl = x.AttachUrl, + }; + + // 应用检查大类过滤 + if (input != null && !string.IsNullOrEmpty(input.CheckMainType)) + { + query = query.Where(x => x.CheckMainTypeName.Contains(input.CheckMainType == "0" ? "安全" : "质量")); + } + + // 应用文本搜索 + if (input != null && !string.IsNullOrEmpty(input.SearchText)) + { + query = query.Where(x => x.UnitHazardRegisterCode.Contains(input.SearchText) || + x.CheckObjectText.Contains(input.SearchText) || + x.CheckTeam.Contains(input.SearchText) || + x.EvaluationResult.Contains(input.SearchText)); + } + + // 应用检查类别过滤 + if (input != null && !string.IsNullOrEmpty(input.CheckType) && input.CheckType != BLL.Const._Null) + { + query = query.Where(x => x.CheckType == input.CheckType); + } + + // 项目权限过滤 + if (input != null && !string.IsNullOrEmpty(input.ProjectId)) + { + query = query.Where(x => x.ProjectId != null && x.ProjectId == input.ProjectId); + } + + // 获取总数 + totalCount = query.Count(); + + // 排序和分页 + var orderedQuery = query.OrderByDescending(x => x.CheckDate); + + if (returnAll) + { + return orderedQuery.ToList(); + } + + return orderedQuery + .Skip(pageIndex * pageSize) + .Take(pageSize) + .ToList(); + } + + /// + /// 更新企业级检查记录 + /// + /// 企业级检查记录 + public static void UpdateUnitHazardRegister(Model.Supervise_UnitHazardRegister register) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Supervise_UnitHazardRegister newRegister = + db.Supervise_UnitHazardRegister.FirstOrDefault(e => e.UnitHazardRegisterId == register.UnitHazardRegisterId); + if (newRegister != null) + { + newRegister.UnitHazardRegisterCode = register.UnitHazardRegisterCode; + newRegister.CheckDate = register.CheckDate; + newRegister.CheckMainType = register.CheckMainType; + newRegister.CheckType = register.CheckType; + newRegister.ProjectId = register.ProjectId; + newRegister.CheckUnitId = register.CheckUnitId; + newRegister.CheckTeam = register.CheckTeam; + newRegister.CheckManIds = register.CheckManIds; + newRegister.CheckManNames = register.CheckManNames; + newRegister.EvaluationResult = register.EvaluationResult; + newRegister.AttachUrl = register.AttachUrl; + newRegister.States = register.States; + newRegister.InsResponsibleUserId = register.InsResponsibleUserId; + newRegister.UpdateDate = DateTime.Now; + db.SubmitChanges(); + } + } + } + + /// + /// 更新主单状态(根据明细的整改情况) + /// + public static void UpdateRegisterStatus(string registerId) + { + // 获取主单的所有明细的整改状态 + int rectifyStatus = BLL.UnitHazardRegisterItemService.GetRectifyStatus(registerId); + + var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(registerId); + if (register != null) + { + // 根据整改状态更新主单状态 + switch (rectifyStatus) + { + case 0: // 全部未整改 + register.States = (int)UnitHazardRegisterService.StateInt.待整改; // 待整改 + break; + case 1: // 部分整改 + register.States = (int)UnitHazardRegisterService.StateInt.部分整改; ; // 待整改 + break; + case 2: // 全部整改 + register.States = (int)UnitHazardRegisterService.StateInt.已闭环; ; // 已完成 + break; + } + + BLL.UnitHazardRegisterService.UpdateUnitHazardRegister(register); + } + } + #endregion Methods + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 476171d3..3e942c2d 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1434,6 +1434,9 @@ + + + @@ -2422,6 +2425,10 @@ + + + + @@ -14520,6 +14527,27 @@ SolutionTemplateView.aspx + + TemporaryElectricity.aspx + ASPXCodeBehind + + + TemporaryElectricity.aspx + + + TemporaryElectricityEdit.aspx + ASPXCodeBehind + + + TemporaryElectricityEdit.aspx + + + TemporaryElectricityView.aspx + ASPXCodeBehind + + + TemporaryElectricityView.aspx + CheckItemDetailEdit.aspx ASPXCodeBehind @@ -20225,6 +20253,34 @@ SuperviseCheckReportFinalizeEdit.aspx + + UnitHazardRegister.aspx + ASPXCodeBehind + + + UnitHazardRegister.aspx + + + UnitHazardRegisterEdit.aspx + ASPXCodeBehind + + + UnitHazardRegisterEdit.aspx + + + UnitHazardRegisterRecord.aspx + ASPXCodeBehind + + + UnitHazardRegisterRecord.aspx + + + UnitHazardRegisterRecordEdit.aspx + ASPXCodeBehind + + + UnitHazardRegisterRecordEdit.aspx + TestRunMonthSummaryReport.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialProDetailIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialProDetailIn.aspx.cs index 8424d46b..92536538 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialProDetailIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialProDetailIn.aspx.cs @@ -368,8 +368,11 @@ namespace FineUIPro.Web.HSSE.Check { //case "低": RiskLevel = "0"; break; case "一般": RiskLevel = "1"; break; + case "一般风险": RiskLevel = "1"; break; case "较高": RiskLevel = "2"; break; + case "较大风险": RiskLevel = "2"; break; case "高": RiskLevel = "3"; break; + case "重大风险": RiskLevel = "3"; break; default: RiskLevel = "1"; break; } } diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx new file mode 100644 index 00000000..2c78abf6 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx @@ -0,0 +1,127 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricity.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricity" %> + +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.cs new file mode 100644 index 00000000..246ab517 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.cs @@ -0,0 +1,240 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.HSSE.Solution +{ + public partial class TemporaryElectricity : PageBase + { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.ProjectId; + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ) + { + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } + btnNew.OnClientClick = Window1.GetShowReference("TemporaryElectricityEdit.aspx") + "return false;"; + BindGrid(); + } + } + /// + /// 公司级树加载 + /// + /// + /// + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.GetButtonPower(); + + this.BindGrid(); + } + /// + /// 绑定数据 + /// + + public void BindGrid() + { + if (string.IsNullOrEmpty(this.ProjectId)) + { + return; + } + DataTable tb = ChecklistData(); + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + protected DataTable ChecklistData() + { + string strSql = @"select C.*,p.UserName from [dbo].[Solution_TemporaryElectricity] C left join Sys_User p on p.UserId=C.CompileMan + where 1=1"; + List listStr = new List(); + strSql += " AND C.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + /// + /// 窗体关闭 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + //右键编辑 + protected void btnMenuModify_Click(object sender, EventArgs e) + { + EditData(); + } + //双击编辑 + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + //分页 + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TemporaryElectricityEdit.aspx?TemporaryElectricityId={0}", Grid1.SelectedRowID, "编辑 - "))); + + } + //右键查看 + protected void btnMenuView_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TemporaryElectricityView.aspx?TemporaryElectricityId={0}", Grid1.SelectedRowID, "查看 - "))); + } + //右键删除 + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(rowID); + BLL.TemporaryElectricityService.DeleteTemporaryElectricityById(rowID); + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + /// + /// 搜索 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + /// + /// 重置 + /// + /// + /// + protected void btnRset_Click(object sender, EventArgs e) + { + BindGrid(); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectTemporaryElectricityListMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + } + if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + btnNew.Hidden = true; + btnMenuModify.Hidden = true; + btnMenuDel.Hidden = true; + } + } + #endregion + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + object[] keys = Grid1.DataKeys[e.RowIndex]; + string fileId = string.Empty; + if (keys == null) + { + return; + } + else + { + fileId = keys[0].ToString(); + } + if (e.CommandName.Equals("download")) + { + string menuId = Const.ProjectTemporaryElectricityListMenuId; + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", fileId, menuId))); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.designer.cs new file mode 100644 index 00000000..8acf7ae1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricity.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Solution +{ + + + public partial class TemporaryElectricity + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx new file mode 100644 index 00000000..50b2f0c1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx @@ -0,0 +1,102 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricityEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricityEdit" %> + + + + + + 临时用电方案 + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.cs new file mode 100644 index 00000000..4f5151d7 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.cs @@ -0,0 +1,119 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Data; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Solution +{ + public partial class TemporaryElectricityEdit : PageBase + { + /// + /// 主键 + /// + public string TemporaryElectricityId + { + get + { + return (string)ViewState["TemporaryElectricityId"]; + } + set + { + ViewState["TemporaryElectricityId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + TemporaryElectricityId = Request.Params["TemporaryElectricityId"]; + if (!string.IsNullOrEmpty(TemporaryElectricityId)) + { + hdId.Text = this.TemporaryElectricityId; + Model.Solution_TemporaryElectricity TemporaryElectricity = BLL.TemporaryElectricityService.GetTemporaryElectricityByTemporaryElectricityId(TemporaryElectricityId); + this.txtCode.Text = TemporaryElectricity.Code; + this.txtName.Text = TemporaryElectricity.Name; + this.txtContent.Text = TemporaryElectricity.Content; + this.txtRemark.Text = TemporaryElectricity.Remark; + if (!string.IsNullOrEmpty(TemporaryElectricity.CompileMan)) + { + this.txtCompileMan.Text = UserService.GetUserNameByUserId(TemporaryElectricity.CompileMan); + } + if (TemporaryElectricity.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate); + } + } + else + { + this.txtCompileMan.Text = this.CurrUser.UserName; + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + + protected void imgBtnFile_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(hdId.Text)) + { + hdId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", hdId.Text, BLL.Const.ProjectTemporaryElectricityListMenuId))); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Saveinspection("save"); + } + + /// + /// 保存 + /// + public void Saveinspection(string saveType) + { + Model.Solution_TemporaryElectricity TemporaryElectricity = new Model.Solution_TemporaryElectricity(); + TemporaryElectricity.ProjectId = this.CurrUser.LoginProjectId; + TemporaryElectricity.Code = this.txtCode.Text.Trim(); + TemporaryElectricity.Name = this.txtName.Text.Trim(); + TemporaryElectricity.Content = this.txtContent.Text.Trim(); + TemporaryElectricity.Remark = this.txtRemark.Text.Trim(); + TemporaryElectricity.CompileMan = this.CurrUser.UserId; + TemporaryElectricity.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim()); + if (!string.IsNullOrEmpty(this.TemporaryElectricityId)) + { + TemporaryElectricity.TemporaryElectricityId = this.TemporaryElectricityId; + TemporaryElectricityService.UpdateTemporaryElectricity(TemporaryElectricity); + LogService.AddSys_Log(CurrUser, TemporaryElectricity.Code, TemporaryElectricity.TemporaryElectricityId, Const.ProjectTemporaryElectricityListMenuId, "修改临时用电方案"); + } + else + { + if (string.IsNullOrEmpty(hdId.Text)) + { + TemporaryElectricity.TemporaryElectricityId = SQLHelper.GetNewID(); + TemporaryElectricityId = TemporaryElectricity.TemporaryElectricityId; + } + else + { + TemporaryElectricity.TemporaryElectricityId = hdId.Text; + } + TemporaryElectricityService.AddTemporaryElectricity(TemporaryElectricity); + LogService.AddSys_Log(CurrUser, TemporaryElectricity.Code, TemporaryElectricity.TemporaryElectricityId, Const.ProjectTemporaryElectricityListMenuId, "增加临时用电方案"); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.designer.cs new file mode 100644 index 00000000..41f73a55 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityEdit.aspx.designer.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Solution +{ + + + public partial class TemporaryElectricityEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// txtContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtContent; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompileDate; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// imgBtnFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnFile; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx new file mode 100644 index 00000000..f7096d72 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx @@ -0,0 +1,100 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemporaryElectricityView.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.TemporaryElectricityView" %> + + + + + + 临时用电方案 + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.cs new file mode 100644 index 00000000..c87f1899 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.cs @@ -0,0 +1,78 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Data; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Solution +{ + public partial class TemporaryElectricityView : PageBase + { + /// + /// 主键 + /// + public string TemporaryElectricityId + { + get + { + return (string)ViewState["TemporaryElectricityId"]; + } + set + { + ViewState["TemporaryElectricityId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + TemporaryElectricityId = Request.Params["TemporaryElectricityId"]; + if (!string.IsNullOrEmpty(TemporaryElectricityId)) + { + hdId.Text = this.TemporaryElectricityId; + Model.Solution_TemporaryElectricity TemporaryElectricity = BLL.TemporaryElectricityService.GetTemporaryElectricityByTemporaryElectricityId(TemporaryElectricityId); + this.txtCode.Text = TemporaryElectricity.Code; + this.txtName.Text = TemporaryElectricity.Name; + this.txtContent.Text = TemporaryElectricity.Content; + this.txtRemark.Text = TemporaryElectricity.Remark; + if (!string.IsNullOrEmpty(TemporaryElectricity.CompileMan)) + { + this.txtCompileMan.Text = UserService.GetUserNameByUserId(TemporaryElectricity.CompileMan); + } + if (TemporaryElectricity.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", TemporaryElectricity.CompileDate); + } + } + else + { + this.txtCompileMan.Text = this.CurrUser.UserName; + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + + protected void imgBtnFile_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(hdId.Text)) + { + hdId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TemporaryElectricity&menuId={1}", hdId.Text, BLL.Const.ProjectTemporaryElectricityListMenuId))); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.designer.cs new file mode 100644 index 00000000..58b89ab3 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Solution/TemporaryElectricityView.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Solution +{ + + + public partial class TemporaryElectricityView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// txtContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtContent; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompileDate; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// imgBtnFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnFile; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx new file mode 100644 index 00000000..e509b1c7 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UnitHazardRegister.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.UnitHazardRegister" %> + + + + + + + 企业级检查 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.cs new file mode 100644 index 00000000..9cc01b82 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.cs @@ -0,0 +1,166 @@ +using BLL; +using System; +using System.Linq; +using Model; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class UnitHazardRegister : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("UnitHazardRegisterEdit.aspx?type=" + Request["type"]) + "return false;"; + // 获取 Type 参数 + string type = Request["type"] ?? "0"; + drpCheckMainType.SelectedValue = type; + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType( + this.drpCheckType, type, true); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BindGrid(); + } + } + + /// + /// 绑定Grid数据 + /// + private void BindGrid() + { + // 构建查询条件 + var input = new UnitHazardRegisterInput + { + CheckMainType = drpCheckMainType.SelectedValue, + SearchText = this.txtSearch.Text.Trim(), + CheckType = this.drpCheckType.SelectedValue, + ProjectId = this.CurrUser.LoginProjectId + }; + + int totalCount; + + // 使用新方法获取数据 + var list = BLL.UnitHazardRegisterService.GetUnitHazardRegisters( + input, + Grid1.PageIndex, + Grid1.PageSize, + false, + out totalCount); + + Grid1.RecordCount = totalCount; + Grid1.DataSource = list; + Grid1.DataBind(); + } + + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnEdit_Click(null, null); + } + + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + protected void txtSearch_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + + protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e) + { + // 重新加载检查类别下拉框 + string type = drpCheckMainType.SelectedValue; + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, type, true); + BindGrid(); + } + + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string registerId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("UnitHazardRegisterEdit.aspx?UnitHazardRegisterId={0}&type={1}", + registerId, Request["type"]))); + } + + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (UnitHazardRegisterService.CanDeleteRegister(rowID) || (this.CurrUser.UserId ==Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId)) + { + BLL.UnitHazardRegisterItemService.DeleteItemsByRegisterId(rowID); + BLL.UnitHazardRegisterService.DeleteUnitHazardRegisterById(rowID); + + } + else + { + ShowNotify("该检查已进入整改流程不允许删除!", MessageBoxIcon.Warning); + return; + + } + } + BindGrid(); + ShowNotify("删除成功!", MessageBoxIcon.Success); + } + } + + protected void btnOut_Click(object sender, EventArgs e) + { + string type = Request["type"] ?? "0"; + string typeText = type == "0" ? "安全" : "质量"; + + Response.ClearContent(); + Response.ContentType = "application/octet-stream"; + Response.AddHeader("Content-Disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业" + typeText + "检查.xls", System.Text.Encoding.UTF8)); + Response.Charset = "UTF-8"; + + Grid1.PageSize = 100000; + BindGrid(); + + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + private void GetButtonPower() + { + string menuId = Request["type"] == "0" ? + BLL.Const.UnitHazardRegisterMenu_Safety : + BLL.Const.UnitHazardRegisterMenu_Quality; + + var buttonList = BLL.CommonService.GetAllButtonList( + this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) btnNew.Hidden = false; + if (buttonList.Contains(BLL.Const.BtnModify)) btnEdit.Hidden = false; + if (buttonList.Contains(BLL.Const.BtnDelete)) btnDelete.Hidden = false; + } + } + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.designer.cs new file mode 100644 index 00000000..020c74bf --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegister.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class UnitHazardRegister + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSearch; + + /// + /// drpCheckMainType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckMainType; + + /// + /// drpCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckType; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx new file mode 100644 index 00000000..ffbc7278 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx @@ -0,0 +1,169 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UnitHazardRegisterEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.UnitHazardRegisterEdit" %> + + + + + + + 编辑企业级检查 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.cs new file mode 100644 index 00000000..05c48748 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.cs @@ -0,0 +1,425 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using FineUIPro.Web.SysManage; +using Microsoft.Win32; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class UnitHazardRegisterEdit : PageBase + { + #region Fields + + private List items = new List(); + + #endregion Fields + + #region Properties + + public string UnitHazardRegisterId + { + get { return (string)ViewState["UnitHazardRegisterId"]; } + set { ViewState["UnitHazardRegisterId"] = value; } + } + public string type + { + get { return (string)ViewState["type"]; } + set { ViewState["type"] = value; } + } + #endregion Properties + + #region Methods + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + // 获取 Type 参数 + type = Request["type"] ?? "0"; + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + InitDropList(); + + this.UnitHazardRegisterId = Request.Params["UnitHazardRegisterId"]; + var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(this.UnitHazardRegisterId); + + if (register != null) + { + // 编辑模式 - 加载数据 + this.txtUnitHazardRegisterCode.Text = register.UnitHazardRegisterCode; + if (register.CheckDate != null) + { + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", register.CheckDate); + } + this.drpCheckMainType.SelectedValue = register.CheckMainType; + + if (!string.IsNullOrWhiteSpace(register.CheckType)) + { + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType( + this.drpCheckType, register.CheckMainType, false); + this.drpCheckType.SelectedValue = register.CheckType; + } + + if (!string.IsNullOrWhiteSpace(register.ProjectId)) + { + this.ddlProjectId.SelectedValue = register.ProjectId; + this.ddlInsResponsibleUserId.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null); + if (!string.IsNullOrWhiteSpace(register.InsResponsibleUserId)) + { + this.ddlInsResponsibleUserId.SelectedValue = register.InsResponsibleUserId; + } + } + + if (!string.IsNullOrWhiteSpace(register.CheckUnitId)) + { + this.ddlCheckUnitId.SelectedValue = register.CheckUnitId; + } + + this.txtCheckTeam.Text = register.CheckTeam; + + // 加载明细 + items = BLL.UnitHazardRegisterItemService.GetItemsByRegisterId(this.UnitHazardRegisterId) + .Select(x => new View_UnitHazardRegisterItem + { + UnitHazardRegisterItemId = x.UnitHazardRegisterItemId, + ProblemDescription = x.ProblemDescription, + ProblemType = x.ProblemType, + RiskLevel = x.RiskLevel, + RectifyRequirement = x.RectifyRequirement, + CompleteStatus = x.CompleteStatus, + CompletedDate = x.CompletedDate + }).ToList(); + + if (register.States> (int)UnitHazardRegisterService.StateInt.待提交) + { + btnAdd.Hidden = true; + btnSave.Hidden = true; + btnSubmit.Hidden = true; + } + } + else + { + // 新增模式 + var unitModel = UnitService.GetUnitByUnitId(this.CurrUser.UnitId); + if (unitModel?.IsBranch == true) + { + this.ddlCheckUnitId.SelectedValue = this.CurrUser.UnitId; + } + else + { + var thisUnit = BLL.CommonService.GetIsThisUnit(); + this.ddlCheckUnitId.SelectedValue = thisUnit.UnitId; + } + this.txtCheckTeam.Text = BLL.UnitService.GetUnitNameByUnitId(this.CurrUser.UnitId) + " " + this.CurrUser.UserName; + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + // 自动生成编号 + int newCount= UnitHazardRegisterService.GetCount(type)+1; + this.txtUnitHazardRegisterCode.Text = newCount.ToString().PadLeft(5,'0'); + } + + Grid1.DataSource = items; + Grid1.DataBind(); + } + } + + protected void InitDropList() + { + drpCheckMainType.SelectedValue = type; + // 初始化下拉框 + BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, false); + BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, ddlCheckUnitId.SelectedValue, true); + BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null); + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType( + this.drpCheckType, type, false); + + if (type=="0") + { + this.drpProblemType.DataTextField = "RegisterTypesName"; + this.drpProblemType.DataValueField = "RegisterTypesName"; + this.drpProblemType.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型 + this.drpProblemType.DataBind(); + } + else + { + QualityQuestionTypeService.InitQualityQuestionType(drpProblemType, false); + } + + + + } + protected void btnAdd_Click(object sender, EventArgs e) + { + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + values.Add("UnitHazardRegisterItemId", teamGroupRow.Value("id")); + list.Add(values); + } + JObject defaultObj = new JObject + { { "UnitHazardRegisterItemId",Guid.NewGuid() }, + { "ProblemDescription", "" }, + { "ProblemType", "" }, + { "RiskLevel","一般"}, + { "RectifyRequirement", "" }, + { "Delete", String.Format("", GetDeleteScript(), IconHelper.GetResolvedIconUrl(Icon.Delete)) } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpCheckMainType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查大类!", MessageBoxIcon.Warning); + return; + } + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查类别!", MessageBoxIcon.Warning); + return; + } + if (this.ddlProjectId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning); + return; + } + if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查单位!", MessageBoxIcon.Warning); + return; + } + SaveNew(); + SaveItem(); + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpCheckMainType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查大类!", MessageBoxIcon.Warning); + return; + } + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查类别!", MessageBoxIcon.Warning); + return; + } + if (this.ddlProjectId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning); + return; + } + if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择检查单位!", MessageBoxIcon.Warning); + return; + } + SaveNew(Const.BtnSubmit); + SaveItem(); + + ShowNotify("提交成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + protected void ddlCheckUnitId_SelectedIndexChanged(object sender, EventArgs e) + { + this.ddlProjectId.Items.Clear(); + this.ddlInsResponsibleUserId.Items.Clear(); + BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId,ddlCheckUnitId.SelectedValue, true); + + } + protected void ddlProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.ddlInsResponsibleUserId.Items.Clear(); + //BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, Const.ProjectUnitType_1, true); + BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null); + + } + + protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e) + { + BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType( + this.drpCheckType, this.drpCheckMainType.SelectedValue, false); + } + + /// + /// + /// + /// + /// + protected void Grid1_PreDataBound(object sender, EventArgs e) + { + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScript(); + var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(this.UnitHazardRegisterId); + + if (register!=null&& register.States > (int)UnitHazardRegisterService.StateInt.待提交) + { + LinkButtonField lbUpload = Grid1.FindColumn(6) as LinkButtonField; + LinkButtonField lbDelete = Grid1.FindColumn(7) as LinkButtonField; + + lbUpload.Enabled = false; + lbDelete.Enabled = false; + } + + + } + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string itemId = Grid1.DataKeys[e.RowIndex][0].ToString(); + string menuId = Request["type"] == "0" ? + BLL.Const.UnitHazardRegisterMenu_Safety : + BLL.Const.UnitHazardRegisterMenu_Quality; + if (e.CommandName == "attchUrl") + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/UnitHazardRegister&menuId={1}&edit=1", itemId, menuId))); + } + } + + protected void SaveItem() + { + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + + Model.Supervise_UnitHazardRegisterItem registerItem = new Model.Supervise_UnitHazardRegisterItem + { + UnitHazardRegisterItemId = teamGroupRow.Value("id"), + UnitHazardRegisterId = this.UnitHazardRegisterId, + ProblemDescription = values.Value("ProblemDescription"), + ProblemType = values.Value("ProblemType"), + RiskLevel = values.Value("RiskLevel"), + RectifyRequirement = values.Value("RectifyRequirement"), + CompleteStatus = 0 + }; + if (UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(registerItem.UnitHazardRegisterItemId) != null) + { + UnitHazardRegisterItemService.UpdateUnitHazardRegisterItem(registerItem); + } + else + { + BLL.UnitHazardRegisterItemService.AddUnitHazardRegisterItem(registerItem); + } + } + } + + protected void SaveNew(string type="") + { + Supervise_UnitHazardRegister register = new Supervise_UnitHazardRegister + { + UnitHazardRegisterCode = this.txtUnitHazardRegisterCode.Text.Trim(), + CheckDate = Funs.GetNewDateTime(this.dpkCheckDate.Text.Trim()), + CheckMainType = this.drpCheckMainType.SelectedValue, + CheckType = this.drpCheckType.SelectedValue, + ProjectId = this.ddlProjectId.SelectedValue, + CheckUnitId = this.ddlCheckUnitId.SelectedValue, + InsResponsibleUserId = this.ddlInsResponsibleUserId.SelectedValue, + CheckTeam = this.txtCheckTeam.Text.Trim(), + CompileMan = this.CurrUser.UserId, + States = (int)UnitHazardRegisterService.StateInt.待提交 + }; + if (!string.IsNullOrEmpty(type)) + { + + register.States = (int)UnitHazardRegisterService.StateInt.待整改; + } + if (string.IsNullOrWhiteSpace(this.UnitHazardRegisterId)) + { + // 新增 + register.UnitHazardRegisterId = SQLHelper.GetNewID(typeof(Supervise_UnitHazardRegister)); + this.UnitHazardRegisterId = register.UnitHazardRegisterId; + BLL.UnitHazardRegisterService.AddUnitHazardRegister(register); + + // 增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId( + BLL.Const.UnitHazardRegisterMenu_Safety, register.ProjectId, null, + register.UnitHazardRegisterId, register.CheckDate); + } + else + { + // 更新 + register.UnitHazardRegisterId = this.UnitHazardRegisterId; + BLL.UnitHazardRegisterService.UpdateUnitHazardRegister(register); + } + } + + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + // 刷新Grid数据 + items = BLL.UnitHazardRegisterItemService.GetItemsByRegisterId(this.UnitHazardRegisterId) + .Select(x => new View_UnitHazardRegisterItem + { + UnitHazardRegisterItemId = x.UnitHazardRegisterItemId, + ProblemDescription = x.ProblemDescription, + ProblemType = x.ProblemType, + RiskLevel = x.RiskLevel, + RectifyRequirement = x.RectifyRequirement, + CompleteStatus = x.CompleteStatus, + CompletedDate = x.CompletedDate + }).ToList(); + + Grid1.DataSource = items; + Grid1.DataBind(); + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + // 刷新Grid数据 + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + values.Add("UnitHazardRegisterItemId", teamGroupRow.Value("id")); + list.Add(values); + } + Grid1.DataSource = list; + Grid1.DataBind(); + } + + /// + /// 删除提示 + /// + /// + private string GetDeleteScript() + { + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, Grid1.GetDeleteSelectedRowsReference(), String.Empty); + } + + #endregion Methods + + + } + + /// + /// 企业级检查明细视图类 + /// + public class View_UnitHazardRegisterItem + { + #region Properties + + public DateTime? CompletedDate { get; set; } + public int? CompleteStatus { get; set; } + public string ProblemDescription { get; set; } + public string ProblemImageUrl { get; set; } + public string ProblemType { get; set; } + public string RectifyRequirement { get; set; } + public string RiskLevel { get; set; } + public string UnitHazardRegisterItemId { get; set; } + + #endregion Properties + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.designer.cs new file mode 100644 index 00000000..e07a75c0 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterEdit.aspx.designer.cs @@ -0,0 +1,287 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class UnitHazardRegisterEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtUnitHazardRegisterCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitHazardRegisterCode; + + /// + /// dpkCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCheckDate; + + /// + /// drpCheckMainType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckMainType; + + /// + /// drpCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckType; + + /// + /// ddlCheckUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlCheckUnitId; + + /// + /// ddlProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProjectId; + + /// + /// ddlInsResponsibleUserId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlInsResponsibleUserId; + + /// + /// txtCheckTeam 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckTeam; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// txtProblemDescription 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProblemDescription; + + /// + /// lbImageUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl1; + + /// + /// drpProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProblemType; + + /// + /// drpRiskLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpRiskLevel; + + /// + /// txtRectifyRequirement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRectifyRequirement; + + /// + /// lbUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.LinkButtonField lbUpload; + + /// + /// lbDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.LinkButtonField lbDelete; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdAttachUrl; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx new file mode 100644 index 00000000..e222ae0b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx @@ -0,0 +1,225 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UnitHazardRegisterRecord.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.UnitHazardRegisterRecord" %> + + + + + + + 企业级检查记录 + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.cs new file mode 100644 index 00000000..32b92af7 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.cs @@ -0,0 +1,288 @@ +using BLL; +using Model; +using System; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class UnitHazardRegisterRecord : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + // 获取 Type 参数 (0=安全, 1=质量) + string type = Request["type"] ?? "0"; + + // 解析时间参数 + DateTime? startTime = null; + DateTime? endTime = null; + if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) + { + startTime = Funs.GetNewDateTime(txtStartTime.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + endTime = Funs.GetNewDateTime(txtEndTime.Text.Trim()); + } + + // 解析状态参数 + int? problemStates = null; + if (!string.IsNullOrEmpty(this.drpProblemStates.SelectedValue)) + { + problemStates = Convert.ToInt32(this.drpProblemStates.SelectedValue); + } + + // 构建查询条件 + var input = new UnitHazardRegisterItemInput + { + CheckMainType = type, + CheckTeam = this.txtCheckTeam.Text.Trim(), + CheckType = this.txtCheckType.Text.Trim(), + Problem = this.txtProblem.Text.Trim(), + StartTime = startTime, + EndTime = endTime, + RiskLevel = this.drpRiskLevel.SelectedValue, + ProblemStates = problemStates, + UnitId = this.CurrUser.UnitId + }; + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + input.ProjectId = this.CurrUser.LoginProjectId; + } + int totalCount; + + // 使用新方法获取数据 + var list = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItems( + input, + Grid1.PageIndex, + Grid1.PageSize, + false, + out totalCount); + + Grid1.RecordCount = totalCount; + Grid1.DataSource = list; + Grid1.DataBind(); + } + + /// + /// 分页 + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 排序 + /// + protected void Grid1_Sort(object sender,GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 查询 + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + if (Funs.GetNewDateTime(this.txtStartTime.Text.Trim()) > Funs.GetNewDateTime(this.txtEndTime.Text.Trim())) + { + Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning); + return; + } + } + this.BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + /// + /// Grid行双击事件 + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + string itemId = Grid1.SelectedRowID; + // 打开单个问题记录整改编辑界面 + var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(itemId); + if (item != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("UnitHazardRegisterRecordEdit.aspx?ItemId={0}&RegisterId={1}&type={2}", + itemId, item.UnitHazardRegisterId, Request["type"]))); + } + } + + /// + /// Grid行命令事件 + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string itemId = Grid1.DataKeys[e.RowIndex][0].ToString(); + + if (e.CommandName == "attchUrl") + { + // 查看问题图片 + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/UnitHazardRegister&menuId={1}&edit=1&type=-1", + itemId, Request["type"] == "0" ? BLL.Const.UnitHazardRegisterMenu_Safety : BLL.Const.UnitHazardRegisterMenu_Quality))); + } + } + + /// + /// 导出按钮 + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string type = Request["type"] ?? "0"; + string typeText = type == "0" ? "安全" : "质量"; + + Response.ClearContent(); + Response.ContentType = "application/octet-stream"; + Response.AddHeader("Content-Disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业" + typeText + "检查记录.xls", System.Text.Encoding.UTF8)); + Response.Charset = "UTF-8"; + + Grid1.PageSize = 100000; + BindGrid(); + + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + +#pragma warning disable CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) +#pragma warning restore CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。 + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del") + { + sb.AppendFormat("", column.HeaderText); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del") + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfPageIndex") + { + html = (row.FindControl("lblPageIndex") as AspNet.Label).Text; + } + if (column.ColumnID == "tfImageUrl") + { + html = (row.FindControl("lbtnImageUrl") as AspNet.LinkButton).Text; + } + if (column.ColumnID == "tfRectificationImageUrl") + { + html = (row.FindControl("lbtnRectificationImageUrl") as AspNet.LinkButton).Text; + } + if (column.ColumnID == "ProblemTypes") + { + html = (row.FindControl("lbProblemTypes") as AspNet.Label).Text; + } + if (column.ColumnID == "tfImageUrl1") + { + html = (row.FindControl("lbImageUrl1") as AspNet.Label).Text; + + } + if (column.ColumnID == "tfImageUrl2") + { + html = (row.FindControl("lbImageUrl2") as AspNet.Label).Text; + + } + if (column.ColumnID == "CheckCycle") + { + html = (row.FindControl("Label2") as AspNet.Label).Text; + } + //if (column.ColumnID == "tfCutPayment") + //{ + // html = (row.FindControl("lbtnCutPayment") as AspNet.LinkButton).Text; + //} + sb.AppendFormat("", html); + } + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + string itemId = Grid1.SelectedRowID; + // 打开单个问题记录整改编辑界面 + var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(itemId); + if (item != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("UnitHazardRegisterRecordEdit.aspx?ItemId={0}&RegisterId={1}&type={2}", + itemId, item.UnitHazardRegisterId, Request["type"]))); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.designer.cs new file mode 100644 index 00000000..3fa0216a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecord.aspx.designer.cs @@ -0,0 +1,242 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class UnitHazardRegisterRecord + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtCheckTeam 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckTeam; + + /// + /// txtCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckType; + + /// + /// txtProblem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProblem; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// drpRiskLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpRiskLevel; + + /// + /// drpProblemStates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProblemStates; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// lbImageUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl1; + + /// + /// lbImageUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl2; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx new file mode 100644 index 00000000..59a2d646 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx @@ -0,0 +1,113 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UnitHazardRegisterRecordEdit.aspx.cs" + Inherits="FineUIPro.Web.ZHGL.Supervise.UnitHazardRegisterRecordEdit" %> + + + + + + 问题整改 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.cs new file mode 100644 index 00000000..68fc5e2a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.cs @@ -0,0 +1,255 @@ +using BLL; +using FineUIPro.Web.BaseInfo; +using Model; +using System; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class UnitHazardRegisterRecordEdit : PageBase + { + #region 定义项 + + /// + /// 问题明细ID + /// + private string ItemId + { + get { return (string)ViewState["ItemId"]; } + set { ViewState["ItemId"] = value; } + } + + /// + /// 主单ID + /// + private string RegisterId + { + get { return (string)ViewState["RegisterId"]; } + set { ViewState["RegisterId"] = value; } + } + + /// + /// 检查大类(0=安全,1=质量) + /// + private string CheckMainType + { + get { return (string)ViewState["CheckMainType"]; } + set { ViewState["CheckMainType"] = value; } + } + + #endregion + + #region 页面加载 + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + // 获取参数 + this.ItemId = Request.Params["ItemId"]; + this.RegisterId = Request.Params["RegisterId"]; + this.CheckMainType = Request["type"] ?? "0"; + + // 加载数据 + if (!string.IsNullOrEmpty(this.ItemId)) + { + LoadData(); + } + } + } + + /// + /// 加载数据 + /// + private void LoadData() + { + // 获取明细记录 + var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(this.ItemId); + if (item == null) + { + Alert.ShowInTop("问题记录不存在!", MessageBoxIcon.Error); + return; + } + + // 获取主单记录 + var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(this.RegisterId); + if (register == null) + { + Alert.ShowInTop("检查记录不存在!", MessageBoxIcon.Error); + return; + } + + // 填充只读字段 + this.txtCheckType.Text = BLL.SuperviseCheckTypeService.GetCheckTypeName( + register.CheckMainType, register.CheckType); + this.txtProblemType.Text = item.ProblemType; + this.txtRiskLevel.Text = item.RiskLevel; + + if (register.CheckDate != null) + { + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", register.CheckDate); + } + + this.txtCheckTeam.Text = register.CheckTeam; + this.txtCheckUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(register.CheckUnitId); + this.txtProblemDescription.Text = item.ProblemDescription; + this.txtRectifyRequirement.Text = item.RectifyRequirement; + this.txtInsResponsibleUserName.Text = UserService.GetUserNameByUserId(register.InsResponsibleUserId); + + // 填充可编辑字段 + this.txtRectificationMeasures.Text = item.RectificationMeasures; + + if (item.CompletedDate != null) + { + this.dpkCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", item.CompletedDate); + } + else + { + this.dpkCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + bool isPowerEdit= (this.CurrUser.UserId==Const.sysglyId|| this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == register.InsResponsibleUserId) ? true: false; + // 判断是否已整改,如果已整改则隐藏保存和提交按钮 + if (item.CompleteStatus == 1 || !isPowerEdit) + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + this.txtRectificationMeasures.Readonly = true; + this.dpkCompletedDate.Readonly = true; + // this.btnAfterImage.Enabled = false; + if (item.CompleteStatus != 1 && !isPowerEdit) + { + ShowNotify("您不是整改责任人,不允许修改!", MessageBoxIcon.Information); + + } + } + } + + #endregion + + #region 保存和提交 + + /// + /// 保存按钮 + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(false); + } + + /// + /// 提交按钮 + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + SaveData(true); + } + + /// + /// 保存数据 + /// + /// 是否提交 + private void SaveData(bool isSubmit) + { + var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(this.ItemId); + if (item == null) + { + Alert.ShowInTop("问题记录不存在!", MessageBoxIcon.Error); + return; + } + + // 验证:如果已整改,不允许修改 + if (item.CompleteStatus == 1) + { + Alert.ShowInTop("该问题已整改完成,不允许修改!", MessageBoxIcon.Warning); + return; + } + + // 更新明细字段 + item.RectificationMeasures = this.txtRectificationMeasures.Text.Trim(); + item.CompletedDate = Funs.GetNewDateTime(this.dpkCompletedDate.Text.Trim()); + + // 如果提交,确保标记为已完成 + if (isSubmit) + { + item.CompleteStatus = 1; + if (!item.CompletedDate.HasValue) + { + item.CompletedDate = DateTime.Now; + } + } + + // 更新数据库 + BLL.UnitHazardRegisterItemService.UpdateUnitHazardRegisterItem(item); + + if (isSubmit) + { + // 更新主单状态 + UnitHazardRegisterService.UpdateRegisterStatus(this.RegisterId); + + } + + // 记录日志 + string menuId = this.CheckMainType == "0" ? + BLL.Const.UnitHazardRegisterMenu_Safety : + BLL.Const.UnitHazardRegisterMenu_Quality; + + BLL.LogService.AddSys_Log(this.CurrUser, item.UnitHazardRegisterItemId, + this.ItemId, menuId, BLL.Const.BtnModify); + + ShowNotify(isSubmit ? "提交成功!" : "保存成功!", MessageBoxIcon.Success); + + // 关闭窗口 + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + + + #endregion + + #region 附件操作 + + /// + /// 查看整改前照片 + /// + protected void btnBeforeImage_Click(object sender, EventArgs e) + { + string menuId = this.CheckMainType == "0" ? + BLL.Const.UnitHazardRegisterMenu_Safety : + BLL.Const.UnitHazardRegisterMenu_Quality; + + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/UnitHazardRegister&menuId={1}&edit=0&type=-1", + this.ItemId, menuId))); + } + + /// + /// 上传和查看整改后照片 + /// + protected void btnAfterImage_Click(object sender, EventArgs e) + { + string menuId = this.CheckMainType == "0" ? + BLL.Const.UnitHazardRegisterMenu_Safety : + BLL.Const.UnitHazardRegisterMenu_Quality; + + + var item = BLL.UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(this.ItemId); + if (item != null && item.CompleteStatus == 1) //已整改不允许上传 + { + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/UnitHazardRegister/&menuId={1}&edit=1&type=-1 ", + this.ItemId + "-R", menuId))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference( + String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/UnitHazardRegister/&menuId={1}&edit=1 ", + this.ItemId + "-R", menuId))); + + } + } + + #endregion + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.designer.cs new file mode 100644 index 00000000..fe309518 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/UnitHazardRegisterRecordEdit.aspx.designer.cs @@ -0,0 +1,215 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class UnitHazardRegisterRecordEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckType; + + /// + /// txtProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProblemType; + + /// + /// txtRiskLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRiskLevel; + + /// + /// txtCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckDate; + + /// + /// txtCheckTeam 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckTeam; + + /// + /// txtCheckUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckUnitName; + + /// + /// txtProblemDescription 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtProblemDescription; + + /// + /// txtRectifyRequirement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRectifyRequirement; + + /// + /// btnBeforeImage 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.LinkButton btnBeforeImage; + + /// + /// txtRectificationMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRectificationMeasures; + + /// + /// txtInsResponsibleUserName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInsResponsibleUserName; + + /// + /// dpkCompletedDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompletedDate; + + /// + /// btnAfterImage 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.LinkButton btnAfterImage; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 87e1429f..d6b5c2da 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2369,6 +2369,9 @@ namespace Model partial void InsertSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void UpdateSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void DeleteSolution_SolutionTemplate(Solution_SolutionTemplate instance); + partial void InsertSolution_TemporaryElectricity(Solution_TemporaryElectricity instance); + partial void UpdateSolution_TemporaryElectricity(Solution_TemporaryElectricity instance); + partial void DeleteSolution_TemporaryElectricity(Solution_TemporaryElectricity instance); partial void InsertSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); partial void UpdateSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); partial void DeleteSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); @@ -2399,6 +2402,12 @@ namespace Model partial void InsertSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); partial void UpdateSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); partial void DeleteSupervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem instance); + partial void InsertSupervise_UnitHazardRegister(Supervise_UnitHazardRegister instance); + partial void UpdateSupervise_UnitHazardRegister(Supervise_UnitHazardRegister instance); + partial void DeleteSupervise_UnitHazardRegister(Supervise_UnitHazardRegister instance); + partial void InsertSupervise_UnitHazardRegisterItem(Supervise_UnitHazardRegisterItem instance); + partial void UpdateSupervise_UnitHazardRegisterItem(Supervise_UnitHazardRegisterItem instance); + partial void DeleteSupervise_UnitHazardRegisterItem(Supervise_UnitHazardRegisterItem instance); partial void InsertSupervise_UpCheckReport(Supervise_UpCheckReport instance); partial void UpdateSupervise_UpCheckReport(Supervise_UpCheckReport instance); partial void DeleteSupervise_UpCheckReport(Supervise_UpCheckReport instance); @@ -9148,6 +9157,14 @@ namespace Model } } + public System.Data.Linq.Table Solution_TemporaryElectricity + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Solution_TestRunConstructSolution { get @@ -9228,6 +9245,22 @@ namespace Model } } + public System.Data.Linq.Table Supervise_UnitHazardRegister + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Supervise_UnitHazardRegisterItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Supervise_UpCheckReport { get @@ -27619,6 +27652,8 @@ namespace Model private EntitySet _Training_TestRecord; + private EntitySet _Supervise_UnitHazardRegister; + private EntitySet _Unqualified_WorkContact; private EntitySet _WBS_BreakdownProject; @@ -28058,6 +28093,7 @@ namespace Model this._Training_Task = new EntitySet(new Action(this.attach_Training_Task), new Action(this.detach_Training_Task)); this._Training_TestPlan = new EntitySet(new Action(this.attach_Training_TestPlan), new Action(this.detach_Training_TestPlan)); this._Training_TestRecord = new EntitySet(new Action(this.attach_Training_TestRecord), new Action(this.detach_Training_TestRecord)); + this._Supervise_UnitHazardRegister = new EntitySet(new Action(this.attach_Supervise_UnitHazardRegister), new Action(this.detach_Supervise_UnitHazardRegister)); this._Unqualified_WorkContact = new EntitySet(new Action(this.attach_Unqualified_WorkContact), new Action(this.detach_Unqualified_WorkContact)); this._WBS_BreakdownProject = new EntitySet(new Action(this.attach_WBS_BreakdownProject), new Action(this.detach_WBS_BreakdownProject)); this._WBS_CostControl = new EntitySet(new Action(this.attach_WBS_CostControl), new Action(this.detach_WBS_CostControl)); @@ -33002,6 +33038,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegister_Project", Storage="_Supervise_UnitHazardRegister", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Supervise_UnitHazardRegister + { + get + { + return this._Supervise_UnitHazardRegister; + } + set + { + this._Supervise_UnitHazardRegister.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Unqualified_WorkContact_Base_Project", Storage="_Unqualified_WorkContact", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Unqualified_WorkContact { @@ -36746,6 +36795,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Supervise_UnitHazardRegister(Supervise_UnitHazardRegister entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Supervise_UnitHazardRegister(Supervise_UnitHazardRegister entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Unqualified_WorkContact(Unqualified_WorkContact entity) { this.SendPropertyChanging(); @@ -41943,6 +42004,8 @@ namespace Model private EntitySet _Test_TestRecord; + private EntitySet _Supervise_UnitHazardRegister; + private EntitySet _Unqualified_WorkContact; private EntitySet _WBS_CnProfession; @@ -42191,6 +42254,7 @@ namespace Model this._Technique_SpecialScheme = new EntitySet(new Action(this.attach_Technique_SpecialScheme), new Action(this.detach_Technique_SpecialScheme)); this._Technique_Expert = new EntitySet(new Action(this.attach_Technique_Expert), new Action(this.detach_Technique_Expert)); this._Test_TestRecord = new EntitySet(new Action(this.attach_Test_TestRecord), new Action(this.detach_Test_TestRecord)); + this._Supervise_UnitHazardRegister = new EntitySet(new Action(this.attach_Supervise_UnitHazardRegister), new Action(this.detach_Supervise_UnitHazardRegister)); this._Unqualified_WorkContact = new EntitySet(new Action(this.attach_Unqualified_WorkContact), new Action(this.detach_Unqualified_WorkContact)); this._WBS_CnProfession = new EntitySet(new Action(this.attach_WBS_CnProfession), new Action(this.detach_WBS_CnProfession)); this._WBS_UnitWork = new EntitySet(new Action(this.attach_WBS_UnitWork), new Action(this.detach_WBS_UnitWork)); @@ -45033,6 +45097,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegister_CheckUnit", Storage="_Supervise_UnitHazardRegister", ThisKey="UnitId", OtherKey="CheckUnitId", DeleteRule="NO ACTION")] + public EntitySet Supervise_UnitHazardRegister + { + get + { + return this._Supervise_UnitHazardRegister; + } + set + { + this._Supervise_UnitHazardRegister.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Unqualified_WorkContact_Base_Unit", Storage="_Unqualified_WorkContact", ThisKey="UnitId", OtherKey="ProposedUnitId", DeleteRule="NO ACTION")] public EntitySet Unqualified_WorkContact { @@ -47254,6 +47331,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Supervise_UnitHazardRegister(Supervise_UnitHazardRegister entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Supervise_UnitHazardRegister(Supervise_UnitHazardRegister entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Unqualified_WorkContact(Unqualified_WorkContact entity) { this.SendPropertyChanging(); @@ -53829,6 +53918,8 @@ namespace Model private string _WederType; + private string _PersonId; + private EntityRef _Base_Unit; private EntityRef _WED_; @@ -53907,6 +53998,8 @@ namespace Model partial void OnTeamGroupIdChanged(); partial void OnWederTypeChanging(string value); partial void OnWederTypeChanged(); + partial void OnPersonIdChanging(string value); + partial void OnPersonIdChanged(); #endregion public BS_Welder() @@ -54586,6 +54679,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId", DbType="NVarChar(50)")] + public string PersonId + { + get + { + return this._PersonId; + } + set + { + if ((this._PersonId != value)) + { + this.OnPersonIdChanging(value); + this.SendPropertyChanging(); + this._PersonId = value; + this.SendPropertyChanged("PersonId"); + this.OnPersonIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_BS_Welder_Base_Unit", Storage="_Base_Unit", ThisKey="WED_Unit", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { @@ -357641,6 +357754,8 @@ namespace Model private string _Email; + private System.Nullable _IsSyncWelder; + private EntitySet _Accident_AccidentPersonRecord; private EntitySet _Accident_AccidentReportOtherItem; @@ -357825,6 +357940,8 @@ namespace Model partial void OnIsBlacklistChanged(); partial void OnEmailChanging(string value); partial void OnEmailChanged(); + partial void OnIsSyncWelderChanging(System.Nullable value); + partial void OnIsSyncWelderChanged(); #endregion public SitePerson_Person() @@ -359151,6 +359268,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSyncWelder", DbType="Bit")] + public System.Nullable IsSyncWelder + { + get + { + return this._IsSyncWelder; + } + set + { + if ((this._IsSyncWelder != value)) + { + this.OnIsSyncWelderChanging(value); + this.SendPropertyChanging(); + this._IsSyncWelder = value; + this.SendPropertyChanged("IsSyncWelder"); + this.OnIsSyncWelderChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_SitePerson_Person", Storage="_Accident_AccidentPersonRecord", ThisKey="PersonId", OtherKey="PersonId", DeleteRule="NO ACTION")] public EntitySet Accident_AccidentPersonRecord { @@ -365973,6 +366110,236 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Solution_TemporaryElectricity")] + public partial class Solution_TemporaryElectricity : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _TemporaryElectricityId; + + private string _ProjectId; + + private string _Code; + + private string _Name; + + private string _Content; + + private string _Remark; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnTemporaryElectricityIdChanging(string value); + partial void OnTemporaryElectricityIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnContentChanging(string value); + partial void OnContentChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Solution_TemporaryElectricity() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TemporaryElectricityId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TemporaryElectricityId + { + get + { + return this._TemporaryElectricityId; + } + set + { + if ((this._TemporaryElectricityId != value)) + { + this.OnTemporaryElectricityIdChanging(value); + this.SendPropertyChanging(); + this._TemporaryElectricityId = value; + this.SendPropertyChanged("TemporaryElectricityId"); + this.OnTemporaryElectricityIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(100)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Content", DbType="NVarChar(2000)")] + public string Content + { + get + { + return this._Content; + } + set + { + if ((this._Content != value)) + { + this.OnContentChanging(value); + this.SendPropertyChanging(); + this._Content = value; + this.SendPropertyChanged("Content"); + this.OnContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Solution_TestRunConstructSolution")] public partial class Solution_TestRunConstructSolution : INotifyPropertyChanging, INotifyPropertyChanged { @@ -369762,6 +370129,929 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_UnitHazardRegister")] + public partial class Supervise_UnitHazardRegister : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _UnitHazardRegisterId; + + private string _UnitHazardRegisterCode; + + private System.Nullable _CheckDate; + + private string _CheckMainType; + + private string _CheckType; + + private string _ProjectId; + + private string _CheckUnitId; + + private string _CheckTeam; + + private string _CheckManIds; + + private string _CheckManNames; + + private string _EvaluationResult; + + private string _AttachUrl; + + private System.Nullable _States; + + private string _CompileMan; + + private System.Nullable _CreateDate; + + private System.Nullable _UpdateDate; + + private System.Nullable _IsUpdate; + + private string _InsResponsibleUserId; + + private EntityRef _Base_Unit; + + private EntityRef _Base_Project; + + private EntitySet _Supervise_UnitHazardRegisterItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnUnitHazardRegisterIdChanging(string value); + partial void OnUnitHazardRegisterIdChanged(); + partial void OnUnitHazardRegisterCodeChanging(string value); + partial void OnUnitHazardRegisterCodeChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnCheckMainTypeChanging(string value); + partial void OnCheckMainTypeChanged(); + partial void OnCheckTypeChanging(string value); + partial void OnCheckTypeChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCheckUnitIdChanging(string value); + partial void OnCheckUnitIdChanged(); + partial void OnCheckTeamChanging(string value); + partial void OnCheckTeamChanged(); + partial void OnCheckManIdsChanging(string value); + partial void OnCheckManIdsChanged(); + partial void OnCheckManNamesChanging(string value); + partial void OnCheckManNamesChanged(); + partial void OnEvaluationResultChanging(string value); + partial void OnEvaluationResultChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnStatesChanging(System.Nullable value); + partial void OnStatesChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCreateDateChanging(System.Nullable value); + partial void OnCreateDateChanged(); + partial void OnUpdateDateChanging(System.Nullable value); + partial void OnUpdateDateChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); + partial void OnInsResponsibleUserIdChanging(string value); + partial void OnInsResponsibleUserIdChanged(); + #endregion + + public Supervise_UnitHazardRegister() + { + this._Base_Unit = default(EntityRef); + this._Base_Project = default(EntityRef); + this._Supervise_UnitHazardRegisterItem = new EntitySet(new Action(this.attach_Supervise_UnitHazardRegisterItem), new Action(this.detach_Supervise_UnitHazardRegisterItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitHazardRegisterId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string UnitHazardRegisterId + { + get + { + return this._UnitHazardRegisterId; + } + set + { + if ((this._UnitHazardRegisterId != value)) + { + this.OnUnitHazardRegisterIdChanging(value); + this.SendPropertyChanging(); + this._UnitHazardRegisterId = value; + this.SendPropertyChanged("UnitHazardRegisterId"); + this.OnUnitHazardRegisterIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitHazardRegisterCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UnitHazardRegisterCode + { + get + { + return this._UnitHazardRegisterCode; + } + set + { + if ((this._UnitHazardRegisterCode != value)) + { + this.OnUnitHazardRegisterCodeChanging(value); + this.SendPropertyChanging(); + this._UnitHazardRegisterCode = value; + this.SendPropertyChanged("UnitHazardRegisterCode"); + this.OnUnitHazardRegisterCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckMainType", DbType="NVarChar(2)")] + public string CheckMainType + { + get + { + return this._CheckMainType; + } + set + { + if ((this._CheckMainType != value)) + { + this.OnCheckMainTypeChanging(value); + this.SendPropertyChanging(); + this._CheckMainType = value; + this.SendPropertyChanged("CheckMainType"); + this.OnCheckMainTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckType", DbType="NVarChar(50)")] + public string CheckType + { + get + { + return this._CheckType; + } + set + { + if ((this._CheckType != value)) + { + this.OnCheckTypeChanging(value); + this.SendPropertyChanging(); + this._CheckType = value; + this.SendPropertyChanged("CheckType"); + this.OnCheckTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckUnitId", DbType="NVarChar(50)")] + public string CheckUnitId + { + get + { + return this._CheckUnitId; + } + set + { + if ((this._CheckUnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCheckUnitIdChanging(value); + this.SendPropertyChanging(); + this._CheckUnitId = value; + this.SendPropertyChanged("CheckUnitId"); + this.OnCheckUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeam", DbType="NVarChar(200)")] + public string CheckTeam + { + get + { + return this._CheckTeam; + } + set + { + if ((this._CheckTeam != value)) + { + this.OnCheckTeamChanging(value); + this.SendPropertyChanging(); + this._CheckTeam = value; + this.SendPropertyChanged("CheckTeam"); + this.OnCheckTeamChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManIds", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string CheckManIds + { + get + { + return this._CheckManIds; + } + set + { + if ((this._CheckManIds != value)) + { + this.OnCheckManIdsChanging(value); + this.SendPropertyChanging(); + this._CheckManIds = value; + this.SendPropertyChanged("CheckManIds"); + this.OnCheckManIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManNames", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string CheckManNames + { + get + { + return this._CheckManNames; + } + set + { + if ((this._CheckManNames != value)) + { + this.OnCheckManNamesChanging(value); + this.SendPropertyChanging(); + this._CheckManNames = value; + this.SendPropertyChanged("CheckManNames"); + this.OnCheckManNamesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationResult", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string EvaluationResult + { + get + { + return this._EvaluationResult; + } + set + { + if ((this._EvaluationResult != value)) + { + this.OnEvaluationResultChanging(value); + this.SendPropertyChanging(); + this._EvaluationResult = value; + this.SendPropertyChanged("EvaluationResult"); + this.OnEvaluationResultChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="Int")] + public System.Nullable States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")] + public System.Nullable CreateDate + { + get + { + return this._CreateDate; + } + set + { + if ((this._CreateDate != value)) + { + this.OnCreateDateChanging(value); + this.SendPropertyChanging(); + this._CreateDate = value; + this.SendPropertyChanged("CreateDate"); + this.OnCreateDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpdateDate", DbType="DateTime")] + public System.Nullable UpdateDate + { + get + { + return this._UpdateDate; + } + set + { + if ((this._UpdateDate != value)) + { + this.OnUpdateDateChanging(value); + this.SendPropertyChanging(); + this._UpdateDate = value; + this.SendPropertyChanged("UpdateDate"); + this.OnUpdateDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InsResponsibleUserId", DbType="NVarChar(50)")] + public string InsResponsibleUserId + { + get + { + return this._InsResponsibleUserId; + } + set + { + if ((this._InsResponsibleUserId != value)) + { + this.OnInsResponsibleUserIdChanging(value); + this.SendPropertyChanging(); + this._InsResponsibleUserId = value; + this.SendPropertyChanged("InsResponsibleUserId"); + this.OnInsResponsibleUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegister_CheckUnit", Storage="_Base_Unit", ThisKey="CheckUnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Supervise_UnitHazardRegister.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Supervise_UnitHazardRegister.Add(this); + this._CheckUnitId = value.UnitId; + } + else + { + this._CheckUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegister_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Supervise_UnitHazardRegister.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Supervise_UnitHazardRegister.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegisterItem_Register", Storage="_Supervise_UnitHazardRegisterItem", ThisKey="UnitHazardRegisterId", OtherKey="UnitHazardRegisterId", DeleteRule="CASCADE")] + public EntitySet Supervise_UnitHazardRegisterItem + { + get + { + return this._Supervise_UnitHazardRegisterItem; + } + set + { + this._Supervise_UnitHazardRegisterItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Supervise_UnitHazardRegisterItem(Supervise_UnitHazardRegisterItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_UnitHazardRegister = this; + } + + private void detach_Supervise_UnitHazardRegisterItem(Supervise_UnitHazardRegisterItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_UnitHazardRegister = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_UnitHazardRegisterItem")] + public partial class Supervise_UnitHazardRegisterItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _UnitHazardRegisterItemId; + + private string _UnitHazardRegisterId; + + private string _ProblemDescription; + + private string _ProblemType; + + private string _RiskLevel; + + private string _RectifyRequirement; + + private System.Nullable _CompleteStatus; + + private System.Nullable _CompletedDate; + + private System.Nullable _SortIndex; + + private string _RectificationMeasures; + + private System.Nullable _IsUpdate; + + private EntityRef _Supervise_UnitHazardRegister; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnUnitHazardRegisterItemIdChanging(string value); + partial void OnUnitHazardRegisterItemIdChanged(); + partial void OnUnitHazardRegisterIdChanging(string value); + partial void OnUnitHazardRegisterIdChanged(); + partial void OnProblemDescriptionChanging(string value); + partial void OnProblemDescriptionChanged(); + partial void OnProblemTypeChanging(string value); + partial void OnProblemTypeChanged(); + partial void OnRiskLevelChanging(string value); + partial void OnRiskLevelChanged(); + partial void OnRectifyRequirementChanging(string value); + partial void OnRectifyRequirementChanged(); + partial void OnCompleteStatusChanging(System.Nullable value); + partial void OnCompleteStatusChanged(); + partial void OnCompletedDateChanging(System.Nullable value); + partial void OnCompletedDateChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnRectificationMeasuresChanging(string value); + partial void OnRectificationMeasuresChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); + #endregion + + public Supervise_UnitHazardRegisterItem() + { + this._Supervise_UnitHazardRegister = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitHazardRegisterItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string UnitHazardRegisterItemId + { + get + { + return this._UnitHazardRegisterItemId; + } + set + { + if ((this._UnitHazardRegisterItemId != value)) + { + this.OnUnitHazardRegisterItemIdChanging(value); + this.SendPropertyChanging(); + this._UnitHazardRegisterItemId = value; + this.SendPropertyChanged("UnitHazardRegisterItemId"); + this.OnUnitHazardRegisterItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitHazardRegisterId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UnitHazardRegisterId + { + get + { + return this._UnitHazardRegisterId; + } + set + { + if ((this._UnitHazardRegisterId != value)) + { + if (this._Supervise_UnitHazardRegister.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitHazardRegisterIdChanging(value); + this.SendPropertyChanging(); + this._UnitHazardRegisterId = value; + this.SendPropertyChanged("UnitHazardRegisterId"); + this.OnUnitHazardRegisterIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemDescription", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string ProblemDescription + { + get + { + return this._ProblemDescription; + } + set + { + if ((this._ProblemDescription != value)) + { + this.OnProblemDescriptionChanging(value); + this.SendPropertyChanging(); + this._ProblemDescription = value; + this.SendPropertyChanged("ProblemDescription"); + this.OnProblemDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemType", DbType="NVarChar(50)")] + public string ProblemType + { + get + { + return this._ProblemType; + } + set + { + if ((this._ProblemType != value)) + { + this.OnProblemTypeChanging(value); + this.SendPropertyChanging(); + this._ProblemType = value; + this.SendPropertyChanged("ProblemType"); + this.OnProblemTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevel", DbType="NVarChar(50)")] + public string RiskLevel + { + get + { + return this._RiskLevel; + } + set + { + if ((this._RiskLevel != value)) + { + this.OnRiskLevelChanging(value); + this.SendPropertyChanging(); + this._RiskLevel = value; + this.SendPropertyChanged("RiskLevel"); + this.OnRiskLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyRequirement", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string RectifyRequirement + { + get + { + return this._RectifyRequirement; + } + set + { + if ((this._RectifyRequirement != value)) + { + this.OnRectifyRequirementChanging(value); + this.SendPropertyChanging(); + this._RectifyRequirement = value; + this.SendPropertyChanged("RectifyRequirement"); + this.OnRectifyRequirementChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompleteStatus", DbType="Int")] + public System.Nullable CompleteStatus + { + get + { + return this._CompleteStatus; + } + set + { + if ((this._CompleteStatus != value)) + { + this.OnCompleteStatusChanging(value); + this.SendPropertyChanging(); + this._CompleteStatus = value; + this.SendPropertyChanged("CompleteStatus"); + this.OnCompleteStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedDate", DbType="DateTime")] + public System.Nullable CompletedDate + { + get + { + return this._CompletedDate; + } + set + { + if ((this._CompletedDate != value)) + { + this.OnCompletedDateChanging(value); + this.SendPropertyChanging(); + this._CompletedDate = value; + this.SendPropertyChanged("CompletedDate"); + this.OnCompletedDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectificationMeasures", DbType="NVarChar(100)")] + public string RectificationMeasures + { + get + { + return this._RectificationMeasures; + } + set + { + if ((this._RectificationMeasures != value)) + { + this.OnRectificationMeasuresChanging(value); + this.SendPropertyChanging(); + this._RectificationMeasures = value; + this.SendPropertyChanged("RectificationMeasures"); + this.OnRectificationMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_UnitHazardRegisterItem_Register", Storage="_Supervise_UnitHazardRegister", ThisKey="UnitHazardRegisterId", OtherKey="UnitHazardRegisterId", IsForeignKey=true, DeleteOnNull=true)] + public Supervise_UnitHazardRegister Supervise_UnitHazardRegister + { + get + { + return this._Supervise_UnitHazardRegister.Entity; + } + set + { + Supervise_UnitHazardRegister previousValue = this._Supervise_UnitHazardRegister.Entity; + if (((previousValue != value) + || (this._Supervise_UnitHazardRegister.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Supervise_UnitHazardRegister.Entity = null; + previousValue.Supervise_UnitHazardRegisterItem.Remove(this); + } + this._Supervise_UnitHazardRegister.Entity = value; + if ((value != null)) + { + value.Supervise_UnitHazardRegisterItem.Add(this); + this._UnitHazardRegisterId = value.UnitHazardRegisterId; + } + else + { + this._UnitHazardRegisterId = default(string); + } + this.SendPropertyChanged("Supervise_UnitHazardRegister"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_UpCheckReport")] public partial class Supervise_UpCheckReport : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 99feaaf2..4e409fe3 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -297,6 +297,10 @@ + + + + diff --git a/SGGL/Model/ZHGL/UnitHazardRegisterInput.cs b/SGGL/Model/ZHGL/UnitHazardRegisterInput.cs new file mode 100644 index 00000000..28677c19 --- /dev/null +++ b/SGGL/Model/ZHGL/UnitHazardRegisterInput.cs @@ -0,0 +1,30 @@ +using System; + +namespace Model +{ + /// + /// 企业级检查查询条件 + /// + public class UnitHazardRegisterInput + { + /// + /// 检查大类(0=安全,1=质量) + /// + public string CheckMainType { get; set; } + + /// + /// 搜索文本 + /// + public string SearchText { get; set; } + + /// + /// 检查类别 + /// + public string CheckType { get; set; } + + /// + /// 项目ID(权限过滤) + /// + public string ProjectId { get; set; } + } +} diff --git a/SGGL/Model/ZHGL/UnitHazardRegisterItemInput.cs b/SGGL/Model/ZHGL/UnitHazardRegisterItemInput.cs new file mode 100644 index 00000000..e7f18692 --- /dev/null +++ b/SGGL/Model/ZHGL/UnitHazardRegisterItemInput.cs @@ -0,0 +1,63 @@ +using System; + +namespace Model +{ + /// + /// 企业级检查明细查询条件 + /// + public class UnitHazardRegisterItemInput + { + /// + /// 检查大类(0=安全,1=质量) + /// + public string CheckMainType { get; set; } + + /// + /// 检查组/人 + /// + public string CheckTeam { get; set; } + + /// + /// 检查类别 + /// + public string CheckType { get; set; } + + /// + /// 问题描述 + /// + public string Problem { get; set; } + + /// + /// 开始时间 + /// + public DateTime? StartTime { get; set; } + + /// + /// 结束时间 + /// + public DateTime? EndTime { get; set; } + + /// + /// 风险级别 + /// + public string RiskLevel { get; set; } + + /// + /// 状态 + /// + public int? States { get; set; } + /// + /// 问题整改状态 + /// + public int? ProblemStates { get; set; } + + /// + /// 单位ID(权限过滤) + /// + public string UnitId { get; set; } + /// + /// 项目id + /// + public string ProjectId { get; set; } + } +} diff --git a/SGGL/Model/ZHGL/UnitHazardRegisterItemOutput.cs b/SGGL/Model/ZHGL/UnitHazardRegisterItemOutput.cs new file mode 100644 index 00000000..f6176c33 --- /dev/null +++ b/SGGL/Model/ZHGL/UnitHazardRegisterItemOutput.cs @@ -0,0 +1,96 @@ +using System; + +namespace Model +{ + /// + /// 企业级检查明细输出实体 + /// + public class UnitHazardRegisterItemOutput + { + /// + /// 明细ID + /// + public string UnitHazardRegisterItemId { get; set; } + + /// + /// 检查编号 + /// + public string UnitHazardRegisterCode { get; set; } + + /// + /// 检查日期 + /// + public DateTime? CheckDate { get; set; } + + /// + /// 检查大类名称 + /// + public string CheckMainTypeName { get; set; } + + /// + /// 检查类别名称 + /// + public string CheckTypeName { get; set; } + + /// + /// 问题描述 + /// + public string ProblemDescription { get; set; } + + /// + /// 问题类型 + /// + public string ProblemType { get; set; } + + /// + /// 风险级别 + /// + public string RiskLevel { get; set; } + + /// + /// 整改要求 + /// + public string RectifyRequirement { get; set; } + + /// + /// 状态名称 + /// + public string StatesName { get; set; } + + /// + /// 检查组/人 + /// + public string CheckTeam { get; set; } + + /// + /// 检查项目ID + /// + public string ProjectId { get; set; } + + /// + /// 检查单位名称 + /// + public string CheckUnitName { get; set; } + + /// + /// 状态 + /// + public int? States { get; set; } + /// + /// 问题整改状态 + /// + public int? ProblemStates { get; set; } + /// + /// 问题整改状态名称 + /// + public string ProblemStatesName { get; set; } + /// + /// 受检负责人名称 + /// + public string InsResponsibleUserName { get; set; } + /// + /// 受检负责人Id + /// + public string InsResponsibleUserId { get; set; } + } +} diff --git a/SGGL/Model/ZHGL/UnitHazardRegisterOutput.cs b/SGGL/Model/ZHGL/UnitHazardRegisterOutput.cs new file mode 100644 index 00000000..a3bc92bf --- /dev/null +++ b/SGGL/Model/ZHGL/UnitHazardRegisterOutput.cs @@ -0,0 +1,75 @@ +using System; + +namespace Model +{ + /// + /// 企业级检查输出实体 + /// + public class UnitHazardRegisterOutput + { + /// + /// 检查记录ID + /// + public string UnitHazardRegisterId { get; set; } + + /// + /// 检查编号 + /// + public string UnitHazardRegisterCode { get; set; } + + /// + /// 检查日期 + /// + public DateTime? CheckDate { get; set; } + + /// + /// 项目ID + /// + public string ProjectId { get; set; } + + /// + /// 检查大类名称 + /// + public string CheckMainTypeName { get; set; } + + /// + /// 检查类别代码 + /// + public string CheckType { get; set; } + + /// + /// 检查类别名称 + /// + public string CheckTypeName { get; set; } + + /// + /// 检查对象名称 + /// + public string CheckObjectText { get; set; } + + /// + /// 检查单位名称 + /// + public string CheckUnitName { get; set; } + + /// + /// 检查组/人 + /// + public string CheckTeam { get; set; } + + /// + /// 评价结果 + /// + public string EvaluationResult { get; set; } + + /// + /// 状态名称 + /// + public string StatesName { get; set; } + + /// + /// 附件URL + /// + public string AttachUrl { get; set; } + } +} diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index de67e484..0eff82e3 100644 --- a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -6,7 +6,7 @@ <_PublishTargetUrl>G:\发布\五环WebApi - True|2026-03-04T11:14:37.2772043Z||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||; + True|2026-03-06T04:42:13.4499176Z||;True|2026-03-05T15:19:57.4320764+08:00||;True|2026-03-04T19:14:37.2772043+08:00||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||; @@ -86,22 +86,22 @@ 10/28/2024 14:02:50 - 03/04/2026 19:14:36 + 03/06/2026 12:42:12 - 03/04/2026 19:14:36 + 03/06/2026 12:42:12 12/06/2024 20:13:58 - 03/04/2026 19:14:15 + 03/06/2026 12:41:50 12/26/2024 09:46:52 - 03/04/2026 19:14:15 + 03/06/2026 12:41:50 12/18/2020 05:32:28 @@ -128,10 +128,10 @@ 07/25/2012 19:48:56 - 03/04/2026 19:14:07 + 03/06/2026 12:41:43 - 03/04/2026 19:14:07 + 03/06/2026 12:41:43 02/12/2026 19:18:36 @@ -389,13 +389,13 @@ 02/09/2013 00:42:28 - 03/04/2026 19:14:16 + 03/06/2026 12:41:51 - 03/04/2026 19:14:16 + 03/06/2026 12:41:51 - 03/04/2026 19:14:16 + 03/06/2026 12:41:51 01/23/2014 21:57:34 @@ -479,7 +479,7 @@ 10/28/2024 14:02:50 - 03/04/2026 19:14:17 + 03/06/2026 12:41:52 10/28/2024 14:02:50