修改进度报表

This commit is contained in:
高飞 2023-05-17 17:35:00 +08:00
parent 1a33f115fd
commit aa1692f8a9
16 changed files with 636 additions and 124 deletions

View File

@ -3078,6 +3078,10 @@ namespace BLL
/// 全厂地下管网完成情况导入模版文件原始的虚拟路径
/// </summary>
public const string UndergroundPipeCompletionTemplateUrl = "File\\Excel\\DataIn\\全厂地下管网完成情况导入模板.xls";
/// <summary>
/// 施工进度报表模板
/// </summary>
public const string JDReportTemplateUrl = "File\\Word\\JDGL\\施工进度报表.docx";
#endregion
#region

View File

@ -272,8 +272,8 @@ namespace BLL
{
try
{
DateTime dateS = DateTime.Now.AddMonths(-3);
dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-3).Year + "-" + DateTime.Now.AddMonths(-3).Month + "-01");
DateTime dateS = DateTime.Now.AddMonths(-6);
dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-6).Year + "-" + DateTime.Now.AddMonths(-6).Month + "-01");
var getNums = from x in db.SitePerson_PersonInOutNumber
where x.ProjectId == projectId && x.InOutDate >= dateS
orderby x.InOutDate

View File

@ -362,10 +362,10 @@ namespace FineUIPro.Web.CQMS.Check
//无损检测情况
builder.MoveToBookmark("Table2");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;
@ -507,10 +507,10 @@ namespace FineUIPro.Web.CQMS.Check
//焊工资格评定情况
builder.MoveToBookmark("Table3");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;
@ -966,10 +966,10 @@ namespace FineUIPro.Web.CQMS.Check
//设计变更情况
builder.MoveToBookmark("Table4");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat. = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;

View File

@ -101,10 +101,10 @@ namespace FineUIPro.Web.CQMS.Check
if (isbool)
{
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.RightPadding = 50;
builder.Bold = false;
//builder.RowFormat.Height = 20;

View File

@ -389,10 +389,10 @@ namespace FineUIPro.Web.CQMS.Check
if (isbool)
{
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.RightPadding = 50;
builder.Bold = false;
//builder.RowFormat.Height = 20;

View File

@ -350,10 +350,10 @@ namespace FineUIPro.Web.CQMS.Check
if (isbool)
{
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.RightPadding = 50;
builder.Bold = false;
//builder.RowFormat.Height = 20;

View File

@ -115,3 +115,210 @@ IP地址:::1
出错时间:05/11/2023 17:07:02
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion)
在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:05/16/2023 15:43:58
出错文件:http://localhost:9733/res.axd?font=lib.fa.fontawesome.woff2&t=636128671740000000
IP地址:::1
出错时间:05/16/2023 15:43:58
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 296
在 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)
出错时间:05/16/2023 16:41:36
出错文件:http://localhost:9733/indexProject.aspx?projectId=e9fe4b89-f62d-4b3a-a40c-57c87010aa92
IP地址:::1
出错时间:05/16/2023 16:41:36
错误信息开始=====>
错误类型:InvalidOperationException
错误信息:不能将 Null 值赋给类型为 System.Double (不可为 null 的值类型)的成员。
错误堆栈:
在 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.Sum[TSource](IQueryable`1 source, Expression`1 selector)
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.BindChart() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 280
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.GetValue() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 34
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 20
在 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)
出错时间:05/17/2023 11:07:58
出错文件:http://localhost:9733/JDGL/CostAnalysis/JDReport.aspx
IP地址:::1
操作人员:JT
出错时间:05/17/2023 11:07:58
错误信息开始=====>
错误类型:InvalidOperationException
错误信息:不能将 Null 值赋给类型为 System.Double (不可为 null 的值类型)的成员。
错误堆栈:
在 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.Sum[TSource](IQueryable`1 source, Expression`1 selector)
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.BindChart() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 268
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.GetValue() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 34
在 FineUIPro.Web.JDGL.CostAnalysis.JDReport.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\JDGL\CostAnalysis\JDReport.aspx.cs:行号 20
在 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)
出错时间:05/17/2023 11:11:44
出错文件:http://localhost:9733/JDGL/CostAnalysis/JDReport.aspx
IP地址:::1
操作人员:JT
出错时间:05/17/2023 11:11:44
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 (TreeNode )
在 FineUIPro.TreeCommandEventArgs..ctor(TreeNode node, String commandName, String commandArgument)
在 (TreeNode , String , String )
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:05/17/2023 11:21:27
出错文件:http://localhost:9733/JDGL/CostAnalysis/EarnedValueCurve.aspx
IP地址:::1
操作人员:JT
出错时间:05/17/2023 11:21:27
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14204
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2158
出错时间:05/17/2023 16:36:26
出错时间:05/17/2023 16:36:26
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14228
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2023
出错时间:05/17/2023 16:36:26
出错时间:05/17/2023 16:36:26
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14220
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1919
出错时间:05/17/2023 16:36:26
出错时间:05/17/2023 16:36:26
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14020
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1861
出错时间:05/17/2023 16:36:26
出错时间:05/17/2023 16:36:26

