diff --git a/DataBase/版本日志/SGGLDB_V2024-05-22.sql b/DataBase/版本日志/SGGLDB_V2024-05-22.sql new file mode 100644 index 00000000..eb917d76 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-05-22.sql @@ -0,0 +1,4 @@ +alter table Check_RectifyNotices add ControlId nvarchar(50) +GO +alter table HSSE_Hazard_HazardRegister add ControlId nvarchar(50) +GO \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Check/RectifyNoticesService.cs b/SGGL/BLL/HSSE/Check/RectifyNoticesService.cs index c853d18b..d3b97e59 100644 --- a/SGGL/BLL/HSSE/Check/RectifyNoticesService.cs +++ b/SGGL/BLL/HSSE/Check/RectifyNoticesService.cs @@ -58,6 +58,7 @@ namespace BLL Isprint = rectifyNotice.Isprint, Isprintf = rectifyNotice.Isprintf, States = rectifyNotice.States, + ControlId = rectifyNotice.ControlId, }; db.Check_RectifyNotices.InsertOnSubmit(newRectifyNotices); db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index 9638c7ae..8bfa89c3 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -25,7 +25,7 @@ namespace BLL /// private static IQueryable getDataLists = from x in db.View_Hazard_HazardRegisterList where x.ProblemTypes == "1" - select x; + select x; /// /// @@ -45,7 +45,7 @@ namespace BLL /// /// public static IEnumerable getListData(string projectId, string checkMan, string type, string workAreaName, string responsibilityUnitName, DateTime? startTime, DateTime? endTime, DateTime? startRectificationTime, DateTime? endRectificationTime - ,string states, string personId, string unitId, Grid Grid1) + , string states, string personId, string unitId, Grid Grid1) { IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projectId)) @@ -93,7 +93,7 @@ namespace BLL } if (!CommonService.IsMainUnitOrAdmin(personId)) - { + { getDataList = getDataList.Where(e => e.ResponsibleUnit == unitId || e.SendUnitId == unitId); } @@ -194,7 +194,7 @@ namespace BLL WorkPackageId = hazardRegister.WorkPackageId, WorkPackageName = hazardRegister.WorkPackageName, - + ControlId = hazardRegister.ControlId, }; db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister); db.SubmitChanges(); diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs index 30d16462..b1e2bf8e 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/TestPlanEdit.aspx.cs @@ -48,7 +48,7 @@ namespace FineUIPro.Web.CQMS.PersonManage { this.drpWelder.DataTextField = "PersonName"; this.drpWelder.DataValueField = "PersonId"; - this.drpWelder.DataSource = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.IsWeldAudit == true && x.IsWeldOK == null select x).ToList(); + this.drpWelder.DataSource = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.IsWeldAudit == true select x).ToList(); this.drpWelder.DataBind(); Funs.FineUIPleaseSelect(this.drpWelder); TestPlanId = Request.Params["TestPlanId"]; diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAdd.aspx.cs index a2e9ea9b..9edad596 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAdd.aspx.cs @@ -318,6 +318,7 @@ namespace FineUIPro.Web.HSSE.Check else { this.RectifyNoticesId = newRectifyNotices.RectifyNoticesId = SQLHelper.GetNewID(); + newRectifyNotices.ControlId = Request.Params["ControlId"]; RectifyNoticesService.AddRectifyNotices(newRectifyNotices); } if (saveType == Const.BtnSubmit) diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesRecheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesRecheck.aspx.cs index ba171362..3d2e6138 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesRecheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesRecheck.aspx.cs @@ -266,6 +266,16 @@ namespace FineUIPro.Web.HSSE.Check //// 根据明细ID判断是否全部整改完成 并更新专项检查状态 Check_CheckSpecialService.UpdateCheckSpecialStates(getcheck.FirstOrDefault().CheckSpecialId); } + // 回写施工作业风险 + if (!string.IsNullOrEmpty(getRectifyNotices.ControlId)) + { + var constructionRiskControl = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x => x.ControlId == getRectifyNotices.ControlId); + if (constructionRiskControl != null) + { + constructionRiskControl.CheckResult = "符合"; + Funs.DB.SubmitChanges(); + } + } } else { diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx index 9caa4eb3..d1c61926 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx @@ -30,14 +30,14 @@ TitleToolTip="施工作业风险" AutoScroll="true"> - @@ -79,7 +79,7 @@ SortField="RiskLevel" FieldType="String" HeaderText="风险等级" TextAlign="Left" HeaderTextAlign="Center"> - @@ -87,7 +87,10 @@ SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Left"> - + + diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs index bf9405d1..d1562096 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs @@ -183,9 +183,9 @@ namespace FineUIPro.Web.HSSE.Hazard { if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.NodeID.Contains("|")) { - var ids= this.tvControlItem.SelectedNode.NodeID.Split('|'); + var ids = this.tvControlItem.SelectedNode.NodeID.Split('|'); string strSql = @"select c.UnitWorkName, '' Id,* - ,(CASE WHEN a.States = " + BLL.Const.State_3 + " THEN '审核/审批完成' when a.States = " + BLL.Const.State_0 + " OR a.States IS NULL THEN '待提交' WHEN a.States = " + BLL.Const.State_2 + " THEN '待总包安全经理审核' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName" + ,b.CheckResult,(CASE WHEN a.States = " + BLL.Const.State_3 + " THEN '审核/审批完成' when a.States = " + BLL.Const.State_0 + " OR a.States IS NULL THEN '待提交' WHEN a.States = " + BLL.Const.State_2 + " THEN '待总包安全经理审核' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName" + @" from [dbo].[HSSE_ConstructionRisk] a left join [dbo].[HSSE_ConstructionRiskControl] b on a.ConstructionRiskId =b.ConstructionRiskId left join WBS_UnitWork c on a.WorkAreaId = c.UnitWorkId LEFT JOIN Sys_FlowOperate AS FlowOperate ON a.ConstructionRiskId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1 @@ -193,18 +193,23 @@ namespace FineUIPro.Web.HSSE.Hazard where a.UnitId=@UnitId and a.DateWeek=@DateWeek order by a.[ConstructionContent],b.[ShowIndex]"; List listStr = new List(); listStr.Add(new SqlParameter("@UnitId", ids[0])); - listStr.Add(new SqlParameter("@DateWeek", ids[1])); + listStr.Add(new SqlParameter("@DateWeek", ids[1])); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - foreach(DataRow row in tb.Rows) + foreach (DataRow row in tb.Rows) { - row["Id"] = row["ConstructionRiskId"] +"|"+ row["ControlId"]; + row["Id"] = row["ConstructionRiskId"] + "|" + row["ControlId"]; } - + Grid1.DataSource = tb; Grid1.DataBind(); } + else + { + Grid1.DataSource = null; + Grid1.DataBind(); + } } #region 绑定树节点 /// @@ -286,13 +291,31 @@ namespace FineUIPro.Web.HSSE.Hazard protected void btnAudit_Click(object sender, EventArgs e) { - - var risks = Funs.DB.HSSE_ConstructionRisk.Where(x => x.States == "2"); - foreach (var r in risks) + //if (Grid1.SelectedRowIndexArray.Length == 0) + //{ + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + //} + //foreach (int rowIndex in Grid1.SelectedRowIndexArray) + //{ + // string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + // var ids = rowID.Split('|'); + // if (ids.Length >= 1) + // { + // var r = Funs.DB.HSSE_ConstructionRisk.FirstOrDefault(x => x.ConstructionRiskId == ids[0]); + // if (r != null && r.States == "2") + // { + // r.States = "3"; + // } + // } + //} + var r = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId==this.CurrUser.LoginProjectId && x.States == "2"); + foreach (var item in r) { - r.States = "3"; + item.States = "3"; } Funs.DB.SubmitChanges(); + BindGrid(); } #region 点击TreeView diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs index 02bdea89..96ecffbf 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskControlCheck.aspx.cs @@ -97,6 +97,7 @@ namespace FineUIPro.Web.HSSE.Hazard if (newconstructionRisk != null) { + newconstructionRisk.CheckMan = this.CurrUser.PersonId; newconstructionRisk.CheckResult = rbCheckResult.SelectedValue; newconstructionRisk.Rectification = rbRectification.SelectedValue; } diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskEdit.aspx index 2d2eafb9..352c8a9c 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRiskEdit.aspx @@ -54,10 +54,10 @@ - - - - + + + + @@ -96,7 +96,7 @@ - diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs index a929b2c0..f9100296 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs @@ -32,7 +32,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection ViewState["ControlId"] = value; } } - + /// /// 图片路径 /// @@ -299,6 +299,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection register.HazardRegisterId = SQLHelper.GetNewID(); HazardRegisterId = register.HazardRegisterId; register.CheckTime = DateTime.Now; + register.ControlId = Request.Params["ControlId"]; BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register); BLL.LogService.AddSys_Log(this.CurrUser, register.HazardCode, register.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnAdd); } diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs index d4dd8e3d..59e170e2 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs @@ -140,6 +140,16 @@ namespace FineUIPro.Web.HSSE.HiddenInspection if (this.ckConfirm.SelectedValue == "True") //通过 { register.States = "3"; //已闭环 + // 回写施工作业风险 + if (!string.IsNullOrEmpty(register.ControlId)) + { + var constructionRiskControl = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x => x.ControlId == register.ControlId); + if (constructionRiskControl != null) + { + constructionRiskControl.CheckResult = "符合"; + Funs.DB.SubmitChanges(); + } + } } else //未通过 { diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml index bb7a7a34..b532a9bb 100644 --- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml +++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml @@ -1,51 +1,9 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -58,15 +16,12 @@ - - - - - - - - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 89357168..b428bd9e 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -14,7 +14,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index c4548b8a..e905f42f 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -54,6 +54,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index 129ab5fd..95eeab91 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -1,8 +1,8 @@  - - - + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index fd6a0762..8d4aa005 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,11 +1,7 @@  - + - - - - \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index 5fcd6c9d..cdade489 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -4,10 +4,10 @@ + - diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 2e2dc1ed..ac07e539 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -48,7 +48,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 5f619b70..3ae7afd8 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -53505,6 +53505,8 @@ namespace Model private string _Isprintf; + private string _ControlId; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -53611,6 +53613,8 @@ namespace Model partial void OnIsprintChanged(); partial void OnIsprintfChanging(string value); partial void OnIsprintfChanged(); + partial void OnControlIdChanging(string value); + partial void OnControlIdChanged(); #endregion public Check_RectifyNotices() @@ -54450,6 +54454,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ControlId", DbType="NVarChar(50)")] + public string ControlId + { + get + { + return this._ControlId; + } + set + { + if ((this._ControlId != value)) + { + this.OnControlIdChanging(value); + this.SendPropertyChanging(); + this._ControlId = value; + this.SendPropertyChanged("ControlId"); + this.OnControlIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_RectifyNotices_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -101575,6 +101599,8 @@ namespace Model private string _WorkPackageName; + private string _ControlId; + private EntityRef _Base_Unit; private EntityRef _HSSE_Hazard_HazardRegisterTypes; @@ -101679,6 +101705,8 @@ namespace Model partial void OnWorkPackageIdChanged(); partial void OnWorkPackageNameChanging(string value); partial void OnWorkPackageNameChanged(); + partial void OnControlIdChanging(string value); + partial void OnControlIdChanged(); #endregion public HSSE_Hazard_HazardRegister() @@ -102656,6 +102684,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ControlId", DbType="NVarChar(50)")] + public string ControlId + { + get + { + return this._ControlId; + } + set + { + if ((this._ControlId != value)) + { + this.OnControlIdChanging(value); + this.SendPropertyChanging(); + this._ControlId = value; + this.SendPropertyChanged("ControlId"); + this.OnControlIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit {