diff --git a/DataBase/版本日志/SUBQHSE_V2025-03-25-geh.sql b/DataBase/版本日志/SUBQHSE_V2025-03-25-geh.sql index 95c7713c..a28380e3 100644 --- a/DataBase/版本日志/SUBQHSE_V2025-03-25-geh.sql +++ b/DataBase/版本日志/SUBQHSE_V2025-03-25-geh.sql @@ -1,4 +1,13 @@ + +ALTER TABLE Solution_LargerHazard +ADD CONSTRAINT DF_Solution_LargerHazard_TrainPersonNum DEFAULT 0 FOR TrainPersonNum; +go +ALTER TABLE Comprehensive_MajorPlanApproval +ADD CONSTRAINT DF_Comprehensive_MajorPlanApproval_TrainPersonNum DEFAULT 0 FOR TrainPersonNum; +go + + ALTER TABLE Solution_LargerHazard ALTER COLUMN Address nvarchar(500); go diff --git a/DataBase/版本日志/SUBQHSE_V2025-03-26-geh.sql b/DataBase/版本日志/SUBQHSE_V2025-03-26-geh.sql new file mode 100644 index 00000000..2f2c435a --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2025-03-26-geh.sql @@ -0,0 +1,5 @@ +UPDATE [dbo].[HSSE_Hazard_HazardRegister] SET [Risk_Level] = '一般' WHERE Risk_Level is null or Risk_Level = ''; +go + +UPDATE [dbo].[HSSE_Hazard_HazardRegister] SET [ProblemTypes] = '0' WHERE ProblemTypes is null or Risk_Level = ''; +go \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 9a04a61c..5bbd5c0a 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4811,7 +4811,7 @@ namespace BLL /// /// 关键事项模板文件原始虚拟路径 /// - public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项.xlsx"; + public const string GJSXOutTemplateUrl = "File\\Excel\\DataOut\\关键事项跟踪一览表.xlsx"; #endregion #endregion diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 8721a6eb..1cfd69fd 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -1250,6 +1250,59 @@ namespace BLL //return TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)).AddSeconds(timestamp); } + #region ȥ + + /// + /// ȥ + /// + /// + /// + public static string RemoveZero(string sResult) + { + if (sResult.IndexOf(".") < 0) + return sResult; + int iIndex = sResult.Length - 1; + for (int i = sResult.Length - 1; i >= 0; i--) + { + if (sResult.Substring(i, 1) != "0") + { + iIndex = i; + break; + } + } + sResult = sResult.Substring(0, iIndex + 1); + if (sResult.EndsWith(".")) + sResult = sResult.Substring(0, sResult.Length - 1); + return sResult; + } + + /// + /// ȥ + /// + /// + /// + public static string RemoveZero(decimal dValue) + { + string sResult = dValue.ToString(); + if (sResult.IndexOf(".") < 0) + return sResult; + int iIndex = sResult.Length - 1; + for (int i = sResult.Length - 1; i >= 0; i--) + { + if (sResult.Substring(i, 1) != "0") + { + iIndex = i; + break; + } + } + sResult = sResult.Substring(0, iIndex + 1); + if (sResult.EndsWith(".")) + sResult = sResult.Substring(0, sResult.Length - 1); + return sResult; + } + + #endregion + public static string RequestGet(string Baseurl, string Token) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index 9bc32644..bd63ce76 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -113,7 +113,7 @@ namespace BLL newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes; newHazardRegister.DIC_ID = hazardRegister.DIC_ID; newHazardRegister.Type = hazardRegister.Type; - + newHazardRegister.Risk_Level = hazardRegister.Risk_Level; newHazardRegister.HiddenType = hazardRegister.HiddenType; //把附件表的路径复制过来 Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId); diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx index 3e0b1e97..6a7d2faa 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx @@ -1352,4 +1352,8 @@ Completion status of weekly plan 周计划完成情况 + + Completion status of engineering quantity + 工程量完成情况 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx index c8074f33..6d3f1356 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx @@ -1197,4 +1197,7 @@ 周计划完成情况 + + 工程量完成情况 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx index 0d494478..12f7a492 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx @@ -1194,4 +1194,7 @@ 周计划完成情况 + + 工程量完成情况 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs b/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs index 585e3016..e202957b 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs @@ -1185,6 +1185,15 @@ namespace Resources { } } + /// + /// 查找类似 工程量完成情况 的本地化字符串。 + /// + internal static string mainProject2_QuantityDone { + get { + return ResourceManager.GetString("mainProject2_QuantityDone", resourceCulture); + } + } + /// /// 查找类似 质量安全预警 的本地化字符串。 /// @@ -3067,7 +3076,7 @@ namespace Resources { } /// - /// 查找类似 欢迎回来 的本地化字符串。 + /// 查找类似 欢迎回来 的本地化字符串。 /// internal static string String1 { get { @@ -3076,7 +3085,7 @@ namespace Resources { } /// - /// 查找类似 分包管理 的本地化字符串。 + /// 查找类似 分包管理 的本地化字符串。 /// internal static string SubManagement { get { @@ -3256,7 +3265,7 @@ namespace Resources { } /// - /// 查找类似 欢迎回来 的本地化字符串。 + /// 查找类似 欢迎回来 的本地化字符串。 /// internal static string Welcome { get { @@ -3265,7 +3274,7 @@ namespace Resources { } /// - /// 查找类似 焊接管理 的本地化字符串。 + /// 查找类似 焊接管理 的本地化字符串。 /// internal static string WeldingManage { get { diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs index b21e65c2..2b098ccf 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs @@ -2867,7 +2867,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } SaveMethod(); - ShowNotify("保存成功!", MessageBoxIcon.Success); + //ShowNotify("保存成功!", MessageBoxIcon.Success); //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); //Model.Report_WeekAndMonthReport_New weekAndMonthReport = WeekAndMonthReportNewService.Detail(this.ReportId); @@ -3147,14 +3147,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew saveTxtContent(); #endregion + bool save = false; if (AddOrUpdate == "add") { + save = true; WeekAndMonthReportNewService.Insert(report); } else { + save = true; WeekAndMonthReportNewService.Update(report); } + if (save) + { + ShowNotify("保存成功!", MessageBoxIcon.Success); + } } #region 保存本月质量目标管理情况 diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs index f40ecda1..d7f72a25 100644 --- a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs @@ -74,7 +74,7 @@ namespace FineUIPro.Web.DataShow from EduTrain_TrainRecord AS TrainRecord LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId - + where Project.ProjectState ='1' UNION ALL select @@ -91,7 +91,7 @@ namespace FineUIPro.Web.DataShow TrainDepart as UnitName From Bo_Sheng_Train F LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId - )f WHERE 1=1 "; + )f WHERE 1=1 and Project.ProjectState ='1' "; #region 总数 var strSqlSum = @"select Count(*)as allCount from( @@ -112,7 +112,7 @@ namespace FineUIPro.Web.DataShow from EduTrain_TrainRecord AS TrainRecord LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId - + where Project.ProjectState ='1' UNION ALL select @@ -129,7 +129,7 @@ namespace FineUIPro.Web.DataShow TrainDepart as UnitName From Bo_Sheng_Train F LEFT JOIN Base_Project AS Project ON F.ProjectId=Project.ProjectId - )f WHERE 1=1"; + )f WHERE 1=1 and Project.ProjectState ='1'" ; #endregion if (this.drpProject.SelectedValue != Const._Null) diff --git a/SGGL/FineUIPro.Web/DataShow/Person1.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Person1.aspx.cs index 292f2d1b..aefd1a78 100644 --- a/SGGL/FineUIPro.Web/DataShow/Person1.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Person1.aspx.cs @@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow -where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) "; +where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and Project.ProjectState ='1'"; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/DataShow/Person2.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Person2.aspx.cs index bde213cd..e014510a 100644 --- a/SGGL/FineUIPro.Web/DataShow/Person2.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Person2.aspx.cs @@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow -where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and (WorkPost.PostType is null or WorkPost.PostType!='1') "; +where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and (WorkPost.PostType is null or WorkPost.PostType!='1') and Project.ProjectState ='1'"; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/DataShow/Person3.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Person3.aspx.cs index bda66e82..fc16a286 100644 --- a/SGGL/FineUIPro.Web/DataShow/Person3.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Person3.aspx.cs @@ -41,7 +41,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId WHERE Person.PersonId in (select distinct PersonId from SitePerson_PersonInOutNow -where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and WorkPost.PostType='1' "; +where CONVERT(VARCHAR(10), GETDATE(), 23)=CONVERT(VARCHAR(10), ChangeTime, 23)) and WorkPost.PostType='1' and Project.ProjectState ='1'"; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs index 878dadc8..7026ead6 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs @@ -61,7 +61,7 @@ namespace FineUIPro.Web.DataShow FROM SitePerson_Person AS Person LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId - LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE Person.IsUsed=1 and WorkPost.IsCQMS=1 "; + LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE Person.IsUsed=1 and WorkPost.IsCQMS=1 and Project.ProjectState ='1'"; if (this.drpProject.SelectedValue != Const._Null) { strSql += " AND Person.ProjectId = @ProjectId"; diff --git a/SGGL/FineUIPro.Web/DataShow/SafePerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SafePerson.aspx.cs index 9b40d41a..0f966f1c 100644 --- a/SGGL/FineUIPro.Web/DataShow/SafePerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SafePerson.aspx.cs @@ -40,7 +40,7 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId - WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) "; + WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) and Project.ProjectState ='1' "; List listStr = new List(); if (this.drpProject.SelectedValue != Const._Null) { diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项.xlsx deleted file mode 100644 index 2eb95b5a..00000000 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项.xlsx and /dev/null differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项跟踪一览表.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项跟踪一览表.xlsx new file mode 100644 index 00000000..c0a9a83a Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/关键事项跟踪一览表.xlsx differ diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx.cs index 5ebbdec8..51b87fa7 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx.cs @@ -535,22 +535,31 @@ namespace FineUIPro.Web.PZHGL.GJSX cell.CellStyle = cellStyle; cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString()); cell = row.CreateCell(6); - var stateCellStyle = cellStyle; - //if (state == "0") - //{ - // stateCellStyle.FillForegroundColor = IndexedColors.Green.Index; - // //stateCellStyle.FillBackgroundColor = IndexedColors.Green.Index; - //} - //else if (state == "2" || state == "3") - //{ - // //stateCellStyle.FillForegroundColor = IndexedColors.Blue.Index; - // stateCellStyle.FillBackgroundColor = IndexedColors.Blue.Index; - //} - //else if (state == "4") - //{ - // //stateCellStyle.FillForegroundColor = IndexedColors.Red.Index; - // stateCellStyle.FillBackgroundColor = IndexedColors.Red.Index; - //} + + NPOI.SS.UserModel.ICellStyle stateCellStyle = workbook.CreateCellStyle(); + stateCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + stateCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + stateCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + stateCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + stateCellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + stateCellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + stateCellStyle.WrapText = true; + stateCellStyle.SetFont(font); + if (state == "0") + { + stateCellStyle.FillForegroundColor = IndexedColors.Green.Index; + stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式 + } + else if (state == "2" || state == "3") + { + stateCellStyle.FillForegroundColor = IndexedColors.SkyBlue.Index; + stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式 + } + else if (state == "4") + { + stateCellStyle.FillForegroundColor = IndexedColors.Red.Index; + stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式 + } cell.CellStyle = stateCellStyle; cell.SetCellValue(tb.Rows[j]["StateStr"].ToString()); cell = row.CreateCell(7); diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx b/SGGL/FineUIPro.Web/common/mainProject2.aspx index 08d48f27..37f61472 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx @@ -393,6 +393,9 @@
+
+ +
@@ -698,6 +701,7 @@ function jdtjOnclick(objval) { if (objval == 1) { $("#span_jdtj").removeClass("jdtj-btn-act"); + $("#span_quantityDoneJdtj").removeClass("jdtj-btn-act"); $("#span_weekJdtj").addClass("jdtj-btn-act"); $("#span_monthJdtj").removeClass("jdtj-btn-act"); $("#jdtj-content").show(); @@ -706,14 +710,25 @@ $("#div_jdtjList").html('<%=WeekJdtjHtml%>'); } else if (objval == 2) { $("#span_jdtj").removeClass("jdtj-btn-act"); + $("#span_quantityDoneJdtj").removeClass("jdtj-btn-act"); $("#span_weekJdtj").removeClass("jdtj-btn-act"); $("#span_monthJdtj").addClass("jdtj-btn-act"); $("#jdtj-content").show(); $("#left_one").hide(); $("#div_jdtjHead").html('<%=MonthJdtjHead%>'); $("#div_jdtjList").html('<%=MonthJdtjHtml%>'); + } else if (objval == 3) { + $("#span_jdtj").removeClass("jdtj-btn-act"); + $("#span_quantityDoneJdtj").addClass("jdtj-btn-act"); + $("#span_weekJdtj").removeClass("jdtj-btn-act"); + $("#span_monthJdtj").removeClass("jdtj-btn-act"); + $("#jdtj-content").show(); + $("#left_one").hide(); + $("#div_jdtjHead").html('<%=QuantityDoneJdtjHead%>'); + $("#div_jdtjList").html('<%=QuantityDoneJdtjHtml%>'); } else { $("#span_jdtj").addClass("jdtj-btn-act"); + $("#span_quantityDoneJdtj").removeClass("jdtj-btn-act"); $("#span_weekJdtj").removeClass("jdtj-btn-act"); $("#span_monthJdtj").removeClass("jdtj-btn-act"); $("#jdtj-content").hide(); diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs index e853eead..f42cbee1 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs @@ -109,6 +109,7 @@ namespace FineUIPro.Web.common var personTask = GetPersonAsync(); var weekJdtjTask = GetWeekJDAsync(); var monthJdtjTask = GetMonthJDAsync(); + var quantityDoneJDTask = GetQuantityDoneJDAsync(); var otherTasks = new List { BindSafetyStatisticsAsync(), // 安全统计模块 @@ -148,13 +149,14 @@ namespace FineUIPro.Web.common getCNEN(),//中英文翻译 }; - await Task.WhenAll(otherTasks.Concat(new[] { treeTask, personTask })); + await Task.WhenAll(otherTasks.Concat(new[] { treeTask, personTask, weekJdtjTask, monthJdtjTask, quantityDoneJDTask })); Tree = await treeTask; Person = await personTask; WeekJdtjHtml = await weekJdtjTask; MonthJdtjHtml = await monthJdtjTask; + QuantityDoneJdtjHtml = await quantityDoneJDTask; } } @@ -1187,6 +1189,91 @@ namespace FineUIPro.Web.common #endregion 赢得值曲线 + + #region 工程量完成情况 + + protected string QuantityDoneJdtjHtml; + protected string QuantityDoneJdtjHead = "
类型
设计数量

本期

计划实际完成率

累计

计划实际完成率

完成率
"; + //protected string QuantityDoneJdtjHead = "
类型
单位
设计数量

本期

计划完成实际完成完成率

累计

计划完成实际完成完成率

完成率
"; + + /// + /// 工程量完成情况 + /// + /// + protected async Task GetQuantityDoneJDAsync() + { + return await Task.Run(() => + { + string doneJdtjHtml = string.Empty; + string month = string.Format("{0:yyyy-MM-01}", DateTime.Now); + //DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01"); + if (DateTime.Now.Day < 26) + { + month = string.Format("{0:yyyy-MM-01}", DateTime.Now.AddMonths(-1)); + //months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.AddMonths(-1).Month.ToString() + "-01"); + } + string strSql = @"select qc.QuantityCompletionId,(select PlanNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as PlanNum, + (select RealNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as RealNum, + (select NextNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as NextNum,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex, + CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalPlanNum, + CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalRealNum, + CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(qc.PlanNum, 0) WHEN 0 THEN 0 + + ELSE 100 * ISNULL(qc.RealNum, 0) / (1.0 * qc.PlanNum) END AS DECIMAL(9, 2))))) + '%' + + AS Rate, + CONVERT(NVARCHAR(10), ((CAST(CASE(select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) WHEN 0 THEN 0 + + ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) END AS DECIMAL(9, 2)))))+'%' + + AS TotalRate, + CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(ql.DesignNum, 0) WHEN 0 THEN 0 + ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%' + + AS SumRate, + CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalPlanNum, + CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalRealNum + from[dbo].JDGL_QuantityList ql + left join dbo.[JDGL_QuantityCompletion] qc on ql.QuantityListId=qc.QuantityListId +where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_QuantityCompletion] q where q.QuantityListId=qc.QuantityListId and q.Months<=@month order by q.Months desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name"; + + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@month", month)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + StringBuilder sb = new StringBuilder(); + for (int j = 0; j < tb.Rows.Count; j++) + { + string name = tb.Rows[j]["Name"].ToString().Trim(); + string unit = tb.Rows[j]["Unit"].ToString().Trim(); + string designNum = Funs.RemoveZero(tb.Rows[j]["DesignNum"].ToString().Trim()); + string planNum = Funs.RemoveZero(tb.Rows[j]["PlanNum"].ToString().Trim()); + string realNum = Funs.RemoveZero(tb.Rows[j]["RealNum"].ToString().Trim()); + string rate = tb.Rows[j]["Rate"].ToString().Trim(); + string nextNum = Funs.RemoveZero(tb.Rows[j]["NextNum"].ToString().Trim()); + string totalPlanNum = Funs.RemoveZero(tb.Rows[j]["TotalPlanNum"].ToString().Trim()); + string totalRealNum = Funs.RemoveZero(tb.Rows[j]["TotalRealNum"].ToString().Trim()); + string totalRate = tb.Rows[j]["TotalRate"].ToString().Trim(); + string sumRate = tb.Rows[j]["SumRate"].ToString().Trim(); + sb.Append("
"); + sb.Append($"
{name}({unit})
"); + //sb.Append($"
{unit}
"); + sb.Append($"
{designNum}
"); + sb.Append($"

{planNum}{realNum}{rate}

"); + sb.Append($"

{totalPlanNum}{totalRealNum}{totalRate}

"); + sb.Append($"
{sumRate}
"); + sb.Append("
"); + } + doneJdtjHtml = sb.ToString(); + return doneJdtjHtml; + }); + } + + + #endregion + #region 进度统计 protected string WeekJdtjHtml; @@ -1206,10 +1293,8 @@ namespace FineUIPro.Web.common return await Task.Run(() => { string weekGridHtml = string.Empty; - //获取当前时间所在周信息 + //获取当前时间上一个周计划信息 var lastWeek = WeekPlanService.GetLastWeekPlan(this.CurrUser.LoginProjectId); - ////根据当前时间获取上一个周计划信息 - //var lastWeekItem = WeekItemService.GetWeekItemByDateNow(this.CurrUser.LoginProjectId); if (lastWeek != null) { Model.SGGLDB db = Funs.DB; diff --git a/SGGL/FineUIPro.Web/common/main_new.aspx.cs b/SGGL/FineUIPro.Web/common/main_new.aspx.cs index 2144b5d2..990bea8a 100644 --- a/SGGL/FineUIPro.Web/common/main_new.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main_new.aspx.cs @@ -173,7 +173,29 @@ namespace FineUIPro.Web.common .SelectMany(x => x.persons.DefaultIfEmpty(), (x, person) => new { x.post, person }) .Where(x => pids.Contains(x.person.ProjectId)); - divCqmsManageNum.InnerText = qualityQuery.Count().ToString(); + + //企业总部人员和分支机构人员 + var query = (from person in db.Person_CompanyBranchPerson + join unit in db.Base_Unit on person.UnitId equals unit.UnitId into unitJoin + from unit in unitJoin.DefaultIfEmpty() // 左连接 + join workPost in db.Base_WorkPost on person.WorkPostId equals workPost.WorkPostId into workPostJoin + from workPost in workPostJoin.DefaultIfEmpty() // 左连接 + where person.IsOnJob == true && workPost.IsCQMS == true + select new + { + ID = person.CompanyBranchPersonId, + UnitName = unit.UnitName, + PersonName = person.PersonName, + SexStr = person.Sex == "1" ? "男" : "女", + IdentityCard = person.IdentityCard, + WorkPostName = workPost.WorkPostName, + Telephone = person.Telephone, + IsOnJob = person.IsOnJob, + Remark = person.Remark, + ProjectName = "" + }).ToList(); + + divCqmsManageNum.InnerText = (qualityQuery.Count() + query.Count()).ToString(); // 质量培训人员 divCqmsPxNum.InnerText = db.Comprehensive_InspectionPerson .Where(x => pids.Contains(x.ProjectId)) @@ -674,16 +696,15 @@ namespace FineUIPro.Web.common if (pids == null) { zlallNumber = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now select x).Count().ToString(); var num2 = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now && x.State == "7" + where x.State == "7" select x).Count(); zlfinishNumber = num2.ToString(); var num3 = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now && x.State != "7" + where x.State != "7" select x).Count(); var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3)); @@ -695,16 +716,16 @@ namespace FineUIPro.Web.common else { zlallNumber = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId) + where pids.Contains(x.ProjectId) select x).Count().ToString(); var num2 = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId) + where x.State == "7" && pids.Contains(x.ProjectId) select x).Count(); zlfinishNumber = num2.ToString(); var num3 = (from x in Funs.DB.Check_CheckControl - where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId) + where x.State != "7" && pids.Contains(x.ProjectId) select x).Count(); var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3)); @@ -778,7 +799,7 @@ namespace FineUIPro.Web.common List listdata = new List(); double result = 0; Model.SGGLDB db = Funs.DB; - var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x; + var ndtLists = from x in db.ProcessControl_NondestructiveTest_New select x; if (pids != null) { ndtLists = ndtLists.Where(x=>pids.Contains(x.ProjectId)); diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 555283ec..e6e76a75 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -10367,6 +10367,14 @@ namespace Model } } + public System.Data.Linq.Table View_JDGL_QuantityCompletionDone + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_JDGL_SteelStructureCompletion { get @@ -350495,7 +350503,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(500)")] public string Address { get @@ -437486,6 +437494,87 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_QuantityCompletionDone")] + public partial class View_JDGL_QuantityCompletionDone + { + + private string _QuantityListId; + + private string _ProjectId; + + private System.Nullable _Months; + + private System.Nullable _Rate; + + public View_JDGL_QuantityCompletionDone() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityListId", DbType="NVarChar(50)")] + public string QuantityListId + { + get + { + return this._QuantityListId; + } + set + { + if ((this._QuantityListId != value)) + { + this._QuantityListId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Months", DbType="DateTime")] + public System.Nullable Months + { + get + { + return this._Months; + } + set + { + if ((this._Months != value)) + { + this._Months = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="Decimal(25,12)")] + public System.Nullable Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_SteelStructureCompletion")] public partial class View_JDGL_SteelStructureCompletion { diff --git a/SGGL/Model/SingleSerie.cs b/SGGL/Model/SingleSerie.cs index 3746047c..829b1d8b 100644 --- a/SGGL/Model/SingleSerie.cs +++ b/SGGL/Model/SingleSerie.cs @@ -25,4 +25,13 @@ namespace Model public List pieData { get; set; } public List loc { get; set; } } + + public class Serie + { + public string name { get; set; } + public string type { get; set; } + public string stack { get; set; } + //public List data { get; set; } + public List data { get; set; } + } }