View File

@ -0,0 +1,53 @@
施工进度报表
项目赢得值曲线
总体施工进度赢得值参数BCWP、BCWS、ACWP
赢得值四个评价指标CV、SV、CPI、SPI
项目总体施工进度情况
本月施工进度情况
施工进度赢得值参数BCWP、BCWS、ACWP
赢得值四个评价指标CV、SV、CPI、SPI
专业和分部工程工程施工进度情况
土建专业:(专业总体统计和按照分部工程统计,其他专业也是)
地基处理:
施工进度赢得值参数BCWP、BCWS、ACWP
赢得值四个评价指标CV、SV、CPI、SPI
桩基工程:
....
设备专业:
动设备:
施工进度赢得值参数BCWP、BCWS、ACWP
赢得值四个评价指标CV、SV、CPI、SPI
静设备:
....
设备/材料施工进度情况
商品混凝土:
施工进度赢得值参数BCWP、BCWS、ACWP
赢得值四个评价指标CV、SV、CPI、SPI
钢结构:
设备:
.....

View File

@ -66,9 +66,9 @@
<Reference Include="Apache.NMS.Fakes">
<HintPath>FakesAssemblies\Apache.NMS.Fakes.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words, Version=10.5.0.0, Culture=neutral, PublicKeyToken=fa9a48344f15a022, processorArchitecture=MSIL">
<Reference Include="Aspose.Words, Version=21.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\CQMS_New\CQMS\FineUIPro.Web\bin\Aspose.Words.dll</HintPath>
<HintPath>bin\Aspose.Words.dll</HintPath>
</Reference>
<Reference Include="AxInterop.SYNCARDOCXLib">
<HintPath>..\FineUIPro\Reference BLL\AxInterop.SYNCARDOCXLib.dll</HintPath>

View File

