From e384e322be445c40ee90c8cd3a2f0f5938472a7f Mon Sep 17 00:00:00 2001 From: panhf <754998852@qq.com> Date: Fri, 2 Feb 2024 10:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E4=BA=A4=E9=80=92=E5=A2=9E=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_2024-02-02-01-phf.sql | 86 ++++++++++ .../1-14移交管理图表(Menu_Transfer).sql | 4 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../Transfer/Chart/TransferChart.aspx | 96 +++++++++++ .../Transfer/Chart/TransferChart.aspx.cs | 155 ++++++++++++++++++ .../Chart/TransferChart.aspx.designer.cs | 134 +++++++++++++++ .../Transfer/CivilStructureDataIn.aspx.cs | 8 + .../Transfer/ElectricalDataIn.aspx.cs | 9 + .../Transfer/FirefightingDataIn.aspx.cs | 8 + .../FineUIPro.Web/Transfer/HVACDataIn.aspx.cs | 9 + .../Transfer/InstrumentationDataIn.aspx.cs | 9 + .../Transfer/PipingDataIn.aspx.cs | 9 + .../Transfer/PlumbingDataIn.aspx.cs | 8 + .../Transfer/RotatingEquipmentDataIn.aspx.cs | 10 ++ .../Transfer/StaticEquipmentDataIn.aspx.cs | 9 + .../Transfer/TelecomDataIn.aspx.cs | 8 + SGGL/FineUIPro.Web/Web.config | 4 +- 17 files changed, 572 insertions(+), 2 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2024-02-02-01-phf.sql create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_2024-02-02-01-phf.sql b/DataBase/版本日志/SGGLDB_WH_2024-02-02-01-phf.sql new file mode 100644 index 00000000..5ab3c142 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-02-02-01-phf.sql @@ -0,0 +1,86 @@ +Alter VIEW [dbo].[View_TransferDetail] AS +/*ƽбͼ*/ + +select Projectid,SystemName,Subsystem,TestPackage,sDate,fDate,Status,aDate from ( + +SELECT Projectid, SYSTEM as SystemName, Subsystem ,TestPackage, +TestPackageSTART as sDate,TestPackageFINISH as fDate,FINALStatus as Status, +CompleteTime as aDate +FROM Transfer_Piping + +UNION ALL + +SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate, +TestPackageFINISH as fDate, +MechanicalFINALStatus as Status , +CompleteTime as aDate +FROM Transfer_StaticEquipment + +UNION ALL + +SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate, +TestPackageFINISH as fDate, +MechanicalFINALStatus as Status, +CompleteTime as aDate +FROM Transfer_RotatingEquipment + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Instrumentation + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Electrical + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Civil_Structure + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Firefighting + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Telecom + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_Plumbing + +UNION ALL + +SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate, +Test_Package_FINISH as fDate, +FINAL_Status as Status, +CompleteTime as aDate +FROM Transfer_HVAC + +)f + + +GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-14移交管理图表(Menu_Transfer).sql b/DataBase/菜单初始化脚本/1-14移交管理图表(Menu_Transfer).sql index fe41f3c9..7f28b592 100644 --- a/DataBase/菜单初始化脚本/1-14移交管理图表(Menu_Transfer).sql +++ b/DataBase/菜单初始化脚本/1-14移交管理图表(Menu_Transfer).sql @@ -12,5 +12,9 @@ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffi VALUES('C2DD3E9E-DB18-466F-8FA0-19AD6E21EEF0','Punchlist from', 'Transfer/Chart/PunchlistFrom.aspx',20,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B','Menu_Transfer',0,1,1) +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('F97BCF55-E450-4007-AD84-AB64B3496204','ȫƽͳƵ', +'Transfer/Chart/TransferChart.aspx',15,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B','Menu_Transfer',0,1,1) + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 45852f7d..e18797de 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1833,6 +1833,7 @@ + @@ -16378,6 +16379,13 @@ PunchlistFrom.aspx + + TransferChart.aspx + ASPXCodeBehind + + + TransferChart.aspx + CivilStructure.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx new file mode 100644 index 00000000..8b66772e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx @@ -0,0 +1,96 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferChart.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.TransferChart" %> + + + + + + + 全厂移交统计递增表 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + + + + <%-- + + --%> + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + +
+
+
+
+
+
+
+ + + diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.cs new file mode 100644 index 00000000..99add796 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using BLL; + +namespace FineUIPro.Web.Transfer.Chart +{ + public partial class TransferChart : PageBase + { + #region 定义项 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"])) + { + this.ProjectId = Request.Params["projectId"]; + } + + //this.AnalyseData(); + } + } + #endregion + + /// + /// 统计分析 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + this.AnalyseData(); + } + + #region 统计 + private void AnalyseData() { + if (string.IsNullOrEmpty(ProjectId)) + { + Alert.ShowInTop("项目未获取到,请刷新页面。", MessageBoxIcon.Warning); + return; + } + var sTime = DateTime.Now.AddDays(-7); + var eTime = DateTime.Now; + if (string.IsNullOrEmpty(txtStarTime.Text) || string.IsNullOrEmpty(txtEndTime.Text)) + { + Alert.ShowInTop("请选择日期。", MessageBoxIcon.Warning); + return; + } + else + { + sTime = Convert.ToDateTime(txtStarTime.Text); + + eTime = Convert.ToDateTime(txtEndTime.Text).AddMonths(1).AddDays(-1); + } + var AfinishedCountSum = 0;//总的实际完成数量 + var PfinishedCountSum = 0;//总的计划完成数量 + switch (drpType.SelectedValue) + { + #region 全部 + case "": + //根据当前计划完成日期 查询总的计划完成的数量 + var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId + && x.FDate >= sTime + && x.FDate < eTime + && x.Status.ToLower() == "finished").ToList(); + //查询TestPackage 去重 + var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct(); + + foreach (var item in testpackageList) { + //查询第12个表的数量 + var punchlistFromList = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == ProjectId + && x.Test_Package == item + ).ToList(); + //如果查到 + if (punchlistFromList.Count > 0) + { + //12表当前日期完成的数量 + var punchlistFromFinshCount = punchlistFromList.Where(x => x.PUNCH_ITEM_STATUS.ToLower() == "finished").ToList().Count(); + //如果完成的数量等于总得数量,则是完成 + if (punchlistFromFinshCount == punchlistFromList.Count) + { + PfinishedCountSum += 1; + } + } + else { + PfinishedCountSum += 1; + } + + } + + + break; + #endregion + + } + + + DataTable dtTime = new DataTable(); + dtTime.Columns.Add("日期", typeof(string)); + dtTime.Columns.Add("Actual Finished", typeof(string)); + dtTime.Columns.Add("Plan Finished", typeof(string)); + + for (var i = sTime; i <= eTime; i = i.AddMonths(1)) { + var AfinishedCount = 0;//实际完成数量 + var PfinishedCount = 0;//计划完成数量 + DataRow rowTime = dtTime.NewRow(); + rowTime["日期"] = string.Format("{0:yyyy-MM}", i); + switch (drpType.SelectedValue) + { + #region 全部 + case "": + //根据当前计划完成日期 查询完成的数量 + var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId + && x.FDate >= Convert.ToDateTime(rowTime["日期"]) + && x.FDate < Convert.ToDateTime(rowTime["日期"]).AddMonths(1) + && x.Status.ToLower()== "finished").ToList(); + //查询TestPackage的总数量,状态是完成的。 + var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct(); + foreach (var item in testpackageList) { + + } + break; + #endregion + + } + + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.designer.cs new file mode 100644 index 00000000..dcc82d4a --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/TransferChart.aspx.designer.cs @@ -0,0 +1,134 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer.Chart +{ + + + public partial class TransferChart + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region1; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// drpType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpType; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Tab2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab2; + + /// + /// cpCostTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel cpCostTime; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs index bdb57aa1..27aa40b4 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs @@ -350,6 +350,10 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } list.Add(model); } else @@ -365,6 +369,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs index 9fd99938..210b4df8 100644 --- a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs @@ -349,6 +349,11 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } + list.Add(model); } else @@ -364,6 +369,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs index aeb83cbf..537d4feb 100644 --- a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs @@ -349,6 +349,10 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } list.Add(model); } else @@ -364,6 +368,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs index 09b7148a..9f190958 100644 --- a/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs @@ -349,6 +349,11 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } + list.Add(model); } else @@ -364,6 +369,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs index af824d08..04a129a9 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs @@ -350,6 +350,11 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } + list.Add(model); } else @@ -365,6 +370,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } diff --git a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs index 6288b651..e6b99b72 100644 --- a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs @@ -344,6 +344,11 @@ namespace FineUIPro.Web.Transfer model.TestPackageFINISH = t2; model.FINALStatus = pds.Rows[i][6].ToString().Trim(); + if (model.FINALStatus.ToLower()== "finished") + { + model.CompleteTime = DateTime.Now; + } + model.PreTestFINISHED = pds.Rows[i][7].ToString().Trim(); model.FinalTestFINISHED = pds.Rows[i][8].ToString().Trim(); list.Add(model); @@ -361,6 +366,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.TestPackageFINISH = t2; modelOnly.FINALStatus = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINALStatus.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } modelOnly.PreTestFINISHED = pds.Rows[i][7].ToString().Trim(); modelOnly.FinalTestFINISHED = pds.Rows[i][8].ToString().Trim(); Funs.DB.SubmitChanges(); diff --git a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs index 3974b8f4..eac8c964 100644 --- a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs @@ -350,6 +350,10 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } list.Add(model); } else @@ -365,6 +369,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs index bdc66334..46d84158 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs @@ -344,6 +344,10 @@ namespace FineUIPro.Web.Transfer model.TestPackageFINISH = t2; model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); + if (model.MechanicalFINALStatus.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } list.Add(model); } else @@ -359,6 +363,12 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.TestPackageFINISH = t2; modelOnly.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); + + if (modelOnly.MechanicalFINALStatus.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } + Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs index f6476672..2746a5c5 100644 --- a/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs @@ -344,6 +344,11 @@ namespace FineUIPro.Web.Transfer model.TestPackageFINISH = t2; model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); + if (model.MechanicalFINALStatus.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } + list.Add(model); } else @@ -359,6 +364,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.TestPackageFINISH = t2; modelOnly.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.MechanicalFINALStatus.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs index 2475a6b4..a67ffc19 100644 --- a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs @@ -350,6 +350,10 @@ namespace FineUIPro.Web.Transfer model.Test_Package_FINISH = t2; model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (model.FINAL_Status.ToLower() == "finished") + { + model.CompleteTime = DateTime.Now; + } list.Add(model); } else @@ -365,6 +369,10 @@ namespace FineUIPro.Web.Transfer if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) modelOnly.Test_Package_FINISH = t2; modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + if (modelOnly.FINAL_Status.ToLower() == "finished") + { + modelOnly.CompleteTime = DateTime.Now; + } Funs.DB.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index b8efca33..6f9fe9f9 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -11,8 +11,8 @@ - + @@ -77,7 +77,7 @@ - +