全厂移交统计表

This commit is contained in:
潘鸿锋 2024-01-30 16:01:53 +08:00
parent fdf500e8d0
commit 183af3a610
15 changed files with 650 additions and 373 deletions

View File

@ -755,3 +755,126 @@ IP地址:::1
出错时间:01/29/2024 15:51:59
出错时间:01/29/2024 15:51:59
错误信息开始=====>
错误类型:HttpCompileException
错误信息:e:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\Chart\Instrumentation.aspx(66): error CS0123: “tvControlItem_NodeCommand”的重载均与委托“System.EventHandler<FineUIPro.TreeCommandEventArgs>”不匹配
错误堆栈:
在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:01/30/2024 10:25:17
出错文件:http://localhost:8579/Transfer/Chart/Instrumentation.aspx
IP地址:::1
出错时间:01/30/2024 10:25:18
错误信息开始=====>
错误类型:HttpParseException
错误信息:FineUIPro.RegionCollection 必须具有类型为“FineUIPro.Region”的项。“f:Tree”的类型为“FineUIPro.Tree”。
错误堆栈:
在 System.Web.UI.TemplateParser.ProcessException(Exception ex)
在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
----错误类型:HttpException
----错误信息:
----FineUIPro.RegionCollection 必须具有类型为“FineUIPro.Region”的项。“f:Tree”的类型为“FineUIPro.Tree”。
----错误堆栈:
在 System.Web.UI.CollectionBuilder.GetChildControlType(String tagName, IDictionary attribs)
在 System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty)
在 System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText)
在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
出错时间:01/30/2024 10:33:19
出错文件:http://localhost:8579/Transfer/Chart/Instrumentation.aspx
IP地址:::1
出错时间:01/30/2024 10:33:19
错误信息开始=====>
错误类型:SqlException
错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
错误堆栈:
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.ExecuteReader()
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
在 FineUIPro.Web.common.main_new.Page_Load(Object sender, EventArgs e) 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\main_new.aspx.cs:行号 67
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
----错误类型:Win32Exception
----错误信息:
----等待的操作过时。
----错误堆栈:
出错时间:01/30/2024 10:40:32
出错文件:http://localhost:8579/common/main_new.aspx
IP地址:127.0.0.1
操作人员:JT
出错时间:01/30/2024 10:40:32
错误信息开始=====>
错误类型:SqlException
错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
错误堆栈:
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.ExecuteReader()
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
在 FineUIPro.Web.common.main_new.Page_Load(Object sender, EventArgs e) 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\main_new.aspx.cs:行号 67
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
----错误类型:Win32Exception
----错误信息:
----等待的操作过时。
----错误堆栈:
出错时间:01/30/2024 10:41:13
出错文件:http://localhost:8579/common/main_new.aspx
IP地址:127.0.0.1
操作人员:JT
出错时间:01/30/2024 10:41:13

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -5,7 +5,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
@ -40,6 +40,8 @@
</f:CheckBox>--%>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
</Items>
</f:FormRow>
</Rows>
@ -63,9 +65,20 @@
</Items>
<Items>
<f:Tree ID="Tree1" IsFluid="true" ShowHeader="true" EnableCollapse="false"
Title="System" runat="server" Width="400px" CssStyle="width:200px; height:600px">
<%-- <f:Tree ID="Tree1" IsFluid="true" ShowHeader="true" EnableCollapse="false"
Title="System" runat="server" Width="400px" CssStyle="width:200px; height:600px"
OnNodeCommand="tvControlItem_NodeCommand"
AutoLeafIdentification="true">
</f:Tree>--%>
<%--<f:Tree ID="Tree1" IsFluid="true" EnableCollapse="false" ShowHeader="false"
OnNodeCommand="tvControlItem_NodeCommand" CssStyle="width:200px; height:600px"
runat="server">
</f:Tree>--%>
<f:Tree ID="trRectify" Width="200px" EnableCollapse="true" ShowHeader="true"
CssStyle="width:200px; height:600px"
OnNodeCommand="trRectify_NodeCommand" AutoLeafIdentification="true" runat="server">
</f:Tree>
</Items>
</f:Tab>
</Tabs>

View File