@ -133,6 +133,9 @@
ErrLogInfo.WriteLog("从集团获取数据定时器启动失败!", ex);
}
}
//Aspose21.8.0破解注入
new Aspose.Words.License().SetLicense(new System.IO.MemoryStream(Convert.FromBase64String("PExpY2Vuc2U+CiAgPERhdGE+CiAgICA8TGljZW5zZWRUbz5TdXpob3UgQXVuYm94IFNvZnR3YXJlIENvLiwgTHRkLjwvTGljZW5zZWRUbz4KICAgIDxFbWFpbFRvPnNhbGVzQGF1bnRlYy5jb208L0VtYWlsVG8+CiAgICA8TGljZW5zZVR5cGU+RGV2ZWxvcGVyIE9FTTwvTGljZW5zZVR5cGU+CiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1pdGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+CiAgICA8T3JkZXJJRD4yMDA2MDIwMTI2MzM8L09yZGVySUQ+CiAgICA8VXNlcklEPjEzNDk3NjAwNjwvVXNlcklEPgogICAgPE9FTT5UaGlzIGlzIGEgcmVkaXN0cmlidXRhYmxlIGxpY2Vuc2U8L09FTT4KICAgIDxQcm9kdWN0cz4KICAgICAgPFByb2R1Y3Q+QXNwb3NlLlRvdGFsIGZvciAuTkVUPC9Qcm9kdWN0PgogICAgPC9Qcm9kdWN0cz4KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl0aW9uVHlwZT4KICAgIDxTZXJpYWxOdW1iZXI+OTM2ZTVmZDEtODY2Mi00YWJmLTk1YmQtYzhkYzBmNTNhZmE2PC9TZXJpYWxOdW1iZXI+CiAgICA8U3Vic2NyaXB0aW9uRXhwaXJ5PjIwMjEwODI3PC9TdWJzY3JpcHRpb25FeHBpcnk+CiAgICA8TGljZW5zZVZlcnNpb24+My4wPC9MaWNlbnNlVmVyc2lvbj4KICAgIDxMaWNlbnNlSW5zdHJ1Y3Rpb25zPmh0dHBzOi8vcHVyY2hhc2UuYXNwb3NlLmNvbS9wb2xpY2llcy91c2UtbGljZW5zZTwvTGljZW5zZUluc3RydWN0aW9ucz4KICA8L0RhdGE+CiAgPFNpZ25hdHVyZT5wSkpjQndRdnYxV1NxZ1kyOHFJYUFKSysvTFFVWWRrQ2x5THE2RUNLU0xDQ3dMNkEwMkJFTnh5L3JzQ1V3UExXbjV2bTl0TDRQRXE1aFAzY2s0WnhEejFiK1JIWTBuQkh1SEhBY01TL1BSeEJES0NGbWg1QVFZRTlrT0FxSzM5NVBSWmJRSGowOUNGTElVUzBMdnRmVkp5cUhjblJvU3dPQnVqT1oyeDc4WFE9PC9TaWduYXR1cmU+CjwvTGljZW5zZT4=")));
}
protected void Session_Start(object sender, EventArgs e)

View File

@ -431,10 +431,10 @@ namespace FineUIPro.Web.HSSE.Check
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
builder.MoveToBookmark("tab");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 100;
//builder.RowFormat.LeftIndent = 100;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;

View File

@ -593,10 +593,10 @@ namespace FineUIPro.Web.HSSE.Check
if (File.Exists(url))
{
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;

View File

@ -649,10 +649,10 @@ namespace FineUIPro.Web.HSSE.Check
builder.MoveToBookmark("PhotoUrl");
builder.MoveToBookmark("PhotoUrl");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;
@ -1027,10 +1027,10 @@ namespace FineUIPro.Web.HSSE.Check
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
builder.MoveToBookmark("PhotoUrl");
builder.StartTable();
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
//builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
builder.RowFormat.LeftIndent = 5;
//builder.RowFormat.LeftIndent = 5;
builder.Bold = false;
builder.RowFormat.Height = 20;
builder.Bold = false;

View File

@ -25,10 +25,10 @@
<f:DatePicker runat="server" ID="txtMonths" Required="true" Label="月份" DateFormatString="yyyy-MM" LabelWidth="70px" LabelAlign="Right" Width="200px"
ShowRedStar="true">
</f:DatePicker>
<f:Button ID="btnSearch" Text="查询" MarginLeft="40px" EnablePostBack="true" runat="server"
<f:Button ID="btnSearch" Text="查询" MarginLeft="40px" EnablePostBack="true" runat="server" Icon="SystemSearch"
OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
<f:Button ID="btnOut" OnClick="btnOut_Click" Text="导出" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
@ -63,7 +63,7 @@
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="1" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="1000"
AllowPaging="false" IsDatabasePaging="false" PageSize="1000"
AllowFilters="true" EnableTextSelection="True">
<Columns>
<%--<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
@ -109,29 +109,137 @@
<f:GroupPanel runat="server" Title="三、本月施工进度情况" BodyPadding="5px" ID="GroupPanel3" EnableCollapse="True"
Collapsed="false">
<Items>
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" runat="server">
<Rows>
<f:FormRow>
<Items>
<f:TextArea ID="txt3" runat="server"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid3" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="工程量清单设置" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="1" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="false" IsDatabasePaging="false" PageSize="1000"
AllowFilters="true" EnableTextSelection="True">
<Columns>
<%--<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:GroupField HeaderText="赢得值参数" TextAlign="Center">
<Columns>
<f:RenderField Width="70px" ColumnID="BCWP" DataField="BCWP" FieldType="String"
HeaderText="BCWP" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="BCWS" DataField="BCWS"
FieldType="String" HeaderText="BCWS" HeaderTextAlign="Center" TextAlign="Center"
EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="ACWP" DataField="ACWP"
FieldType="String" HeaderText="ACWP" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="赢得值评价指标" TextAlign="Center">
<Columns>
<f:RenderField Width="70px" ColumnID="CV" DataField="CV" FieldType="String"
HeaderText="CV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="SV" DataField="SV"
FieldType="String" HeaderText="SV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="CPI" DataField="CPI"
FieldType="String" HeaderText="CPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SPI" DataField="SPI"
FieldType="String" HeaderText="SPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
</f:Grid>
</Items>
</f:GroupPanel>
<f:GroupPanel runat="server" Title="四、专业和分部工程工程施工进度情况" BodyPadding="5px" ID="GroupPanel4" EnableCollapse="True"
Collapsed="false">
<Items>
<f:Form ID="Form6" ShowBorder="false" ShowHeader="false" runat="server">
<Rows>
<f:FormRow>
<Items>
<f:TextArea ID="txt4" runat="server"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid4" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="工程量清单设置" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="1" DataIDField="Id" AllowSorting="true" SortField="Id"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="false" IsDatabasePaging="false" PageSize="10000"
AllowFilters="true" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid4.PageIndex * Grid4.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="Name1" DataField="Name1" FieldType="String"
HeaderText="专业" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="Name2" DataField="Name2" FieldType="String"
HeaderText="分部工程" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:GroupField HeaderText="本月赢得值参数" TextAlign="Center">
<Columns>
<f:RenderField Width="90px" ColumnID="mBCWP" DataField="mBCWP" FieldType="String"
HeaderText="BCWP" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="mBCWS" DataField="mBCWS"
FieldType="String" HeaderText="BCWS" HeaderTextAlign="Center" TextAlign="Center"
EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="mACWP" DataField="mACWP"
FieldType="String" HeaderText="ACWP" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="本月赢得值评价指标" TextAlign="Center">
<Columns>
<f:RenderField Width="90px" ColumnID="mCV" DataField="mCV" FieldType="String"
HeaderText="CV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="mSV" DataField="mSV"
FieldType="String" HeaderText="SV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="mCPI" DataField="mCPI"
FieldType="String" HeaderText="CPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="mSPI" DataField="mSPI"
FieldType="String" HeaderText="SPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="累计赢得值参数" TextAlign="Center">
<Columns>
<f:RenderField Width="90px" ColumnID="BCWP" DataField="BCWP" FieldType="String"
HeaderText="BCWP" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="BCWS" DataField="BCWS"
FieldType="String" HeaderText="BCWS" HeaderTextAlign="Center" TextAlign="Center"
EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="ACWP" DataField="ACWP"
FieldType="String" HeaderText="ACWP" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="累计赢得值评价指标" TextAlign="Center">
<Columns>
<f:RenderField Width="90px" ColumnID="CV" DataField="CV" FieldType="String"
HeaderText="CV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="SV" DataField="SV"
FieldType="String" HeaderText="SV" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="CPI" DataField="CPI"
FieldType="String" HeaderText="CPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="SPI" DataField="SPI"
FieldType="String" HeaderText="SPI" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
</f:Grid>
</Items>
</f:GroupPanel>
<f:GroupPanel runat="server" Title="五、设备/材料施工进度情况" BodyPadding="5px" ID="GroupPanel5" EnableCollapse="True"

View File

@ -2,8 +2,12 @@
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using Aspose.Words;
using Aspose.Words.Drawing;
using Aspose.Words.Drawing.Charts;
using BLL;
using AspNet = System.Web.UI.WebControls;
@ -24,59 +28,12 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
private void SetEmpty()
{
this.SimpleForm1.Title = string.Empty;
txt3.Text = string.Empty;
txt4.Text = string.Empty;
txt5.Text = string.Empty;
}
#endregion
#region
private void GetValue()
{
BindChart();
//Model.Information_SafetyBriefing report = Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.YearId == year);
//if (report != null)
//{
// string upState = string.Empty;
// if (report.UpState == BLL.Const.UpState_3)
// {
// upState = "(已上报)";
// }
// else
// {
// upState = "(未上报)";
// }
// this.SimpleForm1.Title = "实业安全简报" + report.YearId + "年 " + report.Month + "月" + upState;
// lbUnitName.Text = "填报企业:" + BLL.UnitService.GetUnitNameByUnitId(report.UnitId);
// lbCompileMan.Text = "编制人:" + BLL.UserService.GetUserNameByUserId(report.CompileMan);
// lbAuditor.Text = "审核人:" + report.Auditor;
// lbApprover.Text = "审批人:" + report.Approver;
// this.txtMainWork.Text = report.MainWork;
// this.txtHazardRecording.Text = report.HazardRecording;
// this.txtSafetyAccident.Text = report.SafetyAccident;
// this.txtEPAccident.Text = report.EPAccident;
// this.txtOHAccident.Text = report.OHAccident;
// this.txtWorkPermitNum.Text = report.WorkPermitNum;
// this.txtHiddenDangerDetection.Text = report.HiddenDangerDetection;
// this.txtRectificationSituation.Text = report.RectificationSituation;
// this.txtCheckProblemsRectification.Text = report.CheckProblemsRectification;
// this.txtPendingProject.Text = report.PendingProject;
// this.txtContractorManagement.Text = report.ContractorManagement;
// this.txtEnvironmentalEmissions.Text = report.EnvironmentalEmissions;
// this.txtNextMonthWorkPlan.Text = report.NextMonthWorkPlan;
//}
//else
//{
// SetEmpty();
//}
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindChart()
{
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
if (installation != null && !string.IsNullOrEmpty(this.txtMonths.Text.Trim()))
@ -182,6 +139,7 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
{
mSPI = mBCWP / mBCWS;
}
//总体进度
DataTable table2 = new DataTable();
table2.Columns.Add(new DataColumn("Id", typeof(String)));
table2.Columns.Add(new DataColumn("BCWP", typeof(String)));
@ -204,10 +162,190 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
table2.Rows.Add(row2);
this.Grid2.DataSource = table2;
this.Grid2.DataBind();
this.txt3.Text = "施工进度赢得值参数 BCWP" + mBCWP.ToString("0.####") + " BCWS" + mBCWS.ToString("0.####") + " ACWP" + mACWP.ToString("0.####") + "\r\n赢得值四个评价指标 CV" + mCV.ToString("0.####") + " SV" + mSV.ToString("0.####") + " CPI" + mCPI.ToString("0.####") + " SPI" + mSPI.ToString("0.####");
//本月进度
table2.Rows.Clear();
row2[0] = SQLHelper.GetNewID();
row2[1] = mBCWP.ToString("0.####");
row2[2] = mBCWS.ToString("0.####");
row2[3] = mACWP.ToString("0.####");
row2[4] = mCV.ToString("0.####");
row2[5] = mSV.ToString("0.####");
row2[6] = mCPI.ToString("0.####");
row2[7] = mSPI.ToString("0.####");
table2.Rows.Add(row2);
this.Grid3.DataSource = table2;
this.Grid3.DataBind();
//按专业统计
DataTable table4 = new DataTable();
table4.Columns.Add(new DataColumn("Id", typeof(String)));
table4.Columns.Add(new DataColumn("Name1", typeof(String)));
table4.Columns.Add(new DataColumn("Name2", typeof(String)));
table4.Columns.Add(new DataColumn("mBCWP", typeof(String)));
table4.Columns.Add(new DataColumn("mBCWS", typeof(String)));
table4.Columns.Add(new DataColumn("mACWP", typeof(String)));
table4.Columns.Add(new DataColumn("mCV", typeof(String)));
table4.Columns.Add(new DataColumn("mSV", typeof(String)));
table4.Columns.Add(new DataColumn("mCPI", typeof(String)));
table4.Columns.Add(new DataColumn("mSPI", typeof(String)));
table4.Columns.Add(new DataColumn("BCWP", typeof(String)));
table4.Columns.Add(new DataColumn("BCWS", typeof(String)));
table4.Columns.Add(new DataColumn("ACWP", typeof(String)));
table4.Columns.Add(new DataColumn("CV", typeof(String)));
table4.Columns.Add(new DataColumn("SV", typeof(String)));
table4.Columns.Add(new DataColumn("CPI", typeof(String)));
table4.Columns.Add(new DataColumn("SPI", typeof(String)));
Model.SGGLDB db = Funs.DB;
var cnProfessionInits = from x in db.WBS_CnProfessionInit select x;
var cnProfessions = from x in db.WBS_CnProfession where x.ProjectId == this.CurrUser.LoginProjectId select x;
var unitProjectInits = from x in db.Wbs_UnitProjectInit select x;
var unitProjects = from x in db.Wbs_UnitProject where x.ProjectId == this.CurrUser.LoginProjectId select x;
var details = from x in db.View_WBS_CostControlParentDetail
where x.Months == Funs.GetNewDateTime(date)
select x;
string strSql2 = "select distinct (cast(YEAR(Months) as varchar(4))+'.'+cast(MONTH(Months) as varchar(2))) as 月份,t.Months," +
"ThisRealCost as '本月已完工作实际费用-ACWP',ThisPlanCost as '本月已完工作预算费用-BCWP',ThisPlanValue as '本月计划工作预算费用-BCWS',TotalPlanValue as '累计计划工作预算费用-BCWS',TotalRealCost as '累计已完工作实际费用-ACWP',TotalPlanCost as '累计已完工作预算费用-BCWP' " +
"from dbo.View_WBS_CostControlParentDetail as t where t.Months=@Months";
SqlParameter[] parameter2 = new SqlParameter[]
{
new SqlParameter("@Months",date),
};
DataTable dt2 = SQLHelper.GetDataTableRunText(strSql2, parameter2);
DataRow row4;
decimal cnACWP, cnBCWP, cnBCWS, cnmACWP, cnmBCWP, cnmBCWS, cnCV, cnSV, cnCPI, cnSPI, cnmCV, cnmSV, cnmCPI, cnmSPI,
unACWP, unBCWP, unBCWS, unmACWP, unmBCWP, unmBCWS, unCV, unSV, unCPI, unSPI, unmCV, unmSV, unmCPI, unmSPI;
foreach (var cn in cnProfessionInits)
{
cnACWP = 0;
cnBCWP = 0;
cnBCWS = 0;
cnmACWP = 0;
cnmBCWP = 0;
cnmBCWS = 0;
cnCV = 0;
cnSV = 0;
cnCPI = 0;
cnSPI = 0;
cnmCV = 0;
cnmSV = 0;
cnmCPI = 0;
cnmSPI = 0;
row4 = table4.NewRow();
row4[0] = SQLHelper.GetNewID();
row4[1] = cn.CnProfessionName;
var cnDetails = (from x in details
join y in cnProfessions on x.ParentId equals y.CnProfessionId
where y.OldId == cn.CnProfessionId
select x).ToList();
cnmACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
cnmBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
cnmBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
cnmCV = cnmBCWP - cnmACWP;
cnmSV = cnmBCWP - cnmBCWS;
if (cnmACWP > 0)
{
cnmCPI = cnmBCWP / cnmACWP;
}
if (cnmBCWS > 0)
{
cnmSPI = cnmBCWP / cnmBCWS;
}
row4[3] = cnmBCWP.ToString("0.####");
row4[4] = cnmBCWS.ToString("0.####");
row4[5] = cnmACWP.ToString("0.####");
row4[6] = cnmCV.ToString("0.####");
row4[7] = cnmSV.ToString("0.####");
row4[8] = cnmCPI.ToString("0.####");
row4[9] = cnmSPI.ToString("0.####");
cnACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
cnBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
cnBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
cnCV = cnBCWP - cnACWP;
cnSV = cnBCWP - cnBCWS;
if (cnACWP > 0)
{
cnCPI = cnBCWP / cnACWP;
}
if (cnBCWS > 0)
{
cnSPI = cnBCWP / cnBCWS;
}
row4[10] = cnBCWP.ToString("0.####");
row4[11] = cnBCWS.ToString("0.####");
row4[12] = cnACWP.ToString("0.####");
row4[13] = cnCV.ToString("0.####");
row4[14] = cnSV.ToString("0.####");
row4[15] = cnCPI.ToString("0.####");
row4[16] = cnSPI.ToString("0.####");
table4.Rows.Add(row4);
var unLists = (from x in unitProjectInits where x.CnProfessionId == cn.CnProfessionId orderby x.SortIndex select x).ToList();
foreach (var un in unLists)
{
unACWP = 0;
unBCWP = 0;
unBCWS = 0;
unmACWP = 0;
unmBCWP = 0;
unmBCWS = 0;
unCV = 0;
unSV = 0;
unCPI = 0;
unSPI = 0;
unmCV = 0;
unmSV = 0;
unmCPI = 0;
unmSPI = 0;
row4 = table4.NewRow();
row4[0] = SQLHelper.GetNewID();
row4[2] = un.UnitProjectName;
var unDetails = from x in details
join y in unitProjects on x.ParentId equals y.UnitProjectId
where y.UnitProjectCode == un.UnitProjectCode
select x;
unmACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
unmBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
unmBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
unmCV = unmBCWP - unmACWP;
unmSV = unmBCWP - unmBCWS;
if (unmACWP > 0)
{
unmCPI = unmBCWP / unmACWP;
}
if (unmBCWS > 0)
{
unmSPI = unmBCWP / unmBCWS;
}
row4[3] = unmBCWP.ToString("0.####");
row4[4] = unmBCWS.ToString("0.####");
row4[5] = unmACWP.ToString("0.####");
row4[6] = unmCV.ToString("0.####");
row4[7] = unmSV.ToString("0.####");
row4[8] = unmCPI.ToString("0.####");
row4[9] = unmSPI.ToString("0.####");
unACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
unBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
unBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
unCV = unBCWP - unACWP;
unSV = unBCWP - unBCWS;
if (unACWP > 0)
{
unCPI = unBCWP / unACWP;
}
if (unBCWS > 0)
{
unSPI = unBCWP / unBCWS;
}
row4[10] = unBCWP.ToString("0.####");
row4[11] = unBCWS.ToString("0.####");
row4[12] = unACWP.ToString("0.####");
row4[13] = unCV.ToString("0.####");
row4[14] = unSV.ToString("0.####");
row4[15] = unCPI.ToString("0.####");
row4[16] = unSPI.ToString("0.####");
table4.Rows.Add(row4);
}
}
this.Grid4.DataSource = table4;
this.Grid4.DataBind();
}
}
#endregion
@ -232,7 +370,14 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
GetValue();
if (!string.IsNullOrEmpty(this.txtMonths.Text.Trim()))
{
GetValue();
}
else
{
ShowNotify("请选择月份", MessageBoxIcon.Warning);
}
}
#endregion
@ -243,18 +388,72 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
//Response.ClearContent();
//string filename = Funs.GetNewFileName();
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("工作量统计" + filename, System.Text.Encoding.UTF8) + ".xls");
//Response.ContentType = "application/excel";
//Response.ContentEncoding = Encoding.UTF8;
//this.Grid1.PageSize = Grid1.RecordCount;
//Response.Write(GetGridTableHtml2(Grid1));
//Response.End();
//DateTime months = Convert.ToDateTime(this.txtMonths.Text.Trim());
//DataTable table = BLL.WorkloadStatisticsService.GetTreeDataTable(this.CurrUser.LoginProjectId, months, BLL.Const._Null, this.drpCnProfession.SelectedValue, this.drpUnitProject.SelectedValue, this.drpWbsSet.SelectedValue);
//Grid1.DataSource = table;
//Grid1.DataBind();
if (!string.IsNullOrEmpty(this.txtMonths.Text.Trim()))
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = string.Empty;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
string filePath = string.Empty;
Model.SGGLDB db = Funs.DB;
initTemplatePath = Const.JDReportTemplateUrl;
uploadfilepath = rootPath + initTemplatePath;
newUrl = uploadfilepath.Replace(".docx", "(" + this.txtMonths.Text.Trim() + ")" + ".docx");
if (File.Exists(newUrl))
{
File.Delete(newUrl);
}
File.Copy(uploadfilepath, newUrl);
//更新书签内容
Document doc = new Aspose.Words.Document(newUrl);
DocumentBuilder builder = new DocumentBuilder(doc);
string projectName = string.Empty;
var project = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
if (project != null)
{
projectName = project.ProjectName;
}
Bookmark bookmarkProjectName = doc.Range.Bookmarks["ProjectName"];
if (bookmarkProjectName != null)
{
bookmarkProjectName.Text = projectName;
}
Bookmark bookmarkMonths = doc.Range.Bookmarks["Months"];
if (bookmarkMonths != null)
{
string[] strs = this.txtMonths.Text.Trim().Split('-');
bookmarkMonths.Text = strs[0] + "年" + strs[1] + "月";
}
//插入图表
builder.MoveToBookmark("Chart");
Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;
chart.Title.Text = "赢得值曲线";
ChartSeriesCollection seriesColl = chart.Series;
seriesColl.Clear();
string[] categories = new string[] { "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
seriesColl.Add("自有人员", categories, new double[] { 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
seriesColl.Add("施工人员", categories, new double[] { 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
seriesColl.Add("累计安全人工时", categories, new double[] { 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
doc.Save(newUrl);
string fileName = Path.GetFileName(newUrl);
FileInfo info = new FileInfo(newUrl);
long fileSize = info.Length;
Response.Clear();
Response.ContentType = "application/x-zip-compressed";
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", fileSize.ToString());
Response.TransmitFile(newUrl, 0, fileSize);
Response.Flush();
Response.Close();
File.Delete(newUrl);
}
else
{
ShowNotify("请选择月份", MessageBoxIcon.Warning);
}
}
#endregion
}

View File

@ -166,22 +166,13 @@ namespace FineUIPro.Web.JDGL.CostAnalysis {
protected global::FineUIPro.GroupPanel GroupPanel3;
/// <summary>
/// Form2 控件。
/// Grid3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txt3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txt3;
protected global::FineUIPro.Grid Grid3;
/// <summary>
/// GroupPanel4 控件。
@ -193,22 +184,22 @@ namespace FineUIPro.Web.JDGL.CostAnalysis {
protected global::FineUIPro.GroupPanel GroupPanel4;
/// <summary>
/// Form6 控件。
/// Grid4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form6;
protected global::FineUIPro.Grid Grid4;
/// <summary>
/// txt4 控件。
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txt4;
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// GroupPanel5 控件。