From 2fed6b84afed8408628a65f36c6209237469d4ee Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Mon, 15 Jul 2024 15:06:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?20240715=20=E4=BF=AE=E6=94=B9=E5=90=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=B7=A1=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ZHGL/InspectionSummary/InspectionSummary.aspx.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); From 81afc4684a543db156fcb432499eaf560b9ae0c1 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 15 Jul 2024 15:11:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/Common/Const.cs | 4 + SGGL/FineUIPro.Web/ErrLog.txt | 148 ++++++++++++++++++ .../File/Excel/DataOut/月度计划情况.xlsx | Bin 0 -> 9803 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx | 3 + .../JDGL/Check/MonthPlan.aspx.cs | 121 ++++++++++++++ .../JDGL/Check/MonthPlan.aspx.designer.cs | 9 ++ .../JDGL/Check/MonthPlanStatisc.aspx.cs | 20 ++- .../JDGL/Check/WeekPlanStatisc.aspx.cs | 24 +++ SGGL/FineUIPro.Web/Web.config | 2 +- 10 files changed, 330 insertions(+), 3 deletions(-) create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/月度计划情况.xlsx 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 c7ce3afc..f2ada3bd 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -302,3 +302,151 @@ IP地址:::1 出错时间:07/04/2024 09:53:49 + +错误信息开始=====> +错误类型: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 11:49:20 +出错时间:07/15/2024 11:49:21 + + +错误信息开始=====> +错误类型: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 0000000000000000000000000000000000000000..2a88ee73f1dec9d41c98af955cb2c9d5db5a68db GIT binary patch literal 9803 zcmeHtg8DAR+H~ z@AEv~%k}sE0q^fQXFli5{_L~XIcKl$T6>-K-5MYiR3P9E00RI3&;tev-wSvn0RX6I z000qS3CUR26#}(^K+Sdh+-y8exqV%n>0on6toZd7fHaYYdJ#!W%c6;NSZTl>GcX%naEsP0ET?=d`Q_TAniAs_! zpb~g&V=|b3(qI(QPK!%xeLx*jh%`k8<_`*yap7dH5$#-JH>9|ivh}Sai=Bua)yYGi zQwNgsLze$Y-qK@CVnqih2OOO*kPgt96OikRcgK};#))_lFF6Ypph(G#J*{T9O%mmZ zp_cNeD&8x|h`zH|{pfohzJn{0zjn@ri!|P_-N&aE$NWx`*eZT?b4ckd7U;4*-b8}7@i_AlU6qY$|$R(@sMR@m{8shkGOjxIUTCHXbP78 z;1a9qC+OlpnGPwA&EJBXkL>Jxy?VM-yxttQsL&ih9yKyOX(vdR9Xz{12>{&Opa3-f z=7SBoyo_HFz*0fD7&c%8$=t)n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X z2Fk6VTmz0a+lJUjs|scc^rds(7-l5TGz2UZI!WR0XYo*kysOMO^mfYpa*jSTtzqmp z%J`-A7V_5hrk_Q8=(;BVvff>7X|&?gMF|;I(L5RYka?Ju^T154D!ZwtYA~vJ_nyZT z^sZs3K$_lHPY2y=5l{WER;$;tBbh{0eIOQ4*q8qG7w%(BJF98C1V+Fcy?GPt#~;#t z`^o2Dm~i`)os}z*q^9Dd!;##jsD5+GCq$5MddoROQ#$o*xwSfS3aI4erD86X*Xfe>}{=H zm~OY$i{!9kq27L%H*dWH>sc>Rzctb2o3N>2N3xB=MQN zrN9gS4#O~63FXN=szwa%sH>vK_pNi*oBM0BHq9Oe96xTUz%Yode_8j4qsVwj@)0_1 zV94Mby)fc-9xRyglV#K}(M+sm^*1sc*xLN*5p@Kpl0Z0)PW|f^etKoi_2xTIC78w+ z$LAk$wrCPiyojG-C;OE2Dyxy(!OB=3=j5jA?N;e!MpRd5>hje5tCji0_jtn2l&nG! zXB-h+!UW8WJ6!O0;A-R`WU)PzCLC%=R6Q%wtL(WgCs&o!WxpH213@!gP;fQ=w+d12 zSow0~jo14fL9Ef_E?l$y)<*12p#dvjH0^0FS})&w2vHP4=g*dAP$jR7zhnJ7oFXA} zA?S+VFNpcK)&70{&GHxx(BBpOoz4HZ;Lme7V&?t}w|`sk@6_mD1>F#J@BcSZdRxzJ zy6l&xBE*`XTjbeo;oBU}FJTqLfc-2~+-7ucYq(8S{L)a0{h!=zfW+lHPuqU*C7PwcJk5erXv%EC@k7z^&Bm zcKeT1?Y7dt&-}ks0s!6A0Kh-;fZO7KkJo<{SEBoi_`jmJ1_%v-K>z>;v9lmxjK}!1 F^*^dl_G175 literal 0 HcmV?d00001 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 @@ - +