diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-08-30-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-08-30-phf.sql new file mode 100644 index 00000000..9da61937 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-08-30-phf.sql @@ -0,0 +1,6 @@ +alter table Transfer_RotatingEquipment +add Lubricatefilling nvarchar(50) null; + + +alter table Transfer_Instrumentation +add Calibration nvarchar(50) null; \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls index bcfae096..88c5d12d 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls index 20a6b06f..ffd0af3e 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls index d257e13d..5d30839f 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls index f980f7e8..61ae6a86 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx index d1e1d61b..f85d259d 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx @@ -49,16 +49,19 @@ - - - -
+ + +
+ + <%--
-
+
--%>
@@ -80,13 +83,52 @@ AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true" SummaryPosition="Flow"> - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -112,14 +154,51 @@ AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid2_PageIndexChange" EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true" SummaryPosition="Flow"> - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -145,20 +224,57 @@ runat="server" BoxFlex="1" DataKeyNames="System_No" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="System_No" AllowSorting="true" OnSort="Grid3_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid3_PageIndexChange" - EnableRowDoubleClickEvent="true" EnableTextSelection="true"> + EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true"> - + - + + + + + + + + - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -181,3 +297,106 @@ + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs index 0b33ea80..52de22e5 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs @@ -18,6 +18,11 @@ namespace FineUIPro.Web.Transfer.Chart { if (!IsPostBack) { + ddlSystemNo.Hidden = true; + ddlDateType.Hidden = true; + drpChartType.Hidden = true; + BtnAnalyse.Hidden = true; + var systemNos = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).GroupBy(p => new { p.System_No }).Select(p => new { System_No = p.Key.System_No }).ToList(); int indexRow = 1; ddlSystemNo.Items.Insert(0, new FineUIPro.ListItem("ALL", "")); @@ -30,6 +35,28 @@ namespace FineUIPro.Web.Transfer.Chart } } + + /// + /// x轴30天日期 + /// + public string AllxDate; + + /// + /// 当天计划完成量 + /// + public string wcl1; + /// + /// 当天实际完成量 + /// + public string wcl2; + /// + /// 累计计划完成量 + /// + public string wcl3; + /// + /// 累计实际完成量 + /// + public string wcl4; /// /// 统计方法 /// @@ -47,27 +74,63 @@ namespace FineUIPro.Web.Transfer.Chart string _dateType = ddlDateType.SelectedValue; #region 按照当前日期前一周数据 + AllxDate = ""; if (_dateType == "1") { - ///按单位统计 - DataTable dtTime = new DataTable(); - dtTime.Columns.Add("日期", typeof(string)); - dtTime.Columns.Add("计划完成数量", typeof(string)); - dtTime.Columns.Add("实际完成数量", typeof(string)); - for (int i = 6; i >= 0; i--) + #region 加载尾项完成统计表(30天以内) + var nowDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")); + for (var i = nowDate.AddDays(-30); i <= nowDate; i=i.AddDays(1)) { - 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.Required_Date >= startTime && x.Required_Date <= endTime).Count(); - //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); - rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); - rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); - dtTime.Rows.Add(rowTime); + //i是日期 + + var d = i.Month.ToString() + "月" + i.Day.ToString() + "日"; + DateTime startTime = Convert.ToDateTime(i.ToString("yyyy-MM-dd") + " 00:00:00"); + DateTime endTime = Convert.ToDateTime(i.ToString("yyyy-MM-dd") + " 23:59:59"); + //当天计划完成量 + var dtjhwcl= forms.Where(x => x.Required_Date >= startTime && x.Required_Date <= endTime).Count(); + wcl1 += "'" + dtjhwcl + "',"; + //当天实际完成量 + var dtsjwcl = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + wcl2 += "'" + dtsjwcl + "',"; + //累计计划完成量 + var ljjhwcl = forms.Where(x => x.Required_Date <= endTime).Count(); + wcl3 += "'" + ljjhwcl + "',"; + //累计实际完成量 + var ljsjwcl= forms.Where(x => x.Actual_Date <= endTime).Count(); + wcl4 += "'" + ljsjwcl + "',"; + + AllxDate += "'"+ d + "',"; } - this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + if (AllxDate.Length>0) + { + AllxDate = AllxDate.Substring(0, AllxDate.Length - 1); + wcl1 = wcl1.Substring(0, wcl1.Length - 1); + wcl2 = wcl2.Substring(0, wcl2.Length - 1); + wcl3 = wcl3.Substring(0, wcl3.Length - 1); + wcl4 = wcl4.Substring(0, wcl4.Length - 1); + } + #endregion + + + /////按单位统计 + //DataTable dtTime = new DataTable(); + //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.Required_Date >= startTime && x.Required_Date <= endTime).Count(); + // //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + // rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); + // rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); + // dtTime.Rows.Add(rowTime); + //} + //this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); ///按单位统计 DataTable dtTime1 = new DataTable(); @@ -95,25 +158,25 @@ namespace FineUIPro.Web.Transfer.Chart //按照当前月份到一月份的数据 if (_dateType == "2") { - ///按单位统计 - DataTable dtTime = new DataTable(); - 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.Required_Date >= startTime && x.Required_Date <= endTime).Count(); - //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); - rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); - rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); - dtTime.Rows.Add(rowTime); - } - this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + /////按单位统计 + //DataTable dtTime = new DataTable(); + //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.Required_Date >= startTime && x.Required_Date <= endTime).Count(); + // //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + // rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); + // rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); + // dtTime.Rows.Add(rowTime); + //} + //this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); ///按单位统计 DataTable dtTime1 = new DataTable(); @@ -269,12 +332,49 @@ namespace FineUIPro.Web.Transfer.Chart strSql.AppendLine(" AND System_No=@System_No "); listStr.Add(new SqlParameter("@System_No", _systemNo)); } - strSql.AppendLine(" select Disc,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp1 from #AllPunchlistFromSortTemp1 Group by Disc; "); - strSql.AppendLine(" update a set a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')) "); - strSql.AppendLine(",a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) "); - strSql.AppendLine(",a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) "); - strSql.AppendLine(",a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) "); - strSql.AppendLine("from #PunchlistFromSortTemp1 a;"); + strSql.AppendLine(@" select Disc, + cast(0 as decimal(18, 2)) Cat_A_Count, + cast(0 as decimal(18, 2)) Cat_A_Countf, cast(0 as decimal(18, 2)) Cat_A_CountWUH, cast(0 as decimal(18, 2)) Cat_A_CountBASF, + cast(0 as decimal(18, 2)) Cat_B_Count, + cast(0 as decimal(18, 2)) Cat_B_Countf, cast(0 as decimal(18, 2)) Cat_B_CountWUH, cast(0 as decimal(18, 2)) Cat_B_CountBASF, + cast(0 as decimal(18, 2)) Cat_C_Count, + cast(0 as decimal(18, 2)) Cat_C_Countf, cast(0 as decimal(18, 2)) Cat_C_CountWUH, cast(0 as decimal(18, 2)) Cat_C_CountBASF, + cast(0 as decimal(18, 2)) Cat_D_Count, + cast(0 as decimal(18, 2)) Cat_D_Countf, cast(0 as decimal(18, 2)) Cat_D_CountWUH, cast(0 as decimal(18, 2)) Cat_D_CountBASF, + cast(0 as decimal(18, 2)) allCount, cast(0 as decimal(18, 2)) allfinshedCount, cast(0 as decimal(18, 2)) allWUH, cast(0 as decimal(18, 2)) allBASF + INTO #PunchlistFromSortTemp1 + from #AllPunchlistFromSortTemp1 Group by Disc; "); + strSql.AppendLine(@" update a set + allCount=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc), + allfinshedCount=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc and (b.Required_Date is not null or b.Required_Date!='')), + allWUH=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + allBASF=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc and (b.Verified_Date is not null or b.Verified_Date!='')), + + a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')), + + a.Cat_A_Countf=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_A_CountWUH=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_A_CountBASF=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) , + + a.Cat_B_Countf=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_B_CountWUH=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_B_CountBASF=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Verified_Date is not null or b.Verified_Date!='')) + + + ,a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) , + + a.Cat_C_Countf=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_C_CountWUH=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_C_CountBASF=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) , + a.Cat_D_Countf=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_D_CountWUH=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_D_CountBASF=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Verified_Date is not null or b.Verified_Date!='')) + + from #PunchlistFromSortTemp1 a;"); strSql.AppendLine("select * from #PunchlistFromSortTemp1 "); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); strSql.AppendLine(" order by Disc "); @@ -290,12 +390,39 @@ namespace FineUIPro.Web.Transfer.Chart int cat_B_Count = 0; int cat_C_Count = 0; int cat_D_Count = 0; + + int Cat_A_Countf = 0, Cat_A_CountWUH = 0, Cat_A_CountBASF = 0, + Cat_B_Countf = 0, Cat_B_CountWUH = 0, Cat_B_CountBASF = 0, + Cat_C_Countf = 0, Cat_C_CountWUH = 0, Cat_C_CountBASF = 0, + Cat_D_Countf = 0, Cat_D_CountWUH = 0, Cat_D_CountBASF = 0, + allCount = 0, allfinshedCount = 0, allWUH = 0, allBASF = 0; foreach (DataRow row in tb.Rows) { cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]); cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]); cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]); cat_D_Count += Convert.ToInt32(row["Cat_D_Count"]); + // + Cat_A_Countf+= Convert.ToInt32(row["Cat_A_Countf"]); + Cat_A_CountWUH += Convert.ToInt32(row["Cat_A_CountWUH"]); + Cat_A_CountBASF += Convert.ToInt32(row["Cat_A_CountBASF"]); + + Cat_B_Countf += Convert.ToInt32(row["Cat_B_Countf"]); + Cat_B_CountWUH += Convert.ToInt32(row["Cat_B_CountWUH"]); + Cat_B_CountBASF += Convert.ToInt32(row["Cat_B_CountBASF"]); + + Cat_C_Countf += Convert.ToInt32(row["Cat_C_Countf"]); + Cat_C_CountWUH += Convert.ToInt32(row["Cat_C_CountWUH"]); + Cat_C_CountBASF += Convert.ToInt32(row["Cat_C_CountBASF"]); + + Cat_D_Countf += Convert.ToInt32(row["Cat_D_Countf"]); + Cat_D_CountWUH += Convert.ToInt32(row["Cat_D_CountWUH"]); + Cat_D_CountBASF += Convert.ToInt32(row["Cat_D_CountBASF"]); + + allCount += Convert.ToInt32(row["allCount"]); + allfinshedCount += Convert.ToInt32(row["allfinshedCount"]); + allWUH += Convert.ToInt32(row["allWUH"]); + allBASF += Convert.ToInt32(row["allBASF"]); } @@ -306,6 +433,27 @@ namespace FineUIPro.Web.Transfer.Chart summary.Add("Cat_C_Count", cat_C_Count.ToString()); summary.Add("Cat_D_Count", cat_D_Count.ToString()); + summary.Add("Cat_A_Countf", Cat_A_Countf.ToString()); + summary.Add("Cat_A_CountWUH", Cat_A_CountWUH.ToString()); + summary.Add("Cat_A_CountBASF", Cat_A_CountBASF.ToString()); + + summary.Add("Cat_B_Countf", Cat_B_Countf.ToString()); + summary.Add("Cat_B_CountWUH", Cat_B_CountWUH.ToString()); + summary.Add("Cat_B_CountBASF", Cat_B_CountBASF.ToString()); + + summary.Add("Cat_C_Countf", Cat_C_Countf.ToString()); + summary.Add("Cat_C_CountWUH", Cat_C_CountWUH.ToString()); + summary.Add("Cat_C_CountBASF", Cat_C_CountBASF.ToString()); + + summary.Add("Cat_D_Countf", Cat_D_Countf.ToString()); + summary.Add("Cat_D_CountWUH", Cat_D_CountWUH.ToString()); + summary.Add("Cat_D_CountBASF", Cat_D_CountBASF.ToString()); + + summary.Add("allCount", allCount.ToString()); + summary.Add("allfinshedCount", allfinshedCount.ToString()); + summary.Add("allWUH", allWUH.ToString()); + summary.Add("allBASF", allBASF.ToString()); + Grid1.SummaryData = summary; } @@ -327,13 +475,50 @@ namespace FineUIPro.Web.Transfer.Chart strSql.AppendLine(" AND System_No=@System_No "); listStr.Add(new SqlParameter("@System_No", _systemNo)); } - strSql.AppendLine(" select Action_By,cast(0 as decimal(18,2)) Cat_All_Count,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp2 from #AllPunchlistFromSortTemp2 Group by Action_By; "); - strSql.AppendLine(" update a set a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')) "); - strSql.AppendLine(",a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) "); - strSql.AppendLine(",a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) "); - strSql.AppendLine(",a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) "); - strSql.AppendLine("from #PunchlistFromSortTemp2 a;"); - strSql.AppendLine(" update #PunchlistFromSortTemp2 set Cat_All_Count=Cat_A_Count+Cat_B_Count+Cat_C_Count+Cat_D_Count; "); + strSql.AppendLine(@" select Action_By, + cast(0 as decimal(18, 2)) Cat_A_Count, + cast(0 as decimal(18, 2)) Cat_A_Countf, cast(0 as decimal(18, 2)) Cat_A_CountWUH, cast(0 as decimal(18, 2)) Cat_A_CountBASF, + cast(0 as decimal(18, 2)) Cat_B_Count, + cast(0 as decimal(18, 2)) Cat_B_Countf, cast(0 as decimal(18, 2)) Cat_B_CountWUH, cast(0 as decimal(18, 2)) Cat_B_CountBASF, + cast(0 as decimal(18, 2)) Cat_C_Count, + cast(0 as decimal(18, 2)) Cat_C_Countf, cast(0 as decimal(18, 2)) Cat_C_CountWUH, cast(0 as decimal(18, 2)) Cat_C_CountBASF, + cast(0 as decimal(18, 2)) Cat_D_Count, + cast(0 as decimal(18, 2)) Cat_D_Countf, cast(0 as decimal(18, 2)) Cat_D_CountWUH, cast(0 as decimal(18, 2)) Cat_D_CountBASF, + cast(0 as decimal(18, 2)) allCount, cast(0 as decimal(18, 2)) allfinshedCount, cast(0 as decimal(18, 2)) allWUH, cast(0 as decimal(18, 2)) allBASF + INTO #PunchlistFromSortTemp2 + from #AllPunchlistFromSortTemp2 Group by Action_By; "); + strSql.AppendLine(@" update a set + allCount=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By), + allfinshedCount=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By and (b.Required_Date is not null or b.Required_Date!='')), + allWUH=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + allBASF=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By and (b.Verified_Date is not null or b.Verified_Date!='')), + + a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')), + + a.Cat_A_Countf=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_A_CountWUH=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_A_CountBASF=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) , + + a.Cat_B_Countf=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_B_CountWUH=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_B_CountBASF=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Verified_Date is not null or b.Verified_Date!='')) + + + ,a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) , + + a.Cat_C_Countf=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_C_CountWUH=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_C_CountBASF=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) , + a.Cat_D_Countf=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_D_CountWUH=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_D_CountBASF=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Verified_Date is not null or b.Verified_Date!='')) + + from #PunchlistFromSortTemp2 a;"); + strSql.AppendLine("select * from #PunchlistFromSortTemp2 "); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); strSql.AppendLine(" order by Action_By "); @@ -349,36 +534,90 @@ namespace FineUIPro.Web.Transfer.Chart int cat_B_Count = 0; int cat_C_Count = 0; int cat_D_Count = 0; - int cat_All_Count = 0; + + int Cat_A_Countf = 0, Cat_A_CountWUH = 0, Cat_A_CountBASF = 0, + Cat_B_Countf = 0, Cat_B_CountWUH = 0, Cat_B_CountBASF = 0, + Cat_C_Countf = 0, Cat_C_CountWUH = 0, Cat_C_CountBASF = 0, + Cat_D_Countf = 0, Cat_D_CountWUH = 0, Cat_D_CountBASF = 0, + allCount = 0, allfinshedCount = 0, allWUH = 0, allBASF = 0; foreach (DataRow row in tb.Rows) { - cat_All_Count += Convert.ToInt32(row["Cat_All_Count"]); cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]); cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]); cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]); cat_D_Count += Convert.ToInt32(row["Cat_D_Count"]); + // + Cat_A_Countf += Convert.ToInt32(row["Cat_A_Countf"]); + Cat_A_CountWUH += Convert.ToInt32(row["Cat_A_CountWUH"]); + Cat_A_CountBASF += Convert.ToInt32(row["Cat_A_CountBASF"]); + + Cat_B_Countf += Convert.ToInt32(row["Cat_B_Countf"]); + Cat_B_CountWUH += Convert.ToInt32(row["Cat_B_CountWUH"]); + Cat_B_CountBASF += Convert.ToInt32(row["Cat_B_CountBASF"]); + + Cat_C_Countf += Convert.ToInt32(row["Cat_C_Countf"]); + Cat_C_CountWUH += Convert.ToInt32(row["Cat_C_CountWUH"]); + Cat_C_CountBASF += Convert.ToInt32(row["Cat_C_CountBASF"]); + + Cat_D_Countf += Convert.ToInt32(row["Cat_D_Countf"]); + Cat_D_CountWUH += Convert.ToInt32(row["Cat_D_CountWUH"]); + Cat_D_CountBASF += Convert.ToInt32(row["Cat_D_CountBASF"]); + + allCount += Convert.ToInt32(row["allCount"]); + allfinshedCount += Convert.ToInt32(row["allfinshedCount"]); + allWUH += Convert.ToInt32(row["allWUH"]); + allBASF += Convert.ToInt32(row["allBASF"]); } JObject summary = new JObject(); summary.Add("Action_By", "合计"); - summary.Add("Cat_All_Count", cat_All_Count.ToString()); summary.Add("Cat_A_Count", cat_A_Count.ToString()); summary.Add("Cat_B_Count", cat_B_Count.ToString()); summary.Add("Cat_C_Count", cat_C_Count.ToString()); summary.Add("Cat_D_Count", cat_D_Count.ToString()); + summary.Add("Cat_A_Countf", Cat_A_Countf.ToString()); + summary.Add("Cat_A_CountWUH", Cat_A_CountWUH.ToString()); + summary.Add("Cat_A_CountBASF", Cat_A_CountBASF.ToString()); + + summary.Add("Cat_B_Countf", Cat_B_Countf.ToString()); + summary.Add("Cat_B_CountWUH", Cat_B_CountWUH.ToString()); + summary.Add("Cat_B_CountBASF", Cat_B_CountBASF.ToString()); + + summary.Add("Cat_C_Countf", Cat_C_Countf.ToString()); + summary.Add("Cat_C_CountWUH", Cat_C_CountWUH.ToString()); + summary.Add("Cat_C_CountBASF", Cat_C_CountBASF.ToString()); + + summary.Add("Cat_D_Countf", Cat_D_Countf.ToString()); + summary.Add("Cat_D_CountWUH", Cat_D_CountWUH.ToString()); + summary.Add("Cat_D_CountBASF", Cat_D_CountBASF.ToString()); + + summary.Add("allCount", allCount.ToString()); + summary.Add("allfinshedCount", allfinshedCount.ToString()); + summary.Add("allWUH", allWUH.ToString()); + summary.Add("allBASF", allBASF.ToString()); + Grid2.SummaryData = summary; } protected void TabStrip1_TabIndexChanged(object sender, EventArgs e) { - if (TabStrip1.ActiveTabIndex == 2) + if (TabStrip1.ActiveTabIndex ==0) + { + ddlSystemNo.Hidden = true; + ddlDateType.Hidden = true; + drpChartType.Hidden = true; + BtnAnalyse.Hidden = true; + + } + else if (TabStrip1.ActiveTabIndex == 2) { ddlSystemNo.Hidden = false; ddlDateType.Hidden = true; drpChartType.Hidden = true; + BtnAnalyse.Hidden = false; BindGrid1(); } else if (TabStrip1.ActiveTabIndex == 3) @@ -386,6 +625,7 @@ namespace FineUIPro.Web.Transfer.Chart ddlSystemNo.Hidden = false; ddlDateType.Hidden = true; drpChartType.Hidden = true; + BtnAnalyse.Hidden = false; BindGrid2(); } else if (TabStrip1.ActiveTabIndex == 4) @@ -393,6 +633,7 @@ namespace FineUIPro.Web.Transfer.Chart ddlDateType.Hidden = true; drpChartType.Hidden = true; ddlSystemNo.Hidden = true; + BtnAnalyse.Hidden = false; BindGrid3(); } else { @@ -400,6 +641,7 @@ namespace FineUIPro.Web.Transfer.Chart ddlSystemNo.Hidden = false; ddlDateType.Hidden = false; drpChartType.Hidden = false; + BtnAnalyse.Hidden = false; } } #endregion @@ -413,16 +655,62 @@ namespace FineUIPro.Web.Transfer.Chart StringBuilder strSql = new StringBuilder(""); strSql.AppendLine("IF OBJECT_ID('tempdb..#AllPunchlistFromProgressTemp') IS NOT NULL drop table #AllPunchlistFromProgressTemp; "); strSql.AppendLine("IF OBJECT_ID('tempdb..#PunchlistFromProgressTemp') IS NOT NULL drop table #PunchlistFromProgressTemp; "); - strSql.AppendLine(" select System_No,Actual_Date,Cleared_By,Confirmed_By,Verified_By,ProjectId "); - strSql.AppendLine(" INTO #AllPunchlistFromProgressTemp from Transfer_PunchlistFrom where ProjectId = @ProjectId "); - strSql.AppendLine(" select System_No,count(System_No) SystemNoCount,cast(0 as decimal(18,2)) ActualDateCount "); - strSql.AppendLine(" ,cast(0 as decimal(18,2)) ClearedByCount,cast(0 as decimal(18,2)) ConfirmedByCount,cast(0 as decimal(18,2)) VerifiedByCount "); - strSql.AppendLine(" INTO #PunchlistFromProgressTemp from #AllPunchlistFromProgressTemp where ProjectId = @ProjectId group by System_No "); - strSql.AppendLine(" update a set a.ActualDateCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Actual_Date,'')<>'') "); - strSql.AppendLine(" ,a.ClearedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Cleared_By,'')<>'') "); - strSql.AppendLine(" ,a.ConfirmedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Confirmed_By,'')<>'') "); - strSql.AppendLine(" ,a.VerifiedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Verified_By,'')<>'') "); - strSql.AppendLine(" from #PunchlistFromProgressTemp a "); + + strSql.AppendLine(" select * INTO #AllPunchlistFromProgressTemp from Transfer_PunchlistFrom(NOLOCK) where ProjectId=@ProjectId "); + //strSql.AppendLine(" select System_No,count(System_No) SystemNoCount,cast(0 as decimal(18,2)) ActualDateCount "); + //strSql.AppendLine(" ,cast(0 as decimal(18,2)) ClearedByCount,cast(0 as decimal(18,2)) ConfirmedByCount,cast(0 as decimal(18,2)) VerifiedByCount "); + //strSql.AppendLine(" INTO #PunchlistFromProgressTemp from #AllPunchlistFromProgressTemp where ProjectId = @ProjectId group by System_No "); + //strSql.AppendLine(" update a set a.ActualDateCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Actual_Date,'')<>'') "); + //strSql.AppendLine(" ,a.ClearedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Cleared_By,'')<>'') "); + //strSql.AppendLine(" ,a.ConfirmedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Confirmed_By,'')<>'') "); + //strSql.AppendLine(" ,a.VerifiedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Verified_By,'')<>'') "); + + strSql.AppendLine(@" select System_No, + cast(0 as decimal(18, 2)) Cat_A_Count, + cast(0 as decimal(18, 2)) Cat_A_Countf, cast(0 as decimal(18, 2)) Cat_A_CountWUH, cast(0 as decimal(18, 2)) Cat_A_CountBASF, + cast(0 as decimal(18, 2)) Cat_B_Count, + cast(0 as decimal(18, 2)) Cat_B_Countf, cast(0 as decimal(18, 2)) Cat_B_CountWUH, cast(0 as decimal(18, 2)) Cat_B_CountBASF, + cast(0 as decimal(18, 2)) Cat_C_Count, + cast(0 as decimal(18, 2)) Cat_C_Countf, cast(0 as decimal(18, 2)) Cat_C_CountWUH, cast(0 as decimal(18, 2)) Cat_C_CountBASF, + cast(0 as decimal(18, 2)) Cat_D_Count, + cast(0 as decimal(18, 2)) Cat_D_Countf, cast(0 as decimal(18, 2)) Cat_D_CountWUH, cast(0 as decimal(18, 2)) Cat_D_CountBASF, + cast(0 as decimal(18, 2)) allCount, cast(0 as decimal(18, 2)) allfinshedCount, cast(0 as decimal(18, 2)) allWUH, cast(0 as decimal(18, 2)) allBASF + INTO #PunchlistFromProgressTemp + from #AllPunchlistFromProgressTemp Group by System_No; "); + strSql.AppendLine(@" update a set + allCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No), + allfinshedCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No and (b.Required_Date is not null or b.Required_Date!='')), + allWUH=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + allBASF=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No and (b.Verified_Date is not null or b.Verified_Date!='')), + + a.Cat_A_Count=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')), + + a.Cat_A_Countf=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_A_CountWUH=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_A_CountBASF=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_B_Count=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) , + + a.Cat_B_Countf=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_B_CountWUH=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_B_CountBASF=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b') and (b.Verified_Date is not null or b.Verified_Date!='')) + + + ,a.Cat_C_Count=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) , + + a.Cat_C_Countf=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_C_CountWUH=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_C_CountBASF=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c') and (b.Verified_Date is not null or b.Verified_Date!='')) + + ,a.Cat_D_Count=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) , + a.Cat_D_Countf=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Required_Date is not null or b.Required_Date!='')), + a.Cat_D_CountWUH=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Confirmed_Date is not null or b.Confirmed_Date!='')), + a.Cat_D_CountBASF=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d') and (b.Verified_Date is not null or b.Verified_Date!='')) + + from #PunchlistFromProgressTemp a;"); + + + strSql.AppendLine(" select * from #PunchlistFromProgressTemp "); List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); @@ -434,6 +722,78 @@ namespace FineUIPro.Web.Transfer.Chart var table = this.GetPagedDataTable(Grid1, tb); Grid3.DataSource = table; Grid3.DataBind(); + + //合计 + int cat_A_Count = 0; + int cat_B_Count = 0; + int cat_C_Count = 0; + int cat_D_Count = 0; + + int Cat_A_Countf = 0, Cat_A_CountWUH = 0, Cat_A_CountBASF = 0, + Cat_B_Countf = 0, Cat_B_CountWUH = 0, Cat_B_CountBASF = 0, + Cat_C_Countf = 0, Cat_C_CountWUH = 0, Cat_C_CountBASF = 0, + Cat_D_Countf = 0, Cat_D_CountWUH = 0, Cat_D_CountBASF = 0, + allCount = 0, allfinshedCount = 0, allWUH = 0, allBASF = 0; + foreach (DataRow row in tb.Rows) + { + cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]); + cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]); + cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]); + cat_D_Count += Convert.ToInt32(row["Cat_D_Count"]); + // + Cat_A_Countf += Convert.ToInt32(row["Cat_A_Countf"]); + Cat_A_CountWUH += Convert.ToInt32(row["Cat_A_CountWUH"]); + Cat_A_CountBASF += Convert.ToInt32(row["Cat_A_CountBASF"]); + + Cat_B_Countf += Convert.ToInt32(row["Cat_B_Countf"]); + Cat_B_CountWUH += Convert.ToInt32(row["Cat_B_CountWUH"]); + Cat_B_CountBASF += Convert.ToInt32(row["Cat_B_CountBASF"]); + + Cat_C_Countf += Convert.ToInt32(row["Cat_C_Countf"]); + Cat_C_CountWUH += Convert.ToInt32(row["Cat_C_CountWUH"]); + Cat_C_CountBASF += Convert.ToInt32(row["Cat_C_CountBASF"]); + + Cat_D_Countf += Convert.ToInt32(row["Cat_D_Countf"]); + Cat_D_CountWUH += Convert.ToInt32(row["Cat_D_CountWUH"]); + Cat_D_CountBASF += Convert.ToInt32(row["Cat_D_CountBASF"]); + + allCount += Convert.ToInt32(row["allCount"]); + allfinshedCount += Convert.ToInt32(row["allfinshedCount"]); + allWUH += Convert.ToInt32(row["allWUH"]); + allBASF += Convert.ToInt32(row["allBASF"]); + } + + + JObject summary = new JObject(); + summary.Add("System_No", "合计"); + summary.Add("Cat_A_Count", cat_A_Count.ToString()); + summary.Add("Cat_B_Count", cat_B_Count.ToString()); + summary.Add("Cat_C_Count", cat_C_Count.ToString()); + summary.Add("Cat_D_Count", cat_D_Count.ToString()); + + summary.Add("Cat_A_Countf", Cat_A_Countf.ToString()); + summary.Add("Cat_A_CountWUH", Cat_A_CountWUH.ToString()); + summary.Add("Cat_A_CountBASF", Cat_A_CountBASF.ToString()); + + summary.Add("Cat_B_Countf", Cat_B_Countf.ToString()); + summary.Add("Cat_B_CountWUH", Cat_B_CountWUH.ToString()); + summary.Add("Cat_B_CountBASF", Cat_B_CountBASF.ToString()); + + summary.Add("Cat_C_Countf", Cat_C_Countf.ToString()); + summary.Add("Cat_C_CountWUH", Cat_C_CountWUH.ToString()); + summary.Add("Cat_C_CountBASF", Cat_C_CountBASF.ToString()); + + summary.Add("Cat_D_Countf", Cat_D_Countf.ToString()); + summary.Add("Cat_D_CountWUH", Cat_D_CountWUH.ToString()); + summary.Add("Cat_D_CountBASF", Cat_D_CountBASF.ToString()); + + summary.Add("allCount", allCount.ToString()); + summary.Add("allfinshedCount", allfinshedCount.ToString()); + summary.Add("allWUH", allWUH.ToString()); + summary.Add("allBASF", allBASF.ToString()); + + + Grid3.SummaryData = summary; } /// diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs index 6aeb2ab7..242da888 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs @@ -122,15 +122,6 @@ namespace FineUIPro.Web.Transfer.Chart /// protected global::FineUIPro.ContentPanel cpAccidentTime; - /// - /// ChartAccidentTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::Web.Controls.ChartControl ChartAccidentTime; - /// /// Tab2 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx index c362efa3..d22b2e3b 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx @@ -75,21 +75,21 @@ - - - - + --%> <%-- @@ -107,9 +107,9 @@ HeaderTextAlign="Center" minWidth="120px"> --%> - - + --%> diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs index ba71c3f1..2d9f55d9 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs @@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 10); + AddDatasetToSQL(ds.Tables[0], 7); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -280,7 +280,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 10); + AddDatasetToSQL2(ds.Tables[0], 7); } catch (Exception ex) { @@ -330,18 +330,18 @@ namespace FineUIPro.Web.Transfer var obj1 = model.Foundation = pds.Rows[i][5].ToString().Trim(); var obj2 = model.Mainstructure = pds.Rows[i][6].ToString().Trim(); - var obj3 = model.Equipment = pds.Rows[i][7].ToString().Trim(); - var obj4 = model.Buildingdecoration = pds.Rows[i][8].ToString().Trim(); - var obj5 = model.HVAC = pds.Rows[i][9].ToString().Trim(); + //var obj3 = model.Equipment = pds.Rows[i][7].ToString().Trim(); + //var obj4 = model.Buildingdecoration = pds.Rows[i][8].ToString().Trim(); + //var obj5 = model.HVAC = pds.Rows[i][9].ToString().Trim(); #region 判断状态 var listObj = new List(); listObj.Add(obj1); listObj.Add(obj2); - listObj.Add(obj3); - listObj.Add(obj4); - listObj.Add(obj5); + //listObj.Add(obj3); + //listObj.Add(obj4); + //listObj.Add(obj5); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 5) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 2) { model.FINAL_Status = "Completed"; list.Add(model); @@ -350,7 +350,7 @@ namespace FineUIPro.Web.Transfer //如果全是Not Start 就是 Not Start - if (listObj.Where(x => x == "Not Start").ToList().Count == 5) + if (listObj.Where(x => x == "Not Start").ToList().Count == 2) { model.FINAL_Status = "Not Start"; list.Add(model); diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx index 7af71150..c2e12ad1 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx @@ -50,21 +50,21 @@ - + - + - + <%-- @@ -76,7 +76,7 @@ - + --%> @@ -101,12 +101,12 @@ --%> - + <%-- - + --%> diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.cs index aeebf2a0..7d831ab8 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.cs @@ -56,13 +56,13 @@ namespace FineUIPro.Web.Transfer txtTest_Package.Text = model.Test_Package; ddlFoundation.SelectedValue = model.Foundation; ddlMainstructure.SelectedValue = model.Mainstructure; - ddlBuildingdecoration.SelectedValue = model.Buildingdecoration; - ddlEquipment.SelectedValue = model.Equipment; + //ddlBuildingdecoration.SelectedValue = model.Buildingdecoration; + //ddlEquipment.SelectedValue = model.Equipment; //ddlInstrument.SelectedValue = model.Instrument; //ddlElectrical.SelectedValue = model.Electrical; //ddlFireFighting.SelectedValue = model.FireFighting; - ddlHVAC.SelectedValue = model.HVAC; + //ddlHVAC.SelectedValue = model.HVAC; txtDescriptions.Text = model.Descriptions; } } @@ -80,13 +80,13 @@ namespace FineUIPro.Web.Transfer Test_Package = txtTest_Package.Text, Foundation = ddlFoundation.SelectedValue, Mainstructure = ddlMainstructure.SelectedValue, - Buildingdecoration = ddlBuildingdecoration.SelectedValue, - Equipment = ddlEquipment.SelectedValue, + //Buildingdecoration = ddlBuildingdecoration.SelectedValue, + //Equipment = ddlEquipment.SelectedValue, //Instrument = ddlInstrument.SelectedValue, //Electrical = ddlElectrical.SelectedValue, //FireFighting = ddlFireFighting.SelectedValue, - HVAC = ddlHVAC.SelectedValue, + //HVAC = ddlHVAC.SelectedValue, Descriptions= txtDescriptions.Text }; @@ -95,19 +95,19 @@ namespace FineUIPro.Web.Transfer var listObj = new List(); listObj.Add(model.Foundation); listObj.Add(model.Mainstructure); - listObj.Add(model.Buildingdecoration); - listObj.Add(model.Equipment); + //listObj.Add(model.Buildingdecoration); + //listObj.Add(model.Equipment); //listObj.Add(model.Instrument); //listObj.Add(model.Electrical); //listObj.Add(model.FireFighting); - listObj.Add(model.HVAC); + //listObj.Add(model.HVAC); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 5) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 2) { model.FINAL_Status = "Completed"; } //如果全是Not Start 就是 Not Start - else if (listObj.Where(x => x == "Not Start").ToList().Count == 5) + else if (listObj.Where(x => x == "Not Start").ToList().Count == 2) { model.FINAL_Status = "Not Start"; } @@ -130,13 +130,13 @@ namespace FineUIPro.Web.Transfer newModel.Test_Package = txtTest_Package.Text; newModel.Foundation = ddlFoundation.SelectedValue; newModel.Mainstructure = ddlMainstructure.SelectedValue; - newModel.Buildingdecoration = ddlBuildingdecoration.SelectedValue; - newModel.Equipment = ddlEquipment.SelectedValue; + //newModel.Buildingdecoration = ddlBuildingdecoration.SelectedValue; + //newModel.Equipment = ddlEquipment.SelectedValue; //newModel.Instrument = ddlInstrument.SelectedValue; //newModel.Electrical = ddlElectrical.SelectedValue; //newModel.FireFighting = ddlFireFighting.SelectedValue; - newModel.HVAC = ddlHVAC.SelectedValue; + //newModel.HVAC = ddlHVAC.SelectedValue; newModel.FINAL_Status = model.FINAL_Status; newModel.Descriptions = txtDescriptions.Text; } diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.designer.cs index 93f9a1fd..0f983004 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureEdit.aspx.designer.cs @@ -104,33 +104,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlMainstructure; - /// - /// ddlEquipment 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlEquipment; - - /// - /// ddlBuildingdecoration 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlBuildingdecoration; - - /// - /// ddlHVAC 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlHVAC; - /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx index b26a153b..652aac34 100644 --- a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx @@ -76,7 +76,11 @@ - + + + diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs index 9e9e50ef..670c27aa 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs @@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 10); + AddDatasetToSQL(ds.Tables[0], 11); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -280,7 +280,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 10); + AddDatasetToSQL2(ds.Tables[0], 11); } catch (Exception ex) { @@ -327,11 +327,12 @@ namespace FineUIPro.Web.Transfer model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim(); model.Test_Package = pds.Rows[i][3 + 1].ToString().Trim(); - var obj1 = model.InstallationCalibration = pds.Rows[i][4 + 1].ToString().Trim(); - var obj2 = model.PipingPressuretest = pds.Rows[i][5 + 1].ToString().Trim(); - var obj3 = model.PipingLeak = pds.Rows[i][6 + 1].ToString().Trim(); - var obj4 = model.PipingBlowing = pds.Rows[i][7 + 1].ToString().Trim(); - var obj5 = model.Looptest = pds.Rows[i][8 + 1].ToString().Trim(); + var obj0 = model.Calibration = pds.Rows[i][5].ToString().Trim(); + var obj1 = model.InstallationCalibration = pds.Rows[i][6].ToString().Trim(); + var obj2 = model.PipingPressuretest = pds.Rows[i][7].ToString().Trim(); + var obj3 = model.PipingLeak = pds.Rows[i][8].ToString().Trim(); + var obj4 = model.PipingBlowing = pds.Rows[i][9].ToString().Trim(); + var obj5 = model.Looptest = pds.Rows[i][10].ToString().Trim(); #region 判断状态 var listObj = new List(); listObj.Add(obj1); @@ -339,8 +340,9 @@ namespace FineUIPro.Web.Transfer listObj.Add(obj3); listObj.Add(obj4); listObj.Add(obj5); + listObj.Add(obj0); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 5) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 6) { model.FINAL_Status = "Completed"; list.Add(model); @@ -349,7 +351,7 @@ namespace FineUIPro.Web.Transfer //如果全是Not Start 就是 Not Start - if (listObj.Where(x => x == "Not Start").ToList().Count == 5) + if (listObj.Where(x => x == "Not Start").ToList().Count == 6) { model.FINAL_Status = "Not Start"; list.Add(model); diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx index f643e99b..96108c87 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx @@ -50,7 +50,14 @@ - + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.cs index 7979c3e7..f7c1eed8 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.cs @@ -60,6 +60,7 @@ namespace FineUIPro.Web.Transfer ddlPipingLeak.SelectedValue = model.PipingLeak; ddlPipingBlowing.SelectedValue = model.PipingBlowing; ddlLooptest.SelectedValue = model.Looptest; + ddlCalibration.SelectedValue = model.Calibration; txtDescriptions.Text = model.Descriptions; } } @@ -80,6 +81,7 @@ namespace FineUIPro.Web.Transfer PipingLeak = ddlPipingLeak.SelectedValue, PipingBlowing = ddlPipingBlowing.SelectedValue, Looptest = ddlLooptest.SelectedValue, + Calibration= ddlCalibration.SelectedValue, Descriptions = txtDescriptions.Text }; @@ -91,13 +93,14 @@ namespace FineUIPro.Web.Transfer listObj.Add(model.PipingLeak); listObj.Add(model.PipingBlowing); listObj.Add(model.Looptest); + listObj.Add(model.Calibration); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 5) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 6) { model.FINAL_Status = "Completed"; } //如果全是Not Start 就是 Not Start - else if (listObj.Where(x => x == "Not Start").ToList().Count == 5) + else if (listObj.Where(x => x == "Not Start").ToList().Count == 6) { model.FINAL_Status = "Not Start"; } @@ -123,6 +126,7 @@ namespace FineUIPro.Web.Transfer newModel.PipingLeak = ddlPipingLeak.SelectedValue; newModel.PipingBlowing = ddlPipingBlowing.SelectedValue; newModel.Looptest = ddlLooptest.SelectedValue; + newModel.Calibration = ddlCalibration.SelectedValue; newModel.FINAL_Status = model.FINAL_Status; newModel.Descriptions = txtDescriptions.Text; } diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.designer.cs index 2f26b40a..2f84802f 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationEdit.aspx.designer.cs @@ -86,6 +86,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.TextBox txtDescriptions; + /// + /// ddlCalibration 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlCalibration; + /// /// ddlInstallationCalibration 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx b/SGGL/FineUIPro.Web/Transfer/Piping.aspx index 6be458e7..260ce638 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx @@ -72,7 +72,7 @@ - + <%-- @@ -94,10 +94,14 @@ HeaderTextAlign="Center" Width="120px"> - + --%> + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs index 5ef7233f..ad4e146d 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs @@ -131,15 +131,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.GroupField g2; - /// - /// g3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.GroupField g3; - /// /// g4 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs index 1e16da40..c672ba7d 100644 --- a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 14); + AddDatasetToSQL(ds.Tables[0], 10); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -276,7 +276,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 14); + AddDatasetToSQL2(ds.Tables[0], 10); } catch (Exception ex) { @@ -322,30 +322,30 @@ namespace FineUIPro.Web.Transfer model.TestPackage = pds.Rows[i][3 + 1].ToString().Trim(); var obj1 = model.PWD= pds.Rows[i][4 + 1].ToString().Trim(); - var obj2 =model.Apunchclosed = pds.Rows[i][5 + 1].ToString().Trim(); - var obj3 =model.NDTReport = pds.Rows[i][6 + 1].ToString().Trim(); - var obj4 =model.TemperaryMeasurement = pds.Rows[i][7 + 1].ToString().Trim(); - var obj5 =model.FWDfinished = pds.Rows[i][8 + 1].ToString().Trim(); - var obj6 =model.HydrostaticTest = pds.Rows[i][9 + 1].ToString().Trim(); - var obj7 =model.Report = pds.Rows[i][10].ToString().Trim(); - var obj8 =model.Blowingflushing = pds.Rows[i][11 + 1].ToString().Trim(); - var obj9 = model.Systemreinstalled = pds.Rows[i][12 + 1].ToString().Trim(); - - model.BlowingReport= pds.Rows[i][13].ToString().Trim(); + //var obj2 =model.Apunchclosed = pds.Rows[i][5 + 1].ToString().Trim(); + //var obj3 =model.NDTReport = pds.Rows[i][6 + 1].ToString().Trim(); + //var obj4 =model.TemperaryMeasurement = pds.Rows[i][7 + 1].ToString().Trim(); + //var obj5 =model.FWDfinished = pds.Rows[i][8 + 1].ToString().Trim(); + var obj6 =model.HydrostaticTest = pds.Rows[i][6].ToString().Trim(); + var obj7 =model.Report = pds.Rows[i][7].ToString().Trim(); + var obj8 =model.Blowingflushing = pds.Rows[i][8].ToString().Trim(); + var obj9 = model.Systemreinstalled = pds.Rows[i][9].ToString().Trim(); + + model.BlowingReport= pds.Rows[i][10].ToString().Trim(); #region 判断状态 var listObj = new List(); listObj.Add(obj1); - listObj.Add(obj2); - listObj.Add(obj3); - listObj.Add(obj4); - listObj.Add(obj5); + //listObj.Add(obj2); + //listObj.Add(obj3); + //listObj.Add(obj4); + //listObj.Add(obj10); listObj.Add(obj6); listObj.Add(obj7); listObj.Add(obj8); listObj.Add(obj9); //全是NA或Completed 状态是Completed - if (listObj.Where(x=>x=="NA" || x== "Completed").ToList().Count==9) + if (listObj.Where(x=>x=="NA" || x== "Completed").ToList().Count==5) { model.FINALStatus = "Completed"; list.Add(model); @@ -354,7 +354,7 @@ namespace FineUIPro.Web.Transfer //如果全是Not Start 就是 Not Start - if (listObj.Where(x=>x== "Not Start").ToList().Count==9) + if (listObj.Where(x=>x== "Not Start").ToList().Count==5) { model.FINALStatus = "Not Start"; list.Add(model); diff --git a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx index d383f178..af5509e0 100644 --- a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx @@ -45,7 +45,7 @@ - + <%-- @@ -86,12 +86,19 @@ - + --%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.cs index 9658aa38..c741d152 100644 --- a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.cs @@ -54,13 +54,13 @@ namespace FineUIPro.Web.Transfer txtSubsystem.Text = model.Subsystem; txtTestPackage.Text = model.TestPackage; ddlPWD.SelectedValue = model.PWD; - ddlApunchclosed.SelectedValue = model.Apunchclosed; - ddlNDTReport.SelectedValue = model.NDTReport; - ddlTemperaryMeasurement.SelectedValue = model.TemperaryMeasurement; + //ddlApunchclosed.SelectedValue = model.Apunchclosed; + //ddlNDTReport.SelectedValue = model.NDTReport; + //ddlTemperaryMeasurement.SelectedValue = model.TemperaryMeasurement; ddlHydrostaticTest.SelectedValue = model.HydrostaticTest; ddlReport.SelectedValue = model.Report; ddlBlowingflushing.SelectedValue = model.Blowingflushing; - ddlFWDfinished.SelectedValue = model.FWDfinished; + //ddlFWDfinished.SelectedValue = model.FWDfinished; ddlSystemreinstalled.SelectedValue = model.Systemreinstalled; txtBlowingReport.Text = model.BlowingReport; @@ -78,13 +78,13 @@ namespace FineUIPro.Web.Transfer Subsystem = txtSubsystem.Text, TestPackage = txtTestPackage.Text, PWD = ddlPWD.SelectedValue, - Apunchclosed = ddlApunchclosed.SelectedValue, - NDTReport= ddlNDTReport.SelectedValue, - TemperaryMeasurement= ddlTemperaryMeasurement.SelectedValue, + //Apunchclosed = ddlApunchclosed.SelectedValue, + //NDTReport= ddlNDTReport.SelectedValue, + //TemperaryMeasurement= ddlTemperaryMeasurement.SelectedValue, HydrostaticTest=ddlHydrostaticTest.SelectedValue, Report= ddlReport.SelectedValue, Blowingflushing= ddlBlowingflushing.SelectedValue, - FWDfinished= ddlFWDfinished.SelectedValue, + //FWDfinished= ddlFWDfinished.SelectedValue, Systemreinstalled= ddlSystemreinstalled.SelectedValue, BlowingReport= txtBlowingReport.Text, Descriptions= txtDescriptions.Text @@ -92,22 +92,23 @@ namespace FineUIPro.Web.Transfer #region 判断状态 var listObj = new List(); listObj.Add(model.PWD); - listObj.Add(model.Apunchclosed); - listObj.Add(model.NDTReport); - listObj.Add(model.TemperaryMeasurement); + //listObj.Add(model.Apunchclosed); + //listObj.Add(model.NDTReport); + //listObj.Add(model.TemperaryMeasurement); listObj.Add(model.HydrostaticTest); listObj.Add(model.Report); listObj.Add(model.Blowingflushing); - listObj.Add(model.FWDfinished); + //listObj.Add(model.FWDfinished); listObj.Add(model.Systemreinstalled); + //listObj.Add(model.BlowingReport); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 9) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 5) { model.FINALStatus = "Completed"; } //如果全是Not Start 就是 Not Start - else if (listObj.Where(x => x == "Not Start").ToList().Count == 9) + else if (listObj.Where(x => x == "Not Start").ToList().Count == 5) { model.FINALStatus = "Not Start"; @@ -129,13 +130,13 @@ namespace FineUIPro.Web.Transfer newModel.Subsystem = newModel.Subsystem; newModel.TestPackage = txtTestPackage.Text; newModel.PWD = ddlPWD.SelectedValue; - newModel.Apunchclosed = ddlApunchclosed.SelectedValue; - newModel.NDTReport = ddlNDTReport.SelectedValue; - newModel.TemperaryMeasurement = ddlTemperaryMeasurement.SelectedValue; + //newModel.Apunchclosed = ddlApunchclosed.SelectedValue; + //newModel.NDTReport = ddlNDTReport.SelectedValue; + //newModel.TemperaryMeasurement = ddlTemperaryMeasurement.SelectedValue; newModel.HydrostaticTest = ddlHydrostaticTest.SelectedValue; newModel.Report = ddlReport.SelectedValue; newModel.Blowingflushing = ddlBlowingflushing.SelectedValue; - newModel.FWDfinished = ddlFWDfinished.SelectedValue; + //newModel.FWDfinished = ddlFWDfinished.SelectedValue; newModel.Systemreinstalled = ddlSystemreinstalled.SelectedValue; newModel.BlowingReport = txtBlowingReport.Text; newModel.FINALStatus = model.FINALStatus; diff --git a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.designer.cs index 0b9d8197..88fbb641 100644 --- a/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/PipingEdit.aspx.designer.cs @@ -95,42 +95,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlPWD; - /// - /// ddlApunchclosed 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlApunchclosed; - - /// - /// ddlNDTReport 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlNDTReport; - - /// - /// ddlTemperaryMeasurement 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlTemperaryMeasurement; - - /// - /// ddlFWDfinished 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlFWDfinished; - /// /// ddlHydrostaticTest 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx index 70ef884b..fb503363 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx @@ -83,6 +83,10 @@ HeaderTextAlign="Center" minWidth="140px"> + + + diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs index 1f91ea64..a0f9db93 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 8); + AddDatasetToSQL(ds.Tables[0], 9); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -276,7 +276,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 8); + AddDatasetToSQL2(ds.Tables[0], 9); } catch (Exception ex) { @@ -305,7 +305,7 @@ namespace FineUIPro.Web.Transfer if (pds != null && ir > 0) { List list = new List(); - for (int i = 1; i < ir; i++) + for (int i = 0; i < ir; i++) { ////查询第一列,没查到的情况下作导入处理 //var modelOnly = Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(x => x.RotatingEquipment == pds.Rows[i][0].ToString().Trim() @@ -323,16 +323,17 @@ namespace FineUIPro.Web.Transfer model.TestPackage = pds.Rows[i][3 + 1].ToString().Trim(); var obj1 = model.Alignment = pds.Rows[i][4 + 1].ToString().Trim(); - var obj2 = model.Motorsoloruntest = pds.Rows[i][5 + 1].ToString().Trim(); - var obj3 = model.Standalonetest = pds.Rows[i][6 + 1].ToString().Trim(); + var obj4=model.Lubricatefilling= pds.Rows[i][6].ToString().Trim(); + var obj2 = model.Motorsoloruntest = pds.Rows[i][7].ToString().Trim(); + var obj3 = model.Standalonetest = pds.Rows[i][8].ToString().Trim(); #region 判断状态 var listObj = new List(); listObj.Add(obj1); listObj.Add(obj2); listObj.Add(obj3); - + listObj.Add(obj4); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 4) { model.MechanicalFINALStatus = "Completed"; list.Add(model); @@ -341,7 +342,7 @@ namespace FineUIPro.Web.Transfer //如果全是Not Start 就是 Not Start - if (listObj.Where(x => x == "Not Start").ToList().Count == 3) + if (listObj.Where(x => x == "Not Start").ToList().Count == 4) { model.MechanicalFINALStatus = "Not Start"; list.Add(model); @@ -361,7 +362,7 @@ namespace FineUIPro.Web.Transfer #endregion - model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); + //model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); if (model.MechanicalFINALStatus.ToLower() == "finished") { model.CompleteTime = DateTime.Now; diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx index 0dadaa43..4f37c6c1 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx @@ -57,6 +57,13 @@ + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.cs index 466259a9..3a45e860 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.cs @@ -57,6 +57,7 @@ namespace FineUIPro.Web.Transfer ddlAlignment.SelectedValue = model.Alignment; ddlMotorsoloruntest.SelectedValue = model.Motorsoloruntest; ddlStandalonetest.SelectedValue = model.Standalonetest; + ddlLubricatefilling.SelectedValue = model.Lubricatefilling; txtDescriptions.Text = model.Descriptions; } } @@ -75,7 +76,8 @@ namespace FineUIPro.Web.Transfer Alignment = ddlAlignment.SelectedValue, Motorsoloruntest = ddlMotorsoloruntest.SelectedValue, Standalonetest = ddlStandalonetest.SelectedValue, - Descriptions= txtDescriptions.Text + Descriptions= txtDescriptions.Text, + Lubricatefilling=ddlLubricatefilling.SelectedValue }; #region 判断状态 @@ -83,13 +85,13 @@ namespace FineUIPro.Web.Transfer listObj.Add(model.Alignment); listObj.Add(model.Motorsoloruntest); listObj.Add(model.Standalonetest); - + listObj.Add(model.Lubricatefilling); //全是NA或Completed 状态是Completed - if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3) + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 4) { model.MechanicalFINALStatus = "Completed"; } //如果全是Not Start 就是 Not Start - else if (listObj.Where(x => x == "Not Start").ToList().Count == 3) + else if (listObj.Where(x => x == "Not Start").ToList().Count == 4) { model.MechanicalFINALStatus = "Not Start"; } @@ -115,6 +117,7 @@ namespace FineUIPro.Web.Transfer newModel.Standalonetest = ddlStandalonetest.SelectedValue; newModel.MechanicalFINALStatus = model.MechanicalFINALStatus; newModel.Descriptions = txtDescriptions.Text; + newModel.Lubricatefilling = ddlLubricatefilling.SelectedValue; } } else diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.designer.cs index 3b3aeb51..b49e65a9 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentEdit.aspx.designer.cs @@ -95,6 +95,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlAlignment; + /// + /// ddlLubricatefilling 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlLubricatefilling; + /// /// ddlMotorsoloruntest 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index f1abefa7..dd1373cb 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -393832,6 +393832,8 @@ namespace Model private string _Descriptions; + private string _Calibration; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -393868,6 +393870,8 @@ namespace Model partial void OnLooptestChanged(); partial void OnDescriptionsChanging(string value); partial void OnDescriptionsChanged(); + partial void OnCalibrationChanging(string value); + partial void OnCalibrationChanged(); #endregion public Transfer_Instrumentation() @@ -394195,6 +394199,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Calibration", DbType="NVarChar(50)")] + public string Calibration + { + get + { + return this._Calibration; + } + set + { + if ((this._Calibration != value)) + { + this.OnCalibrationChanging(value); + this.SendPropertyChanging(); + this._Calibration = value; + this.SendPropertyChanged("Calibration"); + this.OnCalibrationChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -396984,6 +397008,8 @@ namespace Model private string _Descriptions; + private string _Lubricatefilling; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -397016,6 +397042,8 @@ namespace Model partial void OnStandalonetestChanged(); partial void OnDescriptionsChanging(string value); partial void OnDescriptionsChanged(); + partial void OnLubricatefillingChanging(string value); + partial void OnLubricatefillingChanged(); #endregion public Transfer_RotatingEquipment() @@ -397303,6 +397331,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Lubricatefilling", DbType="NVarChar(50)")] + public string Lubricatefilling + { + get + { + return this._Lubricatefilling; + } + set + { + if ((this._Lubricatefilling != value)) + { + this.OnLubricatefillingChanging(value); + this.SendPropertyChanging(); + this._Lubricatefilling = value; + this.SendPropertyChanged("Lubricatefilling"); + this.OnLubricatefillingChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged;