diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 8f6e97aa..8127544e 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -4731,6 +4731,10 @@ namespace BLL
/// 开车人员月绩效报告模板文件原始虚拟路径
///
public const string TestRunPerformanceMonthReportTemplateUrl = "File\\Excel\\DataOut\\开车人员月绩效报告.xlsx";
+ ///
+ /// 月度计划情况模板文件原始虚拟路径
+ ///
+ public const string MonthPlanOutTemplateUrl = "File\\Excel\\DataOut\\月度计划情况.xlsx";
#endregion
#endregion
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index 5530f9a8..f2ada3bd 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -304,22 +304,149 @@ IP地址:::1
错误信息开始=====>
-错误类型:HttpCompileException
-错误信息:g:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\HSSE\QualityAudit\SafePersonQualityEdit.aspx(36): error CS1061: “ASP.hsse_qualityaudit_safepersonqualityedit_aspx”不包含“drpCertificate_TextChanged”的定义,并且找不到可接受类型为“ASP.hsse_qualityaudit_safepersonqualityedit_aspx”的第一个参数的扩展方法“drpCertificate_TextChanged”(是否缺少 using 指令或程序集引用?)
+错误类型:InvalidOperationException
+错误信息:不能添加已经存在的实体。
错误堆栈:
- 在 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)
-出错时间:07/11/2024 10:52:14
-出错文件:http://localhost:8579/HSSE/QualityAudit/SafePersonQualityEdit.aspx?PersonId=21a0bfc7-516b-4bda-9f09-2f628b256541
-IP地址:::1
+ 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)
+ 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities)
+ 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 320
+出错时间:07/15/2024 11:49:20
+出错时间:07/15/2024 11:49:21
-出错时间:07/11/2024 10:52:14
+
+错误信息开始=====>
+错误类型:InvalidOperationException
+错误信息:不能添加已经存在的实体。
+错误堆栈:
+ 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)
+ 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities)
+ 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 320
+出错时间:07/15/2024 12:19:20
+出错时间:07/15/2024 12:19:20
+
+
+错误信息开始=====>
+错误类型:InvalidOperationException
+错误信息:不能添加已经存在的实体。
+错误堆栈:
+ 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)
+ 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities)
+ 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 320
+出错时间:07/15/2024 12:49:20
+出错时间:07/15/2024 12:49:20
+
+
+错误信息开始=====>
+错误类型: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:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13827
+ 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
+出错时间:07/15/2024 13:19:20
+出错时间:07/15/2024 13:19:20
+
+
+错误信息开始=====>
+错误类型: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:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13851
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
+出错时间:07/15/2024 13:19:20
+出错时间:07/15/2024 13:19:20
+
+
+错误信息开始=====>
+错误类型: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:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13843
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
+出错时间:07/15/2024 13:19:20
+出错时间:07/15/2024 13:19:20
+
+
+错误信息开始=====>
+错误类型: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:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 13643
+ 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
+出错时间:07/15/2024 13:19:20
+出错时间:07/15/2024 13:19:20
+
+
+错误信息开始=====>
+错误类型:InvalidOperationException
+错误信息:不能添加已经存在的实体。
+错误堆栈:
+ 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)
+ 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities)
+ 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 320
+出错时间:07/15/2024 13:19:20
+出错时间:07/15/2024 13:19:20
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/月度计划情况.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/月度计划情况.xlsx
new file mode 100644
index 00000000..2a88ee73
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/月度计划情况.xlsx differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
index cb873201..63722353 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
@@ -1,7 +1,7 @@
- Release|Any CPU
+ Debug|Any CPU
true
false
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx
index 921a15fd..48c47606 100644
--- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx
@@ -41,6 +41,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs
index 594d2512..6b2c5397 100644
--- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs
@@ -8,6 +8,7 @@ using System.Data;
using System.Data.SqlClient;
using BLL;
using Newtonsoft.Json.Linq;
+using System.IO;
namespace FineUIPro.Web.JDGL.Check
{
@@ -170,5 +171,125 @@ left join Sys_User us on us.UserId=mp.DutyPerson where mp.ProjectId=@ProjectId a
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanStatisc.aspx", "统计 - ")));
}
#endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ if (Grid1.Rows.Count == 0)
+ {
+ ShowNotify("无数据可导出!", MessageBoxIcon.Warning);
+ return;
+ }
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = string.Empty;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ string filePath = string.Empty;
+ initTemplatePath = Const.MonthPlanOutTemplateUrl;
+ uploadfilepath = rootPath + initTemplatePath;
+ newUrl = uploadfilepath.Replace(".xlsx", "(" + this.txtMonths.Text.Trim() + ").xlsx");
+ File.Copy(uploadfilepath, newUrl);
+ // 第一步:读取文件流
+ NPOI.SS.UserModel.IWorkbook workbook;
+ using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ {
+ workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ }
+ Model.SGGLDB db = Funs.DB;
+ var units = from x in db.Base_Unit select x;
+ var users = from x in db.Sys_User select x;
+ DateTime months = Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01");
+ var lists = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months orderby x.SortIndex select x;
+ // 创建单元格样式
+ NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ cellStyle.WrapText = true;
+ var font = workbook.CreateFont();
+ font.FontHeightInPoints = 10;
+ //font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
+ cellStyle.SetFont(font);
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ int i = 1;
+ int sum = 0;
+ foreach (var item in lists)
+ {
+ // 第二步:创建新数据行
+ NPOI.SS.UserModel.IRow row = sheet.GetRow(i);
+ NPOI.SS.UserModel.ICell cell;
+ // 添加数据
+ cell = row.CreateCell(0);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(i.ToString());
+ cell = row.CreateCell(1);
+ cell.CellStyle = cellStyle;
+ string unitName = string.Empty;
+ var unit = units.FirstOrDefault(x => x.UnitId == item.UnitId);
+ if (unit != null)
+ {
+ unitName = unit.UnitName;
+ }
+ cell.SetCellValue(unitName);
+ cell = row.CreateCell(2);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.NodeContent);
+ cell = row.CreateCell(3);
+ cell.CellStyle = cellStyle;
+ string planDate = string.Empty;
+ if (item.PlanDate != null)
+ {
+ planDate = string.Format("{0:yyyy-MM-dd}", item.PlanDate);
+ }
+ cell.SetCellValue(planDate);
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ string userName = string.Empty;
+ var user = users.FirstOrDefault(x => x.UserId == item.DutyPerson);
+ if (user != null)
+ {
+ userName = user.UserName;
+ }
+ cell.SetCellValue(userName);
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ string realDate = string.Empty;
+ if (item.RealDate != null)
+ {
+ realDate = string.Format("{0:yyyy-MM-dd}", item.RealDate);
+ }
+ cell.SetCellValue(realDate);
+ cell = row.CreateCell(6);
+ cell.CellStyle = cellStyle;
+ cell.SetCellValue(item.Remark);
+ i++;
+ }
+ // 第三步:写入文件流
+ using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ {
+ workbook.Write(stream);
+ workbook.Close();
+ }
+ 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);
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs
index 4f1d79dd..875c7425 100644
--- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.JDGL.Check {
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// lblPageIndex 控件。
///
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs
index faf76327..d65a237e 100644
--- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs
@@ -45,6 +45,8 @@ namespace FineUIPro.Web.JDGL.Check
Model.SGGLDB db = Funs.DB;
//所有集合
var totalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x;
+ //所有集合
+ var sumTotalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months <= months select x;
if (this.ckType.SelectedValue == "1") //按责任单位
{
var pUnit = from x in db.Project_ProjectUnit
@@ -103,7 +105,7 @@ namespace FineUIPro.Web.JDGL.Check
i++;
}
}
- if (StatisticsList.Count() > 0) //增加总计
+ if (StatisticsList.Count() > 0) //增加合计
{
Model.JDGL_MonthPlan StatisticsLast = new Model.JDGL_MonthPlan();
StatisticsLast.NodeContent = "合计";
@@ -121,6 +123,22 @@ namespace FineUIPro.Web.JDGL.Check
}
StatisticsList.Add(StatisticsLast);
}
+ //增加累计
+ Model.JDGL_MonthPlan StatisticsSum = new Model.JDGL_MonthPlan();
+ StatisticsSum.NodeContent = "累计";
+ int c = sumTotalList.Count();
+ int d = sumTotalList.Count(x => x.RealDate.HasValue);
+ StatisticsSum.UnitId = c.ToString();
+ StatisticsSum.DutyPerson = d.ToString();
+ if (c != 0)//被除数不能为零
+ {
+ StatisticsSum.Remark = Math.Round((double)d / (double)c * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ StatisticsSum.Remark = "0%";
+ }
+ StatisticsList.Add(StatisticsSum);
this.Grid1.DataSource = StatisticsList;
this.Grid1.DataBind();
}
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanStatisc.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanStatisc.aspx.cs
index c9bf0b46..0ae3d588 100644
--- a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanStatisc.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanStatisc.aspx.cs
@@ -161,6 +161,30 @@ namespace FineUIPro.Web.JDGL.Check
}
StatisticsList.Add(StatisticsLast);
}
+ //增加累计
+ List sumTotalList = new List();
+ if (totalList.Count() > 0)
+ {
+ var startDate = totalList.First().StartDate;
+ sumTotalList = (from x in db.JDGL_WeekPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.StartDate <= startDate select x).ToList();
+ }
+ Model.JDGL_WeekPlan StatisticsSum = new Model.JDGL_WeekPlan();
+ StatisticsSum.WorkContent = "累计";
+ int c = sumTotalList.Count();
+ int d = sumTotalList.Count(x => x.IsOK == true);
+ StatisticsSum.UnitId = c.ToString();
+ StatisticsSum.DutyPerson = d.ToString();
+ if (c != 0)//被除数不能为零
+ {
+ StatisticsSum.Remark = Math.Round((double)d / (double)c * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ StatisticsSum.Remark = "0%";
+ }
+ StatisticsList.Add(StatisticsSum);
+ this.Grid1.DataSource = StatisticsList;
+ this.Grid1.DataBind();
this.Grid1.DataSource = StatisticsList;
this.Grid1.DataBind();
}
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index 9fc55c34..f50b26d3 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -12,7 +12,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
index f5c41381..1e5e7c7d 100644
--- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
@@ -277,10 +277,10 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
//一次共检合格数
var list20 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.IsOnceQualified == true
- select new { x.ProjectId,x.CompileDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList();
+ select new { x.ProjectId,x.InspectionDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList();
////总数
var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement
- select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.CompileDate }).ToList();
+ select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.InspectionDate }).ToList();
//关键事项
var list22 = (from x in Funs.DB.GJSX
@@ -729,7 +729,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
if (hgs>0)
{
//验收日期
- model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate;
+ model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate;
}
model.SummeryResult = hgs.ToString();
allList.Add(model);