From fd20439eb995d6acb3b6c2751c36b2c215e941bd Mon Sep 17 00:00:00 2001 From: liyh Date: Tue, 30 Jul 2024 10:56:09 +0800 Subject: [PATCH 1/6] 1211 --- .../Transfer/Chart/SystemStatusSummary.aspx | 90 +++- .../Chart/SystemStatusSummary.aspx.cs | 178 ++++++- .../SystemStatusSummary.aspx.designer.cs | 99 ++++ .../Transfer/LHCSystemListDataIn.aspx.cs | 2 +- SGGL/Model/Model.cs | 457 ++++++++++++++++++ 5 files changed, 820 insertions(+), 6 deletions(-) diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx index c1948b4e..5246a5a2 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx @@ -1,16 +1,100 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemStatusSummary.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.SystemStatusSummary" %> +<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %> - + 移交状态汇总表 + +
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs index 5a18bba7..0273aac0 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs @@ -1,17 +1,191 @@ -using System; +using BLL; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; using System.Linq; +using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.Transfer.Chart { - public partial class SystemStatusSummary : System.Web.UI.Page + public partial class SystemStatusSummary : PageBase { protected void Page_Load(object sender, EventArgs e) { + if (!IsPostBack) + { + BindGrid1(); + } + } + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid1(); + } + + + /// + /// 查询绑定数据 + /// + public void BindGrid1() + { + + List listStr = new List(); + //计算本周日期段 + DateTime today = DateTime.Today; + int dayOfWeek = (int)today.DayOfWeek; + DateTime startWeebTime=Convert.ToDateTime(today.AddDays(-dayOfWeek + 1).ToString("yyyy-MM-dd")+" 00:00:00"); + DateTime endWeebTime= Convert.ToDateTime(today.AddDays(-dayOfWeek + 7).ToString("yyyy-MM-dd") + " 23:59:59"); + + StringBuilder strSql = new StringBuilder(""); + strSql.AppendLine(" IF OBJECT_ID('tempdb..#AllLHCSystemListTemp') IS NOT NULL drop table #AllLHCSystemListTemp; "); + strSql.AppendLine(" IF OBJECT_ID('tempdb..#LHCSystemListTemp') IS NOT NULL drop table #LHCSystemListTemp; "); + strSql.AppendLine(" select * INTO #AllLHCSystemListTemp from Transfer_LHCSystemList(NOLOCK) where ProjectId =@ProjectId; "); + strSql.AppendLine(" select isnull([Type],'0') [Type],(CASE isnull([Type],'0') WHEN '1' THEN 'Non Process system' ELSE 'Process System' END) Category,count(1) System_Qty "); + strSql.AppendLine(",cast(0 as decimal(18,2)) Cumulative_Plan,cast(0 as decimal(18,2)) Cumulative_Actual ,cast(0 as decimal(18,2)) Week_Plan,cast(0 as decimal(18,2)) Week_Actual "); + strSql.AppendLine(" INTO #LHCSystemListTemp from #AllLHCSystemListTemp group by isnull([Type],'0'); "); + strSql.AppendLine(" update a set a.Cumulative_Plan=(select count(1) from #AllLHCSystemListTemp b where isnull(b.[Type],'0')=a.[Type] AND isnull(b.PlanFinishofTestingDate,'')<>'') "); + strSql.AppendLine(" ,a.Cumulative_Actual=(select count(1) from #AllLHCSystemListTemp b where isnull(b.[Type],'0')=a.[Type] AND isnull(b.ActualFinishedDate,'')<>'') "); + strSql.AppendLine(" ,a.Week_Plan=(select count(1) from #AllLHCSystemListTemp b where isnull(b.[Type],'0')=a.[Type] AND b.PlanFinishofTestingDate>=@StartWeebTime AND b.PlanFinishofTestingDate<=@EndWeebTime) "); + strSql.AppendLine(" ,a.Week_Actual=(select count(1) from #AllLHCSystemListTemp b where isnull(b.[Type],'0')=a.[Type] AND b.ActualFinishedDate>=@StartWeebTime AND b.ActualFinishedDate<=@EndWeebTime) "); + strSql.AppendLine(" from #LHCSystemListTemp a; "); + strSql.AppendLine(" select * from #LHCSystemListTemp; "); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@StartWeebTime", startWeebTime)); + listStr.Add(new SqlParameter("@EndWeebTime", dayOfWeek)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql.ToString(), parameter); + Grid1.RecordCount = tb.Rows.Count; + Grid1.DataSource = tb; + Grid1.DataBind(); + + //合计 + int Cumulative_Plan = 0; + int Cumulative_Actual = 0; + int Week_Plan = 0; + int Week_Actual = 0; + int System_Qty=0; + foreach (DataRow row in tb.Rows) + { + System_Qty += Convert.ToInt32(row["System_Qty"]); + Cumulative_Plan += Convert.ToInt32(row["Cumulative_Plan"]); + Cumulative_Actual += Convert.ToInt32(row["Cumulative_Actual"]); + Week_Plan += Convert.ToInt32(row["Week_Plan"]); + Week_Actual += Convert.ToInt32(row["Week_Actual"]); + } + + + JObject summary = new JObject(); + summary.Add("Category", "Total"); + summary.Add("System_Qty", System_Qty.ToString()); + summary.Add("Cumulative_Plan", Cumulative_Plan.ToString()); + summary.Add("Cumulative_Actual", Cumulative_Actual.ToString()); + summary.Add("Week_Plan", Week_Plan.ToString()); + summary.Add("Week_Actual", Week_Actual.ToString()); + + + Grid1.SummaryData = summary; + } + + /// + /// 查询绑定图表数据 + /// + public void AnalyseData() + { + var forms = from x in Funs.DB.Transfer_LHCSystemList + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + string _dateType = ddlDateType.SelectedValue; + #region 按照当前日期前一周数据 + if (_dateType == "1") + { + ///按单位统计 + DataTable dtTime = new DataTable(); + dtTime.Columns.Add("日期", typeof(string)); + dtTime.Columns.Add("计划完成数量", typeof(string)); + dtTime.Columns.Add("实际完成数量", typeof(string)); + dtTime.Columns.Add("进行中移交包数量", typeof(string)); + for (int i = 6; i >= 0; i--) + { + DataRow rowTime = dtTime.NewRow(); + DateTime QueryTime = DateTime.Now.AddDays(i * -1); + rowTime["日期"] = QueryTime.ToString("yyyy/MM/dd"); + DateTime startTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 00:00:00"); + DateTime endTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 23:59:59"); + rowTime["计划完成数量"] = forms.Where(x => x.PlanFinishofTestingDate <= endTime).Count(); + rowTime["实际完成数量"] = forms.Where(x => x.ActualFinishedDate <= endTime).Count(); + rowTime["进行中移交包数量"] = forms.Where(x => x.UpdateTime <= endTime && x.Status== "In progress").Count(); + dtTime.Rows.Add(rowTime); + } + this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + } + #endregion + + //按照当前月份到一月份的数据 + if (_dateType == "2") + { + ///按单位统计 + DataTable dtTime = new DataTable(); + dtTime.Columns.Add("月份", typeof(string)); + dtTime.Columns.Add("计划完成数量", typeof(string)); + dtTime.Columns.Add("实际完成数量", typeof(string)); + dtTime.Columns.Add("进行中移交包数量", typeof(string)); + for (int i = 1; i <= DateTime.Now.Month; i++) + { + DataRow rowTime = dtTime.NewRow(); + DateTime QueryTime = Convert.ToDateTime($"{DateTime.Now.Year.ToString()}-{i}-1 00:00:00"); + rowTime["月份"] = QueryTime.ToString("yyyy/MM"); + DateTime startTime = QueryTime; + DateTime endTime = Convert.ToDateTime(QueryTime.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd") + " 23:59:59"); + rowTime["计划完成数量"] = forms.Where(x => x.PlanFinishofTestingDate <= endTime).Count(); + rowTime["实际完成数量"] = forms.Where(x => x.ActualFinishedDate <= endTime).Count(); + rowTime["进行中移交包数量"] = forms.Where(x => x.UpdateTime <= endTime && x.Status == "In progress").Count(); + dtTime.Rows.Add(rowTime); + } + this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + } + } + + protected void TabStrip1_TabIndexChanged(object sender, EventArgs e) + { + if (TabStrip1.ActiveTabIndex == 0) + { + BindGrid1(); + } + else if (TabStrip1.ActiveTabIndex == 1) + { + AnalyseData(); + } + } + + /// + /// 图形变换 + /// + /// + /// + protected void drpChartType_SelectedIndexChanged(object sender, EventArgs e) + { + this.AnalyseData(); + } + + /// + /// 现在日期类型 + /// + /// + /// + protected void ddlDateType_SelectedIndexChanged(object sender, EventArgs e) + { + this.AnalyseData(); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs index a45770e1..bf715824 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs @@ -22,5 +22,104 @@ namespace FineUIPro.Web.Transfer.Chart /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Tab1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Tab2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab2; + + /// + /// ddlDateType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlDateType; + + /// + /// drpChartType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpChartType; + + /// + /// cpAccidentTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel cpAccidentTime; + + /// + /// ChartAccidentTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::Web.Controls.ChartControl ChartAccidentTime; } } diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs index 07df687d..62a27f36 100644 --- a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs @@ -523,7 +523,7 @@ namespace FineUIPro.Web.Transfer model.ActualFinishedDate = t3; } - + model.UpdateTime = DateTime.Now; list.Add(model); //} //else diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6215dfa3..808ca089 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2537,6 +2537,9 @@ namespace Model partial void InsertTransfer_StaticEquipment(Transfer_StaticEquipment instance); partial void UpdateTransfer_StaticEquipment(Transfer_StaticEquipment instance); partial void DeleteTransfer_StaticEquipment(Transfer_StaticEquipment instance); + partial void InsertTransfer_SystemControl(Transfer_SystemControl instance); + partial void UpdateTransfer_SystemControl(Transfer_SystemControl instance); + partial void DeleteTransfer_SystemControl(Transfer_SystemControl instance); partial void InsertTransfer_Telecom(Transfer_Telecom instance); partial void UpdateTransfer_Telecom(Transfer_Telecom instance); partial void DeleteTransfer_Telecom(Transfer_Telecom instance); @@ -9429,6 +9432,14 @@ namespace Model } } + public System.Data.Linq.Table Transfer_SystemControl + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Transfer_Telecom { get @@ -392615,6 +392626,8 @@ namespace Model private string _SystemNo; + private System.Nullable _UpdateTime; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -392647,6 +392660,8 @@ namespace Model partial void OnDescribeChanged(); partial void OnSystemNoChanging(string value); partial void OnSystemNoChanged(); + partial void OnUpdateTimeChanging(System.Nullable value); + partial void OnUpdateTimeChanged(); #endregion public Transfer_LHCSystemList() @@ -392934,6 +392949,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpdateTime", DbType="DateTime")] + public System.Nullable UpdateTime + { + get + { + return this._UpdateTime; + } + set + { + if ((this._UpdateTime != value)) + { + this.OnUpdateTimeChanging(value); + this.SendPropertyChanging(); + this._UpdateTime = value; + this.SendPropertyChanged("UpdateTime"); + this.OnUpdateTimeChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -395943,6 +395978,428 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_SystemControl")] + public partial class Transfer_SystemControl : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _SystemNo; + + private System.Nullable _PlanPWD; + + private System.Nullable _PlanJWD; + + private System.Nullable _McPlan; + + private string _SubmitPackage; + + private System.Nullable _ActualPWD; + + private System.Nullable _ActualJWD; + + private System.Nullable _ActualMC; + + private string _Commissioning; + + private string _IaQian; + + private string _TcccQ; + + private string _SystemStatus; + + private string _TurnoverDescription; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnSystemNoChanging(string value); + partial void OnSystemNoChanged(); + partial void OnPlanPWDChanging(System.Nullable value); + partial void OnPlanPWDChanged(); + partial void OnPlanJWDChanging(System.Nullable value); + partial void OnPlanJWDChanged(); + partial void OnMcPlanChanging(System.Nullable value); + partial void OnMcPlanChanged(); + partial void OnSubmitPackageChanging(string value); + partial void OnSubmitPackageChanged(); + partial void OnActualPWDChanging(System.Nullable value); + partial void OnActualPWDChanged(); + partial void OnActualJWDChanging(System.Nullable value); + partial void OnActualJWDChanged(); + partial void OnActualMCChanging(System.Nullable value); + partial void OnActualMCChanged(); + partial void OnCommissioningChanging(string value); + partial void OnCommissioningChanged(); + partial void OnIaQianChanging(string value); + partial void OnIaQianChanged(); + partial void OnTcccQChanging(string value); + partial void OnTcccQChanged(); + partial void OnSystemStatusChanging(string value); + partial void OnSystemStatusChanged(); + partial void OnTurnoverDescriptionChanging(string value); + partial void OnTurnoverDescriptionChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Transfer_SystemControl() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_SystemNo", DbType="NVarChar(50)")] + public string SystemNo + { + get + { + return this._SystemNo; + } + set + { + if ((this._SystemNo != value)) + { + this.OnSystemNoChanging(value); + this.SendPropertyChanging(); + this._SystemNo = value; + this.SendPropertyChanged("SystemNo"); + this.OnSystemNoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanPWD", DbType="DateTime")] + public System.Nullable PlanPWD + { + get + { + return this._PlanPWD; + } + set + { + if ((this._PlanPWD != value)) + { + this.OnPlanPWDChanging(value); + this.SendPropertyChanging(); + this._PlanPWD = value; + this.SendPropertyChanged("PlanPWD"); + this.OnPlanPWDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanJWD", DbType="DateTime")] + public System.Nullable PlanJWD + { + get + { + return this._PlanJWD; + } + set + { + if ((this._PlanJWD != value)) + { + this.OnPlanJWDChanging(value); + this.SendPropertyChanging(); + this._PlanJWD = value; + this.SendPropertyChanged("PlanJWD"); + this.OnPlanJWDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_McPlan", DbType="DateTime")] + public System.Nullable McPlan + { + get + { + return this._McPlan; + } + set + { + if ((this._McPlan != value)) + { + this.OnMcPlanChanging(value); + this.SendPropertyChanging(); + this._McPlan = value; + this.SendPropertyChanged("McPlan"); + this.OnMcPlanChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubmitPackage", DbType="NVarChar(200)")] + public string SubmitPackage + { + get + { + return this._SubmitPackage; + } + set + { + if ((this._SubmitPackage != value)) + { + this.OnSubmitPackageChanging(value); + this.SendPropertyChanging(); + this._SubmitPackage = value; + this.SendPropertyChanged("SubmitPackage"); + this.OnSubmitPackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualPWD", DbType="DateTime")] + public System.Nullable ActualPWD + { + get + { + return this._ActualPWD; + } + set + { + if ((this._ActualPWD != value)) + { + this.OnActualPWDChanging(value); + this.SendPropertyChanging(); + this._ActualPWD = value; + this.SendPropertyChanged("ActualPWD"); + this.OnActualPWDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualJWD", DbType="DateTime")] + public System.Nullable ActualJWD + { + get + { + return this._ActualJWD; + } + set + { + if ((this._ActualJWD != value)) + { + this.OnActualJWDChanging(value); + this.SendPropertyChanging(); + this._ActualJWD = value; + this.SendPropertyChanged("ActualJWD"); + this.OnActualJWDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualMC", DbType="DateTime")] + public System.Nullable ActualMC + { + get + { + return this._ActualMC; + } + set + { + if ((this._ActualMC != value)) + { + this.OnActualMCChanging(value); + this.SendPropertyChanging(); + this._ActualMC = value; + this.SendPropertyChanged("ActualMC"); + this.OnActualMCChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Commissioning", DbType="NVarChar(200)")] + public string Commissioning + { + get + { + return this._Commissioning; + } + set + { + if ((this._Commissioning != value)) + { + this.OnCommissioningChanging(value); + this.SendPropertyChanging(); + this._Commissioning = value; + this.SendPropertyChanged("Commissioning"); + this.OnCommissioningChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IaQian", DbType="NVarChar(200)")] + public string IaQian + { + get + { + return this._IaQian; + } + set + { + if ((this._IaQian != value)) + { + this.OnIaQianChanging(value); + this.SendPropertyChanging(); + this._IaQian = value; + this.SendPropertyChanged("IaQian"); + this.OnIaQianChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TcccQ", DbType="NVarChar(200)")] + public string TcccQ + { + get + { + return this._TcccQ; + } + set + { + if ((this._TcccQ != value)) + { + this.OnTcccQChanging(value); + this.SendPropertyChanging(); + this._TcccQ = value; + this.SendPropertyChanged("TcccQ"); + this.OnTcccQChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemStatus", DbType="NVarChar(20)")] + public string SystemStatus + { + get + { + return this._SystemStatus; + } + set + { + if ((this._SystemStatus != value)) + { + this.OnSystemStatusChanging(value); + this.SendPropertyChanging(); + this._SystemStatus = value; + this.SendPropertyChanged("SystemStatus"); + this.OnSystemStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TurnoverDescription", DbType="NVarChar(50)")] + public string TurnoverDescription + { + get + { + return this._TurnoverDescription; + } + set + { + if ((this._TurnoverDescription != value)) + { + this.OnTurnoverDescriptionChanging(value); + this.SendPropertyChanging(); + this._TurnoverDescription = value; + this.SendPropertyChanged("TurnoverDescription"); + this.OnTurnoverDescriptionChanged(); + } + } + } + + [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(); + } + } + } + + 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.Transfer_Telecom")] public partial class Transfer_Telecom : INotifyPropertyChanging, INotifyPropertyChanged { From c93dba3c61e527fc9d1e0c6325ecef0dca7cd931 Mon Sep 17 00:00:00 2001 From: liyh Date: Tue, 30 Jul 2024 11:40:11 +0800 Subject: [PATCH 2/6] 1212 --- .../AttachFile/webuploader.aspx.cs | 12 ++-- .../FineUIPro.Web/Transfer/PunchlistFrom.aspx | 4 +- .../Transfer/PunchlistFrom.aspx.cs | 5 +- .../Transfer/PunchlistFromEdit.aspx | 42 ++++++------ .../Transfer/PunchlistFromEdit.aspx.cs | 68 ++++++++++++------- .../PunchlistFromEdit.aspx.designer.cs | 9 +++ 6 files changed, 85 insertions(+), 55 deletions(-) diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index 821158c6..3333ace5 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -778,12 +778,12 @@ namespace FineUIPro.Web.AttachFile } #endregion - #region PunchlistFrom附件保存成功后处理事件 - if (MenuId == BLL.Const.PunchlistFromMenuId) - { - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - #endregion + //#region PunchlistFrom附件保存成功后处理事件 + //if (MenuId == BLL.Const.PunchlistFromMenuId) + //{ + // PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + //} + //#endregion PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx index 95720d13..7d45c29e 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx @@ -244,14 +244,14 @@ diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs index afbd3ffb..2c47563e 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs @@ -212,6 +212,10 @@ namespace FineUIPro.Web.Transfer { BindGrid(); } + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } #endregion #region 删除 @@ -569,7 +573,6 @@ namespace FineUIPro.Web.Transfer Response.Flush(); Response.Close(); File.Delete(newUrl); - } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx index d4a631ad..b1cb418d 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx @@ -17,65 +17,65 @@ + + - + - + + + + + - - - - - + - + - - - + + + - + - - - - + + + - - - + - + + + - diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs index b599f9ef..1dd548ca 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs @@ -50,6 +50,7 @@ namespace FineUIPro.Web.Transfer var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); if (TransferPunchlistFrom != null) { + this.txtNum_NO.Text = TransferPunchlistFrom.Num_NO; this.txtSystem_No.Text = TransferPunchlistFrom.System_No; this.txtSub_Sys_No.Text = TransferPunchlistFrom.Sub_Sys_No; this.txtDESCRIPTION.Text = TransferPunchlistFrom.DESCRIPTION; @@ -83,6 +84,16 @@ namespace FineUIPro.Web.Transfer this.txtVerified_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Verified_Date).ToString("yyyy-MM-dd"); this.txtRemark.Text = TransferPunchlistFrom.Remark; } + else + { + var maxNumNO = 0; + var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x => x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId); + if (modelTp == null) + maxNumNO = 1; + else + maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1; + this.txtNum_NO.Text = maxNumNO.ToString("0000"); + } } } @@ -122,12 +133,12 @@ namespace FineUIPro.Web.Transfer /// protected void btnSave_Click(object sender, EventArgs e) { - if (SaveData() == 0) { - Alert.ShowInTop("保存失败!", MessageBoxIcon.Warning); + if (SaveData() == 0) + { return; } - ShowNotify("保存成功",MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + ShowNotify("保存成功", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } /// @@ -136,19 +147,13 @@ namespace FineUIPro.Web.Transfer /// private int SaveData() { - int reutState = 0; - var maxNumNO = 0; - var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x => x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId); - if (modelTp == null) - maxNumNO = 1; - else - maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1; + int reutState = 0; Model.Transfer_PunchlistFrom newTransferFrom = new Model.Transfer_PunchlistFrom() { - Id= Guid.NewGuid().ToString(), - Num_NO = maxNumNO.ToString("0000"), - ProjectId=this.ProjectId, + Id = Guid.NewGuid().ToString(), + Num_NO = this.txtNum_NO.Text.Trim(), + ProjectId = this.ProjectId, System_No = this.txtSystem_No.Text.Trim(), Sub_Sys_No = this.txtSub_Sys_No.Text.Trim(), DESCRIPTION = this.txtDESCRIPTION.Text.Trim(), @@ -159,19 +164,19 @@ namespace FineUIPro.Web.Transfer IsEng = this.ddlIsEng.SelectedValue == "Y" ? true : false, IsMatI = this.ddlIsMatI.SelectedValue, Punch_Type = this.txtPunch_Type.Text.Trim(), - Required_Date= Funs.GetNewDateTime(this.txtRequired_Date.Text), - Action_By= this.txtAction_By.Text.Trim(), - PIC= this.txtPIC.Text.Trim(), - PIC_WUH=this.txtPIC_WUH.Text.Trim(), - Correction_Action= this.txtCorrection_Action.Text.Trim(), + Required_Date = Funs.GetNewDateTime(this.txtRequired_Date.Text), + Action_By = this.txtAction_By.Text.Trim(), + PIC = this.txtPIC.Text.Trim(), + PIC_WUH = this.txtPIC_WUH.Text.Trim(), + Correction_Action = this.txtCorrection_Action.Text.Trim(), Actual_Date = Funs.GetNewDateTime(this.txtActual_Date.Text), - Cleared_By= this.txtCleared_By.Text.Trim(), + Cleared_By = this.txtCleared_By.Text.Trim(), Cleared_Date = Funs.GetNewDateTime(this.txtCleared_Date.Text), - Confirmed_By= this.txtConfirmed_By.Text.Trim(), + Confirmed_By = this.txtConfirmed_By.Text.Trim(), Confirmed_Date = Funs.GetNewDateTime(this.txtConfirmed_Date.Text), - Verified_By= this.txtVerified_By.Text.Trim(), + Verified_By = this.txtVerified_By.Text.Trim(), Verified_Date = Funs.GetNewDateTime(this.txtVerified_Date.Text), - Remark= this.txtRemark.Text.Trim() + Remark = this.txtRemark.Text.Trim() }; if (newTransferFrom.Cleared_Date == null && newTransferFrom.Confirmed_Date == null && newTransferFrom.Verified_Date == null) @@ -184,11 +189,24 @@ namespace FineUIPro.Web.Transfer var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); if (TransferPunchlistFrom == null) { + if (Funs.DB.Transfer_PunchlistFrom.Where(p => p.ProjectId == this.ProjectId && p.Num_NO == newTransferFrom.Num_NO).Count() > 0) + { + ShowNotify("录入的NO.重复了,不能保存", MessageBoxIcon.Warning); + return reutState; + } + Funs.DB.Transfer_PunchlistFrom.InsertOnSubmit(newTransferFrom); - this.Id = newTransferFrom.Id; + this.Id = newTransferFrom.Id; } - else + else { + if (Funs.DB.Transfer_PunchlistFrom.Where(p => p.ProjectId == this.ProjectId && p.Num_NO == newTransferFrom.Num_NO && p.Id != TransferPunchlistFrom.Id).Count() > 0) + { + ShowNotify("录入的NO.重复了,不能保存", MessageBoxIcon.Warning); + return reutState; + } + + TransferPunchlistFrom.Num_NO = newTransferFrom.Num_NO; TransferPunchlistFrom.System_No = newTransferFrom.System_No; TransferPunchlistFrom.Sub_Sys_No = newTransferFrom.Sub_Sys_No; TransferPunchlistFrom.DESCRIPTION = newTransferFrom.DESCRIPTION; diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs index ef019b0c..58d3720b 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs @@ -41,6 +41,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Form SimpleForm1; + /// + /// txtNum_NO 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtNum_NO; + /// /// txtSystem_No 控件。 /// From 53ab49cb5ed5a7ffd4aca2e710eb7b25a85202fd Mon Sep 17 00:00:00 2001 From: liyh Date: Tue, 30 Jul 2024 11:58:39 +0800 Subject: [PATCH 3/6] =?UTF-8?q?Punch=5FType=E6=94=B9=E4=B8=BA=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx | 7 +++++-- SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs | 4 ++-- .../Transfer/PunchlistFromEdit.aspx.designer.cs | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx index b1cb418d..8183ad5c 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx @@ -60,8 +60,11 @@ - - + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs index 1dd548ca..7a8ab639 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs @@ -64,7 +64,7 @@ namespace FineUIPro.Web.Transfer else this.ddlIsEng.SelectedValue = "N"; this.ddlIsMatI.SelectedValue = TransferPunchlistFrom.IsMatI ?? ""; - this.txtPunch_Type.Text = TransferPunchlistFrom.Punch_Type; + this.txtPunch_Type.SelectedValue = TransferPunchlistFrom.Punch_Type ?? ""; if (TransferPunchlistFrom.Required_Date != null) this.txtRequired_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Required_Date).ToString("yyyy-MM-dd"); this.txtAction_By.Text = TransferPunchlistFrom.Action_By; @@ -163,7 +163,7 @@ namespace FineUIPro.Web.Transfer Disc = this.txtDisc.Text.Trim(), IsEng = this.ddlIsEng.SelectedValue == "Y" ? true : false, IsMatI = this.ddlIsMatI.SelectedValue, - Punch_Type = this.txtPunch_Type.Text.Trim(), + Punch_Type = this.txtPunch_Type.SelectedValue, Required_Date = Funs.GetNewDateTime(this.txtRequired_Date.Text), Action_By = this.txtAction_By.Text.Trim(), PIC = this.txtPIC.Text.Trim(), diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs index 58d3720b..dd9a5818 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs @@ -129,7 +129,7 @@ namespace FineUIPro.Web.Transfer /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtPunch_Type; + protected global::FineUIPro.DropDownList txtPunch_Type; /// /// txtRequired_Date 控件。 From 1307746137d1a1320fd4ff6a92723a373bf76fd9 Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Tue, 30 Jul 2024 14:08:46 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=BB=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_V2024-07-30-phf.sql | 29 ++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 10 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- .../Transfer/Chart/Systemstatus.aspx | 274 ++++++++++++++++- .../Transfer/Chart/Systemstatus.aspx.cs | 278 +++++++++++++++++- .../Chart/Systemstatus.aspx.designer.cs | 117 ++++++++ .../Transfer/Chart/SystemstatusEdit.aspx | 16 + .../Transfer/Chart/SystemstatusEdit.aspx.cs | 17 ++ .../Chart/SystemstatusEdit.aspx.designer.cs | 26 ++ .../Transfer/LHCSystemList.aspx.cs | 2 +- 10 files changed, 763 insertions(+), 8 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_V2024-07-30-phf.sql create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusEdit.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusEdit.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-07-30-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-07-30-phf.sql new file mode 100644 index 00000000..682d0d95 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-07-30-phf.sql @@ -0,0 +1,29 @@ +alter table Transfer_LHCSystemList add UpdateTime datetime NULL +GO; +update Transfer_PunchlistFrom set IsMatI='Y' where IsMatI='1' +GO +update Transfer_PunchlistFrom set IsMatI='N' where IsMatI='0' +GO +CREATE TABLE [dbo].[Transfer_SystemControl]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [SystemNo] [nvarchar](50) NULL, + [PlanPWD] [datetime] NULL, + [PlanJWD] [datetime] NULL, + [McPlan] [datetime] NULL, + [SubmitPackage] [nvarchar](200) NULL, + [ActualPWD] [datetime] NULL, + [ActualJWD] [datetime] NULL, + [ActualMC] [datetime] NULL, + [Commissioning] [nvarchar](200) NULL, + [IaQian] [nvarchar](200) NULL, + [TcccQ] [nvarchar](200) NULL, + [SystemStatus] [nvarchar](20) NULL, + [TurnoverDescription] [nvarchar](50) NULL, + [Remark] [nvarchar](500) NULL, + CONSTRAINT [PK_Transfer_SystemControl] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index b2870513..a8e3d530 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2026,6 +2026,7 @@ + @@ -17629,6 +17630,13 @@ SystemstatusChart.aspx + + SystemstatusEdit.aspx + ASPXCodeBehind + + + SystemstatusEdit.aspx + SystemStatusSummary.aspx ASPXCodeBehind @@ -19128,7 +19136,7 @@ - +