From 855a0d4c4b0f1ab724623224d245137c57317fc9 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Mon, 24 Jul 2023 19:51:54 +0800 Subject: [PATCH] =?UTF-8?q?2023-07-24=20=20=E5=A2=9E=E5=8A=A0=E5=B8=B8?= =?UTF-8?q?=E8=A7=84=E5=B7=A1=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_2023-07-24.sql | 28 +++++++++++++- .../1-3安全管理(Menu_HSSE).sql | 14 ++++++- .../HSSE_Hazard_HazardRegisterService.cs | 3 ++ .../HiddenRectificationAdd.aspx.cs | 38 ++++++++++++++++++- .../HiddenRectificationList.aspx.cs | 25 +++++++++++- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 3 +- SGGL/FineUIPro.Web/common/Menu_TestRun.xml | 1 + 7 files changed, 106 insertions(+), 6 deletions(-) diff --git a/DataBase/版本日志/SGGLDB_WH_2023-07-24.sql b/DataBase/版本日志/SGGLDB_WH_2023-07-24.sql index fd987c22..8bbb0683 100644 --- a/DataBase/版本日志/SGGLDB_WH_2023-07-24.sql +++ b/DataBase/版本日志/SGGLDB_WH_2023-07-24.sql @@ -94,6 +94,32 @@ LEFT JOIN dbo.Sys_User AS User4 ON User4.UserId = Registration.ResponsibleMan2 GO - +delete from Sys_Menu where MenuId='2FC8AA2A-F421-4174-A05E-2711167AF141' +delete from Sys_ButtonToMenu where MenuId='2FC8AA2A-F421-4174-A05E-2711167AF141' +go +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2FC8AA2A-F421-4174-A05E-2711167AF141','HSEѲ','HSSE/HiddenInspection/HiddenRectificationList.aspx?Type=0',10,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E831F780-BDC2-4644-B132-40E27518805E','2FC8AA2A-F421-4174-A05E-2711167AF141','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9112B8B8-50A0-4592-AE06-2AC24E07E20B','2FC8AA2A-F421-4174-A05E-2711167AF141','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3FF03C33-A07D-48CF-A0E2-D7A7542FBD69','2FC8AA2A-F421-4174-A05E-2711167AF141','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('55598440-05EF-4E70-86E6-81317BF19D94','2FC8AA2A-F421-4174-A05E-2711167AF141','',4) + GO +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('379555F6-BECF-4E87-8F1C-73F529D260FF','Ѳ','HSSE/HiddenInspection/HiddenRectificationList.aspx?Type=1',15,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1B39CEAF-EA02-4053-A767-A8F1CFE75CED','379555F6-BECF-4E87-8F1C-73F529D260FF','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3C6AAA2F-30A5-4785-A7B3-0E4CE3E7FB30','379555F6-BECF-4E87-8F1C-73F529D260FF','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2227CD60-EAD8-4B7B-9FFE-B6B7A1B8DC82','379555F6-BECF-4E87-8F1C-73F529D260FF','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('681D60A9-8D04-4EA9-B899-42C925A29134','379555F6-BECF-4E87-8F1C-73F529D260FF','',4) + GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql index 44450c74..95b39f1d 100644 --- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql +++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql @@ -563,7 +563,7 @@ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffi VALUES('467A0CB9-737D-4451-965E-869EBC3A4BD6','HSE','',100,'0','Menu_HSSE',0,0,1) GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('2FC8AA2A-F421-4174-A05E-2711167AF141','HSEѲ','HSSE/HiddenInspection/HiddenRectificationList.aspx',10,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) + VALUES('2FC8AA2A-F421-4174-A05E-2711167AF141','HSEѲ','HSSE/HiddenInspection/HiddenRectificationList.aspx?Type=0',10,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) GO INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('E831F780-BDC2-4644-B132-40E27518805E','2FC8AA2A-F421-4174-A05E-2711167AF141','',1) @@ -574,6 +574,18 @@ GO INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('55598440-05EF-4E70-86E6-81317BF19D94','2FC8AA2A-F421-4174-A05E-2711167AF141','',4) GO +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('379555F6-BECF-4E87-8F1C-73F529D260FF','Ѳ','HSSE/HiddenInspection/HiddenRectificationList.aspx?Type=1',15,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1B39CEAF-EA02-4053-A767-A8F1CFE75CED','379555F6-BECF-4E87-8F1C-73F529D260FF','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3C6AAA2F-30A5-4785-A7B3-0E4CE3E7FB30','379555F6-BECF-4E87-8F1C-73F529D260FF','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2227CD60-EAD8-4B7B-9FFE-B6B7A1B8DC82','379555F6-BECF-4E87-8F1C-73F529D260FF','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('681D60A9-8D04-4EA9-B899-42C925A29134','379555F6-BECF-4E87-8F1C-73F529D260FF','',4) + GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('0E30F917-0C51-4C45-BD19-981039CA44F5','ճѲ','HSSE/Check/CheckDayWH.aspx',15,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index f0b80b7e..32b84e41 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -69,6 +69,7 @@ namespace BLL newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes; newHazardRegister.DIC_ID = hazardRegister.DIC_ID; newHazardRegister.Risk_Level = hazardRegister.Risk_Level; + newHazardRegister.Type=hazardRegister.Type; db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister); db.SubmitChanges(); } @@ -109,6 +110,8 @@ namespace BLL newHazardRegister.CutPayment = hazardRegister.CutPayment; newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes; newHazardRegister.DIC_ID = hazardRegister.DIC_ID; + newHazardRegister.Type = hazardRegister.Type; + //把附件表的路径复制过来 Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId); if (file != null) diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs index 26e50219..5fcd8a07 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs @@ -51,6 +51,21 @@ namespace FineUIPro.Web.HSSE.HiddenInspection ViewState["RectificationImageUrl"] = value; } } + /// + /// 巡检类型 0 日常 1 常规 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + + } + } #endregion #region 加载 @@ -65,6 +80,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (!IsPostBack) { + Type = Request.Params["Type"]; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); @@ -73,7 +90,16 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.drpRegisterTypes.DataTextField = "RegisterTypesName"; this.drpRegisterTypes.DataValueField = "RegisterTypesId"; - this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型 + if (Type=="1") + { + this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("4"); //安全巡检类型 + + } + else + { + this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型 + + } this.drpRegisterTypes.DataBind(); this.HazardRegisterId = Request.Params["HazardRegisterId"]; //新增初始化 @@ -220,6 +246,16 @@ namespace FineUIPro.Web.HSSE.HiddenInspection register.CheckCycle = this.ckType.SelectedValue; register.Risk_Level = this.dpRiskLevel.SelectedText; register.IsEffective = "1"; + var RegisterTypesDt =BLL.HSSE_Hazard_HazardRegisterTypesService.GetTitleByRegisterTypesId(register.RegisterTypesId); + if (RegisterTypesDt != null && RegisterTypesDt .HazardRegisterType=="4") + { + register.Type = 1; //常规巡检 + + } + else + { + register.Type = 0; //日常巡检 + } if (this.drpUnit.SelectedValue != BLL.Const._Null) { register.ResponsibleUnit = this.drpUnit.SelectedValue; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs index 9fc668b8..2a914fa9 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs @@ -26,6 +26,21 @@ namespace FineUIPro.Web.HSSE.HiddenInspection ViewState["ItemSelectedList"] = value; } } + /// + /// 巡检类型 0 日常 1 常规 + /// + public string Type + { + get + { + return (string )ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + + } + } #endregion #region 加载页面 @@ -38,6 +53,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (!IsPostBack) { + Type = Request.Params["Type"]; Funs.DropDownPageSize(this.ddlPageSize); GetButtonPower(); this.ItemSelectedList = new List(); @@ -64,6 +80,11 @@ namespace FineUIPro.Web.HSSE.HiddenInspection strSql += " AND ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); } + if (!string.IsNullOrEmpty(Type)) + { + strSql += " AND Type = @Type"; + listStr.Add(new SqlParameter("@Type", Type)); + } if (!string.IsNullOrEmpty(this.txtCheckMan.Text.Trim())) { strSql += " AND CheckManName LIKE @CheckMan"; @@ -235,7 +256,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以在整改前继续编辑 { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}&&Type={1}", RegistrationId,Type, "编辑 - "))); } else { @@ -350,7 +371,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd)) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx", "登记 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?Type={0}",Type, "登记 - "))); } else { diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 104c618c..fb57c3a1 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -51,7 +51,8 @@ - + + diff --git a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml index f729c2a2..f4b1443c 100644 --- a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml +++ b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml @@ -37,6 +37,7 @@ +