@ -52,6 +52,12 @@ namespace FineUIPro.Web.Transfer.Chart
/// </summary>
private void AnalyseData()
{
if (string.IsNullOrEmpty(ProjectId))
{
Alert.ShowInTop("项目未获取到,请刷新页面。", MessageBoxIcon.Warning);
return;
}
var sTime = DateTime.Now.AddDays(-7);
var eTime = DateTime.Now; ;
@ -64,8 +70,9 @@ namespace FineUIPro.Web.Transfer.Chart
}
//查询当前日期中的system的具体数目去除重复
var list = Funs.DB.Transfer_Instrumentation.Where(x => x.ProjectId == ProjectId
&& x.Test_Package_FINISH >= sTime && x.Test_Package_FINISH <= eTime).ToList();
var list = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId
&& x.FDate >= sTime && x.FDate <= eTime).ToList();
var SystemList = (from x in list select x.SystemName).Distinct();
//先加载左侧system 树菜单
@ -87,39 +94,63 @@ namespace FineUIPro.Web.Transfer.Chart
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["日期"] = string.Format("{0:yyyy-MM-dd}", i); ;
//根据日期查询当前system的数量
var systemListbyDate = Funs.DB.Transfer_Instrumentation.Where(x => x.ProjectId == ProjectId
&& x.Test_Package_FINISH >= Convert.ToDateTime(rowTime["日期"])
&& x.Test_Package_FINISH < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//具体的system 去重
var systemList = (from x in systemListbyDate select x.SystemName).Distinct();
if (systemList.ToList().Count>0)
//查询TestPackage 去重
var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct();
if (testpackageList.ToList().Count>0)
{
systemBol = true;
}
foreach (var item in systemList)
foreach (var item in testpackageList)
{
//查询当前日期每个system的数量
var systemSumCount = systemListbyDate.Where(x => x.SystemName == item).ToList().Count;
//查询当前日期每个testpackage的数量
var systemSumCount = systemListbyDate.Where(x => x.TestPackage == item).ToList().Count;
//子系统中完成的数量
var subSystemSumCount = systemListbyDate.Where(x => x.SystemName == item &&
x.FINAL_Status.ToLower() == "finished").ToList().Count;
var subSystemSumCount = systemListbyDate.Where(x => x.TestPackage == item &&
x.Status.ToLower() == "finished").ToList().Count;
//子系统中没完成的情况
var subSystemSumNotStartCount = systemListbyDate.Where(x => x.SystemName == item &&
x.FINAL_Status.ToLower() == "not start").ToList().Count;
var subSystemSumNotStartCount = systemListbyDate.Where(x => x.TestPackage == item &&
(x.Status.ToLower() == "not start"|| x.Status=="" || x.Status==null )).ToList().Count;
//如果总数量等于完成的数量,完成量+1
if (systemSumCount == subSystemSumCount)
{
//如果都是完成,需要最后 12表 test packge 必须是Finished才能是完成
var punchlistFromList= Funs.DB.Transfer_PunchlistFrom.Where(x=>x.ProjectId==ProjectId
&& x.Test_Package==item
&& x.PUNCH_ITEM_FINISH_DATE>= Convert.ToDateTime(rowTime["日期"])
&& x.PUNCH_ITEM_FINISH_DATE < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//如果查到
if (punchlistFromList.Count > 0)
{
//12表当前日期完成的数量
var punchlistFromFinshCount = punchlistFromList.Where(x => x.PUNCH_ITEM_STATUS.ToLower() == "finished").ToList().Count();
//如果完成的数量等于总得数量,则是完成
if (punchlistFromFinshCount == punchlistFromList.Count)
{
finishedCount += 1;
}
else {
inProgress += 1;
}
}
else {
inProgress += 1;
}
}
//如果总数量等于not start未开始量+1
else if (systemSumCount== subSystemSumNotStartCount)
{
notStart += 1;
}
else {
inProgress += 1;
}
}
rowTime["Finished"] = finishedCount;
@ -130,7 +161,7 @@ namespace FineUIPro.Web.Transfer.Chart
}
if (systemBol)
{
this.ChartUc.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "Instrumentation PROGRESS", this.drpChartType.SelectedValue, 1100, 600, false));
this.ChartUc.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "PROGRESS REPORT", this.drpChartType.SelectedValue, 1100, 600, false));
}
@ -161,75 +192,158 @@ namespace FineUIPro.Web.Transfer.Chart
private void LoadData(IEnumerable<String> list)
{
Tree1.Nodes.Clear();
// 模拟从数据库返回数据表
DataTable table = CreateDataTable(list);
DataSet ds = new DataSet();
ds.Tables.Add(table);
ds.Relations.Add("TreeRelation", ds.Tables[0].Columns["Id"], ds.Tables[0].Columns["ParentId"]);
foreach (DataRow row in ds.Tables[0].Rows)
this.trRectify.Nodes.Clear();
this.trRectify.ShowBorder = false;
this.trRectify.ShowHeader = false;
this.trRectify.EnableIcons = true;
this.trRectify.AutoScroll = true;
this.trRectify.EnableSingleClickExpand = true;
TreeNode rootNode = new TreeNode
{
if (row.IsNull("ParentId"))
{
TreeNode node = new TreeNode();
node.Text = row["Text"].ToString();
Tree1.Nodes.Add(node);
ResolveSubTree(row, node);
}
}
Text = "全部",
NodeID = "ALL",
EnableClickEvent = true,
Expanded = true
};
this.trRectify.Nodes.Add(rootNode);
BoundTree(rootNode.Nodes, list);
}
private void ResolveSubTree(DataRow dataRow, TreeNode treeNode)
/// <summary>
/// 加载树
/// </summary>
/// <param name="nodes"></param>
/// <param name="menuId"></param>
private void BoundTree(TreeNodeCollection nodes, IEnumerable<String> list)
{
DataRow[] rows = dataRow.GetChildRows("TreeRelation");
if (rows.Length > 0)
{
// 如果是目录,则默认展开
treeNode.Expanded = true;
foreach (DataRow row in rows)
{
TreeNode node = new TreeNode();
node.Text = row["Text"].ToString();
treeNode.Nodes.Add(node);
ResolveSubTree(row, node);
}
}
}
#region CreateDataTable
private DataTable CreateDataTable(IEnumerable<String> list)
{
DataTable table = new DataTable();
DataColumn column1 = new DataColumn("Id", typeof(string));
DataColumn column2 = new DataColumn("Text", typeof(String));
DataColumn column3 = new DataColumn("ParentId", typeof(string));
table.Columns.Add(column1);
table.Columns.Add(column2);
table.Columns.Add(column3);
DataRow row = table.NewRow();
row[0] = "ALL";
row[1] = "全部";
row[2] = DBNull.Value;
table.Rows.Add(row);
TreeNode tn = null;
foreach (var item in list)
{
row = table.NewRow();
row[0] = item.ToString();
row[1] = item.ToString();
row[2] = "ALL";
table.Rows.Add(row);
tn = new TreeNode
{
Text = item.ToString(),
NodeID = item.ToString(),
EnableClickEvent = true
};
nodes.Add(tn);
}
return table;
}
#region
protected void trRectify_NodeCommand(object sender, TreeCommandEventArgs e) {
var SystemName = this.trRectify.SelectedNodeID;
if (SystemName == "ALL")
{
AnalyseData();
}
else
{
var sTime = DateTime.Now.AddDays(-7);
var eTime = DateTime.Now; ;
//如果没有填写日期,则是七天内的
if (!string.IsNullOrEmpty(txtStarTime.Text) && !string.IsNullOrEmpty(txtEndTime.Text))
{
sTime = Convert.ToDateTime(txtStarTime.Text);
eTime = Convert.ToDateTime(txtEndTime.Text);
}
DataTable dtTime = new DataTable();
dtTime.Columns.Add("日期", typeof(string));
dtTime.Columns.Add("Finished", typeof(string));
dtTime.Columns.Add("In Progress", typeof(string));
dtTime.Columns.Add("Not Start", typeof(string));
var systemBol = false;
for (var i = sTime; i <= eTime; i = i.AddDays(1))
{
var finishedCount = 0;
var inProgress = 0;
var notStart = 0;
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["日期"] = string.Format("{0:yyyy-MM-dd}", i); ;
//根据日期查询当前system的数量
var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId && x.SystemName == SystemName
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//查询TestPackage 去重
var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct();
if (testpackageList.ToList().Count > 0)
{
systemBol = true;
}
foreach (var item in testpackageList)
{
//查询当前日期每个testpackage的数量
var systemSumCount = systemListbyDate.Where(x => x.TestPackage == item).ToList().Count;
//子系统中完成的数量
var subSystemSumCount = systemListbyDate.Where(x => x.TestPackage == item &&
x.Status.ToLower() == "finished").ToList().Count;
//子系统中没完成的情况
var subSystemSumNotStartCount = systemListbyDate.Where(x => x.TestPackage == item &&
(x.Status.ToLower() == "not start" || x.Status == "" || x.Status == null)).ToList().Count;
//如果总数量等于完成的数量,完成量+1
if (systemSumCount == subSystemSumCount)
{
//如果都是完成,需要最后 12表 test packge 必须是Finished才能是完成
var punchlistFromList = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == ProjectId
&& x.SystemName==SystemName
&& x.Test_Package == item
&& x.PUNCH_ITEM_FINISH_DATE >= Convert.ToDateTime(rowTime["日期"])
&& x.PUNCH_ITEM_FINISH_DATE < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//如果查到
if (punchlistFromList.Count > 0)
{
//12表当前日期完成的数量
var punchlistFromFinshCount = punchlistFromList.Where(x => x.PUNCH_ITEM_STATUS.ToLower() == "finished").ToList().Count();
//如果完成的数量等于总得数量,则是完成
if (punchlistFromFinshCount == punchlistFromList.Count)
{
finishedCount += 1;
}
else
{
inProgress += 1;
}
}
else
{
inProgress += 1;
}
}
//如果总数量等于not start未开始量+1
else if (systemSumCount == subSystemSumNotStartCount)
{
notStart += 1;
}
else
{
inProgress += 1;
}
}
rowTime["Finished"] = finishedCount;
rowTime["In Progress"] = inProgress;
rowTime["Not Start"] = notStart;
dtTime.Rows.Add(rowTime);
}
if (systemBol)
{
this.ChartUc.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "SYSTEM PROGRESS REPORT", this.drpChartType.SelectedValue, 1100, 600, false));
}
}
}
#endregion
}
}

