From d77ccaabd8202bcc8aeee4e5b44806c820d0f956 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Wed, 16 Sep 2026 15:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=AE=A1=E7=90=86=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2026-09-16-xiaj.sql | 10 + SGGL/.gitignore | 5 +- SGGL/BLL/Common/Funs.cs | 4 +- .../SafetyManagementDataService.cs | 12 + SGGL/BLL/SysManage/UnitService.cs | 2 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../SafeEnvBudget/SafetyManagementData.aspx | 196 ++++++----- .../SafetyManagementData.aspx.cs | 332 ++++++++++++++++-- .../SafetyManagementData.aspx.designer.cs | 9 + .../SafetyManagementDataEdit.aspx.cs | 36 +- 10 files changed, 473 insertions(+), 135 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2026-09-16-xiaj.sql diff --git a/DataBase/版本日志/SGGLDB_V2026-09-16-xiaj.sql b/DataBase/版本日志/SGGLDB_V2026-09-16-xiaj.sql new file mode 100644 index 00000000..56f3578b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-09-16-xiaj.sql @@ -0,0 +1,10 @@ + + +update Sys_Menu +set Url='ReportManage/SafeEnvBudget/SafetyManagementData.aspx',SuperMenu='224F8F8B-C5E7-4763-AEE1-1C54909F0C1A',MenuType='Menu_S_Report',IsOffice=1 +where MenuId='25C34386-38FB-4D5D-8AD2-9B72C7F7D4D0' +go +update Sys_Menu +set IsUsed=0 +where MenuId='B2E6FF41-8379-4603-9560-E2DD84080058' +go diff --git a/SGGL/.gitignore b/SGGL/.gitignore index 8d29c616..2e30a95b 100644 --- a/SGGL/.gitignore +++ b/SGGL/.gitignore @@ -259,4 +259,7 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ -*.pyc \ No newline at end of file +*.pyc + +# graphify knowledge graph outputs (large build artifacts + AST cache) +graphify-out/ \ No newline at end of file diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 64ef391b..5114d1fe 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -539,11 +539,11 @@ namespace BLL public static int GetNewIntOrZero(string value) { int revalue = 0; - if (!String.IsNullOrEmpty(value)) + if (!string.IsNullOrEmpty(value)) { try { - revalue = Int32.Parse(value); + revalue = int.Parse(value); } catch (Exception ex) { diff --git a/SGGL/BLL/ReportManage/SafeEnvBudget/SafetyManagementDataService.cs b/SGGL/BLL/ReportManage/SafeEnvBudget/SafetyManagementDataService.cs index ed3259f5..4270ff32 100644 --- a/SGGL/BLL/ReportManage/SafeEnvBudget/SafetyManagementDataService.cs +++ b/SGGL/BLL/ReportManage/SafeEnvBudget/SafetyManagementDataService.cs @@ -248,11 +248,23 @@ namespace BLL /// 根据报告日期获取安全管理数据 /// /// + /// /// /// public static Model.SafetyManagementData GetSafetyManagementDataByReportDate(string projectId, string unitId, DateTime? reportDate) { return Funs.DB.SafetyManagementData.FirstOrDefault(e => e.ProjectId == projectId && e.UnitId == unitId && e.ReportDate == reportDate); } + + /// + /// 根据报告日期获取安全管理数据 + /// + /// + /// + /// + public static Model.SafetyManagementData GetSafetyManagementDataByReportDate(string unitId, DateTime? reportDate) + { + return Funs.DB.SafetyManagementData.FirstOrDefault(e => e.UnitId == unitId && e.ReportDate == reportDate); + } } } diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 7b5d6e77..50db5fdd 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -669,7 +669,7 @@ namespace BLL } /// - /// 根据项目Id获取单位名称下拉选择项 + /// 获取分公司下拉选择项(含总公司) /// /// 下拉框名字 /// 是否显示请选择 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 1c4328fc..e03430d3 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -20383,7 +20383,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx index cf123dcb..a89aeb37 100644 --- a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx +++ b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx @@ -11,6 +11,12 @@ white-space: normal; word-break: break-all; } + /* 增强合计行样式 - 使用多种选择器确保生效 */ + .f-grid-row-summary .f-grid-cell, + .f-grid-summary-row .f-grid-cell-inner { + font-weight: bold !important; + color: red !important; + } @@ -20,13 +26,14 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> + EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom"> + @@ -44,90 +51,85 @@ - + - + - + - - - - + + + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - - - + + + + @@ -136,38 +138,38 @@ - - + + - - + + - - + + - - + + - - + + - - + + @@ -176,38 +178,38 @@ - - + + - - + + - - + + - - + + - - + + - - + + @@ -216,72 +218,72 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - + + + + - + - - + + - - + + - - - + + + - - - + + + diff --git a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.cs index b941fb27..48a8f835 100644 --- a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; @@ -14,20 +15,20 @@ namespace FineUIPro.Web.ReportManage.SafeEnvBudget public partial class SafetyManagementData : PageBase { #region 定义项 - /// - /// 项目id - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } + ///// + ///// 项目id + ///// + //public string ProjectId + //{ + // get + // { + // return (string)ViewState["ProjectId"]; + // } + // set + // { + // ViewState["ProjectId"] = value; + // } + //} #endregion #region 加载页面 @@ -40,13 +41,21 @@ namespace FineUIPro.Web.ReportManage.SafeEnvBudget { if (!IsPostBack) { + this.txtStartTime.Text = string.Format("{0:yyyy-MM}", DateTime.Now); Funs.DropDownPageSize(this.ddlPageSize); - - this.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) - { - this.ProjectId = Request.Params["projectId"]; + ///单位 + UnitService.InitBranchUnitDropDownList(this.drpUnitId, true, true); + if (!string.IsNullOrWhiteSpace(this.CurrUser.UnitId) && this.CurrUser.Base_Unit.IsBranch == true) + {//分公司只能查看本分公司填报数据 + this.drpUnitId.SelectedValue = this.CurrUser.UnitId; + this.drpUnitId.Readonly = true; } + + //this.ProjectId = this.CurrUser.LoginProjectId; + //if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) + //{ + // this.ProjectId = Request.Params["projectId"]; + //} ////权限按钮方法 this.GetButtonPower(); btnNew.OnClientClick = Window1.GetShowReference("SafetyManagementDataEdit.aspx") + "return false;"; @@ -152,9 +161,20 @@ s.CompileMan, s.CompileDate, u.UnitName from SafetyManagementData as s -left join Base_Unit as u on u.UnitId = s.UnitId where s.ProjectId=@projectId "; +left join Base_Unit as u on u.UnitId = s.UnitId where 1=1 ";// s.ProjectId=@projectId List listStr = new List(); - listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + //listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + //if (!string.IsNullOrWhiteSpace(this.CurrUser.UnitId) && this.CurrUser.Base_Unit.IsBranch == true) + //{//分公司人员只能看本分公司单位填报数据 + // string unitId = this.CurrUser.UnitId; + // strSql += " AND s.UnitId=@UnitId"; + // listStr.Add(new SqlParameter("@UnitId", unitId)); + //} + if (!string.IsNullOrEmpty(this.drpUnitId.SelectedValue) && this.drpUnitId.SelectedValue != Const._Null) + { + strSql += " AND s.UnitId=@UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue)); + } if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim())) { strSql += " AND s.ReportDate >= @StartTime"; @@ -181,6 +201,273 @@ left join Base_Unit as u on u.UnitId = s.UnitId where s.ProjectId=@projectId "; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); + + JObject summary = new JObject(); + int ConAndEPCCount = 0; + int SurveyAndDesignCount = 0; + int WorkingHours = 0; + int SafeDrivingMileage = 0; + int SubSupervise_InspectionItems = 0; + int SubSupervise_Inspections = 0; + int SubSupervise_HSE_Total = 0; + int SubSupervise_HSE_Larger = 0; + int SubSupervise_HSE_Generally = 0; + int SubSupervise_HSE_Slight = 0; + int SubSupervise_Quality_Total = 0; + int SubSupervise_Quality_Larger = 0; + int SubSupervise_Quality_Generally = 0; + int SubSupervise_Quality_Slight = 0; + int SubVideo_InspectionItems = 0; + int SubVideo_InspectionsMin = 0; + int SubVideo_HSE_Total = 0; + int SubVideo_HSE_Larger = 0; + int SubVideo_HSE_Generally = 0; + int SubVideo_HSE_Slight = 0; + int SubVideo_Quality_Total = 0; + int SubVideo_Quality_Larger = 0; + int SubVideo_Quality_Generally = 0; + int SubVideo_Quality_Slight = 0; + int HQ_InspectionItems = 0; + int HQ_Inspections = 0; + int HQ_HSE_Total = 0; + int HQ_HSE_Larger = 0; + int HQ_HSE_Generally = 0; + int HQ_HSE_Slight = 0; + int HQ_Quality_Total = 0; + int HQ_Quality_Larger = 0; + int HQ_Quality_Generally = 0; + int HQ_Quality_Slight = 0; + int Quality_Employee_Count = 0; + int Quality_Employee_Score = 0; + int Quality_Contractor_Count = 0; + int Quality_Contractor_Score = 0; + int Quality_Employee_Fine = 0; + int Quality_Employee_FineAmount = 0; + int Quality_Contractor_Fine = 0; + int Quality_Contractor_FineAmount = 0; + int Quality_Contractor_Deduction = 0; + int Quality_Contractor_DeductionAmount = 0; + int Quality_ProjectDepartment_Fine = 0; + int Quality_ProjectDepartment_FineAmount = 0; + int HSE_Employee_Count = 0; + int HSE_Employee_Score = 0; + int HSE_Contractor_Count = 0; + int HSE_Contractor_Score = 0; + int HSE_Employee_Fine = 0; + int HSE_Employee_FineAmount = 0; + int HSE_Contractor_Fine = 0; + int HSE_Contractor_FineAmount = 0; + int HSE_Contractor_Deduction = 0; + int HSE_Contractor_DeductionAmount = 0; + int HSE_ProjectDepartment_Fine = 0; + int HSE_ProjectDepartment_FineAmount = 0; + int LeaderSupervision_HSECheck_Leaders = 0; + int LeaderSupervision_HSECheck_Count = 0; + int LeaderSupervision_HSECheck_Hazards = 0; + int LeaderSupervision_SafetyLectures_Leaders = 0; + int LeaderSupervision_SafetyLectures_Count = 0; + int LeaderSupervision_SafetyLectures_Attendees = 0; + int LeaderSupervision_Activities_Leaders = 0; + int LeaderSupervision_Activities_Count = 0; + int HSEMeasures_OfficesCount = 0; + int HSEMeasures_TrainingBooths = 0; + int HSEMeasures_Toolboxs = 0; + int HSEMeasures_Consultant_Projects = 0; + int HSEMeasures_Consultant_Count = 0; + int HSEMeasures_FiveStar_Star2 = 0; + int HSEMeasures_FiveStar_Star3 = 0; + int HSEMeasures_FiveStar_Star4 = 0; + int HSEMeasures_FiveStar_Star5 = 0; + int HSEMeasures_Contractor_Interviewees = 0; + int HSEMeasures_PilotProject_Headquarters = 0; + int HSEMeasures_PilotProject_Branch = 0; + int Construction_Teams_Totals = 0; + int Construction_Teams_Compliant = 0; + int Construction_ModelTeams_Headquarters = 0; + int Construction_ModelTeams_CPECC = 0; + int Construction_ModelTeams_Group = 0; + int HSETraining_ThreeCategory = 0; + int HSETraining_TrainingPersons = 0; + int HSETraining_ContractorTraining = 0; + + foreach (DataRow row in tb.Rows) + { + ConAndEPCCount += Funs.GetNewIntOrZero(row["ConAndEPCCount"].ToString()); + SurveyAndDesignCount += Funs.GetNewIntOrZero(row["SurveyAndDesignCount"].ToString()); + WorkingHours += Funs.GetNewIntOrZero(row["WorkingHours"].ToString()); + SafeDrivingMileage += Funs.GetNewIntOrZero(row["SafeDrivingMileage"].ToString()); + SubSupervise_InspectionItems += Funs.GetNewIntOrZero(row["SubSupervise_InspectionItems"].ToString()); + SubSupervise_Inspections += Funs.GetNewIntOrZero(row["SubSupervise_Inspections"].ToString()); + SubSupervise_HSE_Total += Funs.GetNewIntOrZero(row["SubSupervise_HSE_Total"].ToString()); + SubSupervise_HSE_Larger += Funs.GetNewIntOrZero(row["SubSupervise_HSE_Larger"].ToString()); + SubSupervise_HSE_Generally += Funs.GetNewIntOrZero(row["SubSupervise_HSE_Generally"].ToString()); + SubSupervise_HSE_Slight += Funs.GetNewIntOrZero(row["SubSupervise_HSE_Slight"].ToString()); + SubSupervise_Quality_Total += Funs.GetNewIntOrZero(row["SubSupervise_Quality_Total"].ToString()); + SubSupervise_Quality_Larger += Funs.GetNewIntOrZero(row["SubSupervise_Quality_Larger"].ToString()); + SubSupervise_Quality_Generally += Funs.GetNewIntOrZero(row["SubSupervise_Quality_Generally"].ToString()); + SubSupervise_Quality_Slight += Funs.GetNewIntOrZero(row["SubSupervise_Quality_Slight"].ToString()); + SubVideo_InspectionItems += Funs.GetNewIntOrZero(row["SubVideo_InspectionItems"].ToString()); + SubVideo_InspectionsMin += Funs.GetNewIntOrZero(row["SubVideo_InspectionsMin"].ToString()); + SubVideo_HSE_Total += Funs.GetNewIntOrZero(row["SubVideo_HSE_Total"].ToString()); + SubVideo_HSE_Larger += Funs.GetNewIntOrZero(row["SubVideo_HSE_Larger"].ToString()); + SubVideo_HSE_Generally += Funs.GetNewIntOrZero(row["SubVideo_HSE_Generally"].ToString()); + SubVideo_HSE_Slight += Funs.GetNewIntOrZero(row["SubVideo_HSE_Slight"].ToString()); + SubVideo_Quality_Total += Funs.GetNewIntOrZero(row["SubVideo_Quality_Total"].ToString()); + SubVideo_Quality_Larger += Funs.GetNewIntOrZero(row["SubVideo_Quality_Larger"].ToString()); + SubVideo_Quality_Generally += Funs.GetNewIntOrZero(row["SubVideo_Quality_Generally"].ToString()); + SubVideo_Quality_Slight += Funs.GetNewIntOrZero(row["SubVideo_Quality_Slight"].ToString()); + HQ_InspectionItems += Funs.GetNewIntOrZero(row["HQ_InspectionItems"].ToString()); + HQ_Inspections += Funs.GetNewIntOrZero(row["HQ_Inspections"].ToString()); + HQ_HSE_Total += Funs.GetNewIntOrZero(row["HQ_HSE_Total"].ToString()); + HQ_HSE_Larger += Funs.GetNewIntOrZero(row["HQ_HSE_Larger"].ToString()); + HQ_HSE_Generally += Funs.GetNewIntOrZero(row["HQ_HSE_Generally"].ToString()); + HQ_HSE_Slight += Funs.GetNewIntOrZero(row["HQ_HSE_Slight"].ToString()); + HQ_Quality_Total += Funs.GetNewIntOrZero(row["HQ_Quality_Total"].ToString()); + HQ_Quality_Larger += Funs.GetNewIntOrZero(row["HQ_Quality_Larger"].ToString()); + HQ_Quality_Generally += Funs.GetNewIntOrZero(row["HQ_Quality_Generally"].ToString()); + HQ_Quality_Slight += Funs.GetNewIntOrZero(row["HQ_Quality_Slight"].ToString()); + Quality_Employee_Count += Funs.GetNewIntOrZero(row["Quality_Employee_Count"].ToString()); + Quality_Employee_Score += Funs.GetNewIntOrZero(row["Quality_Employee_Score"].ToString()); + Quality_Contractor_Count += Funs.GetNewIntOrZero(row["Quality_Contractor_Count"].ToString()); + Quality_Contractor_Score += Funs.GetNewIntOrZero(row["Quality_Contractor_Score"].ToString()); + Quality_Employee_Fine += Funs.GetNewIntOrZero(row["Quality_Employee_Fine"].ToString()); + Quality_Employee_FineAmount += Funs.GetNewIntOrZero(row["Quality_Employee_FineAmount"].ToString()); + Quality_Contractor_Fine += Funs.GetNewIntOrZero(row["Quality_Contractor_Fine"].ToString()); + Quality_Contractor_FineAmount += Funs.GetNewIntOrZero(row["Quality_Contractor_FineAmount"].ToString()); + Quality_Contractor_Deduction += Funs.GetNewIntOrZero(row["Quality_Contractor_Deduction"].ToString()); + Quality_Contractor_DeductionAmount += Funs.GetNewIntOrZero(row["Quality_Contractor_DeductionAmount"].ToString()); + Quality_ProjectDepartment_Fine += Funs.GetNewIntOrZero(row["Quality_ProjectDepartment_Fine"].ToString()); + Quality_ProjectDepartment_FineAmount += Funs.GetNewIntOrZero(row["Quality_ProjectDepartment_FineAmount"].ToString()); + HSE_Employee_Count += Funs.GetNewIntOrZero(row["HSE_Employee_Count"].ToString()); + HSE_Employee_Score += Funs.GetNewIntOrZero(row["HSE_Employee_Score"].ToString()); + HSE_Contractor_Count += Funs.GetNewIntOrZero(row["HSE_Contractor_Count"].ToString()); + HSE_Contractor_Score += Funs.GetNewIntOrZero(row["HSE_Contractor_Score"].ToString()); + HSE_Employee_Fine += Funs.GetNewIntOrZero(row["HSE_Employee_Fine"].ToString()); + HSE_Employee_FineAmount += Funs.GetNewIntOrZero(row["HSE_Employee_FineAmount"].ToString()); + HSE_Contractor_Fine += Funs.GetNewIntOrZero(row["HSE_Contractor_Fine"].ToString()); + HSE_Contractor_FineAmount += Funs.GetNewIntOrZero(row["HSE_Contractor_FineAmount"].ToString()); + HSE_Contractor_Deduction += Funs.GetNewIntOrZero(row["HSE_Contractor_Deduction"].ToString()); + HSE_Contractor_DeductionAmount += Funs.GetNewIntOrZero(row["HSE_Contractor_DeductionAmount"].ToString()); + HSE_ProjectDepartment_Fine += Funs.GetNewIntOrZero(row["HSE_ProjectDepartment_Fine"].ToString()); + HSE_ProjectDepartment_FineAmount += Funs.GetNewIntOrZero(row["HSE_ProjectDepartment_FineAmount"].ToString()); + LeaderSupervision_HSECheck_Leaders += Funs.GetNewIntOrZero(row["LeaderSupervision_HSECheck_Leaders"].ToString()); + LeaderSupervision_HSECheck_Count += Funs.GetNewIntOrZero(row["LeaderSupervision_HSECheck_Count"].ToString()); + LeaderSupervision_HSECheck_Hazards += Funs.GetNewIntOrZero(row["LeaderSupervision_HSECheck_Hazards"].ToString()); + LeaderSupervision_SafetyLectures_Leaders += Funs.GetNewIntOrZero(row["LeaderSupervision_SafetyLectures_Leaders"].ToString()); + LeaderSupervision_SafetyLectures_Count += Funs.GetNewIntOrZero(row["LeaderSupervision_SafetyLectures_Count"].ToString()); + LeaderSupervision_SafetyLectures_Attendees += Funs.GetNewIntOrZero(row["LeaderSupervision_SafetyLectures_Attendees"].ToString()); + LeaderSupervision_Activities_Leaders += Funs.GetNewIntOrZero(row["LeaderSupervision_Activities_Leaders"].ToString()); + LeaderSupervision_Activities_Count += Funs.GetNewIntOrZero(row["LeaderSupervision_Activities_Count"].ToString()); + HSEMeasures_OfficesCount += Funs.GetNewIntOrZero(row["HSEMeasures_OfficesCount"].ToString()); + HSEMeasures_TrainingBooths += Funs.GetNewIntOrZero(row["HSEMeasures_TrainingBooths"].ToString()); + HSEMeasures_Toolboxs += Funs.GetNewIntOrZero(row["HSEMeasures_Toolboxs"].ToString()); + HSEMeasures_Consultant_Projects += Funs.GetNewIntOrZero(row["HSEMeasures_Consultant_Projects"].ToString()); + HSEMeasures_Consultant_Count += Funs.GetNewIntOrZero(row["HSEMeasures_Consultant_Count"].ToString()); + HSEMeasures_FiveStar_Star2 += Funs.GetNewIntOrZero(row["HSEMeasures_FiveStar_Star2"].ToString()); + HSEMeasures_FiveStar_Star3 += Funs.GetNewIntOrZero(row["HSEMeasures_FiveStar_Star3"].ToString()); + HSEMeasures_FiveStar_Star4 += Funs.GetNewIntOrZero(row["HSEMeasures_FiveStar_Star4"].ToString()); + HSEMeasures_FiveStar_Star5 += Funs.GetNewIntOrZero(row["HSEMeasures_FiveStar_Star5"].ToString()); + HSEMeasures_Contractor_Interviewees += Funs.GetNewIntOrZero(row["HSEMeasures_Contractor_Interviewees"].ToString()); + HSEMeasures_PilotProject_Headquarters += Funs.GetNewIntOrZero(row["HSEMeasures_PilotProject_Headquarters"].ToString()); + HSEMeasures_PilotProject_Branch += Funs.GetNewIntOrZero(row["HSEMeasures_PilotProject_Branch"].ToString()); + Construction_Teams_Totals += Funs.GetNewIntOrZero(row["Construction_Teams_Totals"].ToString()); + Construction_Teams_Compliant += Funs.GetNewIntOrZero(row["Construction_Teams_Compliant"].ToString()); + Construction_ModelTeams_Headquarters += Funs.GetNewIntOrZero(row["Construction_ModelTeams_Headquarters"].ToString()); + Construction_ModelTeams_CPECC += Funs.GetNewIntOrZero(row["Construction_ModelTeams_CPECC"].ToString()); + Construction_ModelTeams_Group += Funs.GetNewIntOrZero(row["Construction_ModelTeams_Group"].ToString()); + HSETraining_ThreeCategory += Funs.GetNewIntOrZero(row["HSETraining_ThreeCategory"].ToString()); + HSETraining_TrainingPersons += Funs.GetNewIntOrZero(row["HSETraining_TrainingPersons"].ToString()); + HSETraining_ContractorTraining += Funs.GetNewIntOrZero(row["HSETraining_ContractorTraining"].ToString()); + } + summary.Add("ReportDate", "合计"); + summary.Add("ConAndEPCCount", ConAndEPCCount); + summary.Add("SurveyAndDesignCount", SurveyAndDesignCount); + summary.Add("WorkingHours", WorkingHours); + summary.Add("SafeDrivingMileage", SafeDrivingMileage); + summary.Add("SubSupervise_InspectionItems", SubSupervise_InspectionItems); + summary.Add("SubSupervise_Inspections", SubSupervise_Inspections); + summary.Add("SubSupervise_HSE_Total", SubSupervise_HSE_Total); + summary.Add("SubSupervise_HSE_Larger", SubSupervise_HSE_Larger); + summary.Add("SubSupervise_HSE_Generally", SubSupervise_HSE_Generally); + summary.Add("SubSupervise_HSE_Slight", SubSupervise_HSE_Slight); + summary.Add("SubSupervise_Quality_Total", SubSupervise_Quality_Total); + summary.Add("SubSupervise_Quality_Larger", SubSupervise_Quality_Larger); + summary.Add("SubSupervise_Quality_Generally", SubSupervise_Quality_Generally); + summary.Add("SubSupervise_Quality_Slight", SubSupervise_Quality_Slight); + summary.Add("SubVideo_InspectionItems", SubVideo_InspectionItems); + summary.Add("SubVideo_InspectionsMin", SubVideo_InspectionsMin); + summary.Add("SubVideo_HSE_Total", SubVideo_HSE_Total); + summary.Add("SubVideo_HSE_Larger", SubVideo_HSE_Larger); + summary.Add("SubVideo_HSE_Generally", SubVideo_HSE_Generally); + summary.Add("SubVideo_HSE_Slight", SubVideo_HSE_Slight); + summary.Add("SubVideo_Quality_Total", SubVideo_Quality_Total); + summary.Add("SubVideo_Quality_Larger", SubVideo_Quality_Larger); + summary.Add("SubVideo_Quality_Generally", SubVideo_Quality_Generally); + summary.Add("SubVideo_Quality_Slight", SubVideo_Quality_Slight); + summary.Add("HQ_InspectionItems", HQ_InspectionItems); + summary.Add("HQ_Inspections", HQ_Inspections); + summary.Add("HQ_HSE_Total", HQ_HSE_Total); + summary.Add("HQ_HSE_Larger", HQ_HSE_Larger); + summary.Add("HQ_HSE_Generally", HQ_HSE_Generally); + summary.Add("HQ_HSE_Slight", HQ_HSE_Slight); + summary.Add("HQ_Quality_Total", HQ_Quality_Total); + summary.Add("HQ_Quality_Larger", HQ_Quality_Larger); + summary.Add("HQ_Quality_Generally", HQ_Quality_Generally); + summary.Add("HQ_Quality_Slight", HQ_Quality_Slight); + summary.Add("Quality_Employee_Count", Quality_Employee_Count); + summary.Add("Quality_Employee_Score", Quality_Employee_Score); + summary.Add("Quality_Contractor_Count", Quality_Contractor_Count); + summary.Add("Quality_Contractor_Score", Quality_Contractor_Score); + summary.Add("Quality_Employee_Fine", Quality_Employee_Fine); + summary.Add("Quality_Employee_FineAmount", Quality_Employee_FineAmount); + summary.Add("Quality_Contractor_Fine", Quality_Contractor_Fine); + summary.Add("Quality_Contractor_FineAmount", Quality_Contractor_FineAmount); + summary.Add("Quality_Contractor_Deduction", Quality_Contractor_Deduction); + summary.Add("Quality_Contractor_DeductionAmount", Quality_Contractor_DeductionAmount); + summary.Add("Quality_ProjectDepartment_Fine", Quality_ProjectDepartment_Fine); + summary.Add("Quality_ProjectDepartment_FineAmount", Quality_ProjectDepartment_FineAmount); + summary.Add("HSE_Employee_Count", HSE_Employee_Count); + summary.Add("HSE_Employee_Score", HSE_Employee_Score); + summary.Add("HSE_Contractor_Count", HSE_Contractor_Count); + summary.Add("HSE_Contractor_Score", HSE_Contractor_Score); + summary.Add("HSE_Employee_Fine", HSE_Employee_Fine); + summary.Add("HSE_Employee_FineAmount", HSE_Employee_FineAmount); + summary.Add("HSE_Contractor_Fine", HSE_Contractor_Fine); + summary.Add("HSE_Contractor_FineAmount", HSE_Contractor_FineAmount); + summary.Add("HSE_Contractor_Deduction", HSE_Contractor_Deduction); + summary.Add("HSE_Contractor_DeductionAmount", HSE_Contractor_DeductionAmount); + summary.Add("HSE_ProjectDepartment_Fine", HSE_ProjectDepartment_Fine); + summary.Add("HSE_ProjectDepartment_FineAmount", HSE_ProjectDepartment_FineAmount); + summary.Add("LeaderSupervision_HSECheck_Leaders", LeaderSupervision_HSECheck_Leaders); + summary.Add("LeaderSupervision_HSECheck_Count", LeaderSupervision_HSECheck_Count); + summary.Add("LeaderSupervision_HSECheck_Hazards", LeaderSupervision_HSECheck_Hazards); + summary.Add("LeaderSupervision_SafetyLectures_Leaders", LeaderSupervision_SafetyLectures_Leaders); + summary.Add("LeaderSupervision_SafetyLectures_Count", LeaderSupervision_SafetyLectures_Count); + summary.Add("LeaderSupervision_SafetyLectures_Attendees", LeaderSupervision_SafetyLectures_Attendees); + summary.Add("LeaderSupervision_Activities_Leaders", LeaderSupervision_Activities_Leaders); + summary.Add("LeaderSupervision_Activities_Count", LeaderSupervision_Activities_Count); + summary.Add("HSEMeasures_OfficesCount", HSEMeasures_OfficesCount); + summary.Add("HSEMeasures_TrainingBooths", HSEMeasures_TrainingBooths); + summary.Add("HSEMeasures_Toolboxs", HSEMeasures_Toolboxs); + summary.Add("HSEMeasures_Consultant_Projects", HSEMeasures_Consultant_Projects); + summary.Add("HSEMeasures_Consultant_Count", HSEMeasures_Consultant_Count); + summary.Add("HSEMeasures_FiveStar_Star2", HSEMeasures_FiveStar_Star2); + summary.Add("HSEMeasures_FiveStar_Star3", HSEMeasures_FiveStar_Star3); + summary.Add("HSEMeasures_FiveStar_Star4", HSEMeasures_FiveStar_Star4); + summary.Add("HSEMeasures_FiveStar_Star5", HSEMeasures_FiveStar_Star5); + summary.Add("HSEMeasures_Contractor_Interviewees", HSEMeasures_Contractor_Interviewees); + summary.Add("HSEMeasures_PilotProject_Headquarters", HSEMeasures_PilotProject_Headquarters); + summary.Add("HSEMeasures_PilotProject_Branch", HSEMeasures_PilotProject_Branch); + summary.Add("Construction_Teams_Totals", Construction_Teams_Totals); + summary.Add("Construction_Teams_Compliant", Construction_Teams_Compliant); + summary.Add("Construction_ModelTeams_Headquarters", Construction_ModelTeams_Headquarters); + summary.Add("Construction_ModelTeams_CPECC", Construction_ModelTeams_CPECC); + summary.Add("Construction_ModelTeams_Group", Construction_ModelTeams_Group); + summary.Add("HSETraining_ThreeCategory", HSETraining_ThreeCategory); + summary.Add("HSETraining_TrainingPersons", HSETraining_TrainingPersons); + summary.Add("HSETraining_ContractorTraining", HSETraining_ContractorTraining); + Grid1.SummaryData = summary; + } #endregion @@ -301,7 +588,8 @@ left join Base_Unit as u on u.UnitId = s.UnitId where s.ProjectId=@projectId "; { return; } - var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectSafetyManagementDataMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(null, this.CurrUser.UserId, BLL.Const.ProjectSafetyManagementDataMenuId); + //var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectSafetyManagementDataMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) diff --git a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.designer.cs index a134d79f..04d8a84b 100644 --- a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementData.aspx.designer.cs @@ -59,6 +59,15 @@ namespace FineUIPro.Web.ReportManage.SafeEnvBudget /// protected global::FineUIPro.Toolbar Toolbar2; + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + /// /// txtStartTime 控件。 /// diff --git a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementDataEdit.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementDataEdit.aspx.cs index 1b4efd54..29a2030d 100644 --- a/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementDataEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementDataEdit.aspx.cs @@ -40,18 +40,28 @@ namespace FineUIPro.Web.ReportManage.SafeEnvBudget if (!IsPostBack) { ///单位 - BLL.ProjectUnitService.InitUnitByProjectIdDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + //BLL.ProjectUnitService.InitUnitByProjectIdDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + UnitService.InitBranchUnitDropDownList(this.drpUnitId, true, true); + if (!string.IsNullOrWhiteSpace(this.CurrUser.UnitId) && this.CurrUser.Base_Unit.IsBranch == true) + { + this.drpUnitId.SelectedValue = this.CurrUser.UnitId; + this.drpUnitId.Readonly = true; + } + this.DataId = Request.Params["dataId"]; if (!string.IsNullOrEmpty(this.DataId)) { var data = BLL.SafetyManagementDataService.GetSafetyManagementDataById(this.DataId); if (data != null) { + txtReportDate.Text = data.ReportDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ReportDate) : ""; if (!string.IsNullOrEmpty(data.UnitId)) { this.drpUnitId.SelectedValue = data.UnitId; + this.drpUnitId.Readonly = true; } - txtReportDate.Text = data.ReportDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ReportDate) : ""; + this.txtReportDate.Readonly = true; + txtConAndEPCCount.Text = data.ConAndEPCCount.HasValue ? data.ConAndEPCCount.ToString() : ""; txtSurveyAndDesignCount.Text = data.SurveyAndDesignCount.HasValue ? data.SurveyAndDesignCount.ToString() : ""; txtWorkingHours.Text = data.WorkingHours.HasValue ? data.WorkingHours.ToString() : ""; @@ -157,16 +167,20 @@ namespace FineUIPro.Web.ReportManage.SafeEnvBudget protected void btnSave_Click(object sender, EventArgs e) { DateTime? reportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim()); - var data = BLL.SafetyManagementDataService.GetSafetyManagementDataByReportDate(this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, reportDate); - if (data != null) + if (string.IsNullOrEmpty(this.DataId)) { - Alert.ShowInTop("本月安全管理数据已上报!", MessageBoxIcon.Warning); - return; - } - if (this.drpUnitId.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpUnitId.SelectedValue)) - { - Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning); - return; + var data = BLL.SafetyManagementDataService.GetSafetyManagementDataByReportDate(this.drpUnitId.SelectedValue, reportDate); + //var data = BLL.SafetyManagementDataService.GetSafetyManagementDataByReportDate(this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, reportDate); + if (data != null) + { + Alert.ShowInTop("本月安全管理数据已上报!", MessageBoxIcon.Warning); + return; + } + if (this.drpUnitId.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpUnitId.SelectedValue)) + { + Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning); + return; + } } Model.SafetyManagementData newData = new Model.SafetyManagementData(); newData.UnitId = this.drpUnitId.SelectedValue;