View File

@ -141,12 +141,12 @@ namespace FineUIPro.Web.Transfer.Chart
protected global::Web.Controls.ChartControl ChartUc;
/// <summary>
/// Tree1 控件。
/// trRectify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree Tree1;
protected global::FineUIPro.Tree trRectify;
}
}

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,11 +328,13 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Civil_Structure> list = new List<Model.Transfer_Civil_Structure>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Civil_Structure == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly==null)
if (modelOnly == null)
{
Model.Transfer_Civil_Structure model = new Model.Transfer_Civil_Structure();
model.Id = Guid.NewGuid().ToString();
@ -366,6 +368,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Civil_Structure.InsertAllOnSubmit(list);

View File

@ -180,7 +180,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -327,6 +327,8 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Electrical> list = new List<Model.Transfer_Electrical>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.ELECTRICAL == pds.Rows[i][0].ToString().Trim()
@ -365,6 +367,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Electrical.InsertAllOnSubmit(list);

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,6 +328,8 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Firefighting> list = new List<Model.Transfer_Firefighting>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId);
@ -365,6 +367,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Firefighting.InsertAllOnSubmit(list);

View File

@ -180,7 +180,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -327,6 +327,8 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_HVAC> list = new List<Model.Transfer_HVAC>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_HVAC.FirstOrDefault(x => x.HVAC == pds.Rows[i][0].ToString().Trim()
@ -365,6 +367,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_HVAC.InsertAllOnSubmit(list);

View File

@ -106,7 +106,7 @@ namespace FineUIPro.Web.Transfer
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
oleDBConnString += ";Extended Properties='Excel 8.0';";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,10 +328,12 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Instrumentation> list = new List<Model.Transfer_Instrumentation>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.INSTRUMENTATION == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId==CurrUser.LoginProjectId);
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation();
@ -350,7 +352,8 @@ namespace FineUIPro.Web.Transfer
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else {
else
{
//修改
modelOnly.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
@ -364,6 +367,9 @@ namespace FineUIPro.Web.Transfer
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,6 +328,8 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Plumbing> list = new List<Model.Transfer_Plumbing>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim()
@ -366,6 +368,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Plumbing.InsertAllOnSubmit(list);

View File

@ -316,9 +316,11 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_PunchlistFrom> list = new List<Model.Transfer_PunchlistFrom>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][0].ToString().Trim()
var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][1].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
@ -370,6 +372,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_PunchlistFrom.InsertAllOnSubmit(list);

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,6 +328,8 @@ namespace FineUIPro.Web.Transfer
{
List<Model.Transfer_Telecom> list = new List<Model.Transfer_Telecom>();
for (int i = 1; i < ir; i++)
{
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim()
@ -366,6 +368,7 @@ namespace FineUIPro.Web.Transfer
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Telecom.InsertAllOnSubmit(list);

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=DESKTOP-1QITK9E\MSSQLSERVER2;Database=SGGLDB;Integrated Security=False;User ID=sa;Password=123;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="connectionstring" value="server=desktop-1qitk9e\mssqlserver2;database=sggldb;integrated security=false;user id=sa;password=123;multipleactiveresultsets=true;connect timeout=1200"/>
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />