From 3c73800853d8ea4c6d680540663e942e19183685 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Tue, 14 May 2024 09:03:31 +0800
Subject: [PATCH] =?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
---
.../版本日志/SGGLDB_WH_2024-05-11-gaofei.sql | 112 +
.../1-4进度管理(Menu_JDGL).sql | 13 +
SGGL/BLL/BLL.csproj | 1 +
SGGL/BLL/BoSheng/BOSHENGMonitorService.cs | 2 +-
SGGL/BLL/Common/Const.cs | 11 +-
SGGL/BLL/JDGL/Check/WeekPlanService.cs | 122 ++
.../CQMS/ManageReportNew/MonthReport.aspx.cs | 1877 ++++++++++++-----
.../File/Excel/DataIn/周进度计划导入模板.xls | Bin 0 -> 25088 bytes
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 +
SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +-
SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx | 114 +
.../FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs | 177 ++
.../JDGL/Check/WeekPlan.aspx.designer.cs | 150 ++
SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx | 125 ++
.../JDGL/Check/WeekPlanIn.aspx.cs | 735 +++++++
.../JDGL/Check/WeekPlanIn.aspx.designer.cs | 204 ++
SGGL/FineUIPro.Web/Web.config | 2 +-
.../InspectionSummary.aspx.cs | 15 +-
SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 1 +
SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx | 16 +-
SGGL/FineUIPro.Web/common/mainProject2.aspx | 8 +-
SGGL/FineUIPro.Web/common/main_new.aspx | 6 +-
SGGL/FineUIPro.Web/common/main_new1.aspx | 10 +-
SGGL/FineUIPro.Web/index.aspx.cs | 2 +
SGGL/Model/Model.cs | 640 ++++++
SGGL/WebAPI/WebAPI.csproj.user | 2 +-
26 files changed, 3821 insertions(+), 542 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql
create mode 100644 SGGL/BLL/JDGL/Check/WeekPlanService.cs
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql
new file mode 100644
index 00000000..c12f4b7d
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql
@@ -0,0 +1,112 @@
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ܽȼƻ','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',4)
+ GO
+
+
+CREATE TABLE [dbo].[JDGL_WeekPlan](
+ [WeekPlanId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [WeekNo] [nvarchar](50) NULL,
+ [StartDate] [datetime] NULL,
+ [EndDate] [datetime] NULL,
+ [UnitWork] [nvarchar](50) NULL,
+ [Major] [nvarchar](50) NULL,
+ [WorkContent] [nvarchar](500) NULL,
+ [UnitId] [nvarchar](50) NULL,
+ [DutyPerson] [nvarchar](50) NULL,
+ [PlanDate] [datetime] NULL,
+ [IsOK] [bit] NULL,
+ [Remark] [nvarchar](200) NULL,
+ [CompileMan] [nvarchar](50) NULL,
+ [CompileDate] [datetime] NULL,
+ [SortIndex] [int] NULL,
+ CONSTRAINT [PK_JDGL_WeekPlan] PRIMARY KEY CLUSTERED
+(
+ [WeekPlanId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Project]
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] FOREIGN KEY([UnitId])
+REFERENCES [dbo].[Base_Unit] ([UnitId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit]
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] FOREIGN KEY([DutyPerson])
+REFERENCES [dbo].[Sys_User] ([UserId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Sys_User]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekPlanId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'ProjectId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekNo'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'StartDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'EndDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'/λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitWork'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Major'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WorkContent'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ελ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'廷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'DutyPerson'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'PlanDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'IsOK'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Remark'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileMan'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'SortIndex'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܽȼƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan'
+GO
+
+
diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
index 5cacfbb3..b592cf6f 100644
--- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
+++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
@@ -104,6 +104,19 @@ go
VALUES('F136D1B4-A988-42E7-AD7C-4A246B440D03','94287B92-7E96-4B90-BC6F-DAF30AE3B314','保存',4)
GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
+ GO
+
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1)
--GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 073bd892..6ef3d483 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -587,6 +587,7 @@
+
diff --git a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
index 30bf9248..bc5b5f4d 100644
--- a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
+++ b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
@@ -47,7 +47,7 @@ namespace BLL
{
try
{
- var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(100).ToList();
+ var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(500).ToList();
if (getDataList.Count() > 0)
{
var getDataList0 = getDataList.Where(x => x.MessageText.Contains("\"Type\":0")).ToList();
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 1aa5cf7a..bae108bb 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3152,6 +3152,10 @@ namespace BLL
///
public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls";
///
+ /// 周进度计划导入模版文件原始的虚拟路径
+ ///
+ public const string WeekPlanTemplateUrl = "File\\Excel\\DataIn\\周进度计划导入模板.xls";
+ ///
/// 仪表索引
///
public const string InstrumentUrl = "File\\Excel\\TestRun\\仪表索引模板.xlsx";
@@ -5767,10 +5771,15 @@ namespace BLL
public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7";
///
- /// 工程量完成情况
+ /// 月度计划情况
///
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
+ ///
+ /// 周进度计划
+ ///
+ public const string WeekPlanMenuId = "56A54B4B-BBA3-4249-9FFC-3A60DAC79059";
+
///
/// 进度完成情况
///
diff --git a/SGGL/BLL/JDGL/Check/WeekPlanService.cs b/SGGL/BLL/JDGL/Check/WeekPlanService.cs
new file mode 100644
index 00000000..12deb96d
--- /dev/null
+++ b/SGGL/BLL/JDGL/Check/WeekPlanService.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 周计划情况
+ ///
+ public class WeekPlanService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取周计划情况
+ ///
+ ///
+ ///
+ public static Model.JDGL_WeekPlan GetWeekPlanById(string WeekPlanId)
+ {
+ return Funs.DB.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlanId);
+ }
+
+ ///
+ /// 根据主键获取周计划情况
+ ///
+ ///
+ ///
+ public static List GetWeekPlansByWeeks(string projectId, string weekNo)
+ {
+ return (from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x).ToList();
+ }
+
+ ///
+ /// 添加周计划情况
+ ///
+ ///
+ public static void AddWeekPlan(Model.JDGL_WeekPlan WeekPlan)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan
+ {
+ WeekPlanId = WeekPlan.WeekPlanId,
+ ProjectId = WeekPlan.ProjectId,
+ WeekNo = WeekPlan.WeekNo,
+ StartDate = WeekPlan.StartDate,
+ EndDate = WeekPlan.EndDate,
+ UnitWork = WeekPlan.UnitWork,
+ Major = WeekPlan.Major,
+ WorkContent = WeekPlan.WorkContent,
+ UnitId = WeekPlan.UnitId,
+ DutyPerson = WeekPlan.DutyPerson,
+ PlanDate = WeekPlan.PlanDate,
+ IsOK = WeekPlan.IsOK,
+ Remark = WeekPlan.Remark,
+ CompileMan = WeekPlan.CompileMan,
+ CompileDate = WeekPlan.CompileDate,
+ SortIndex = WeekPlan.SortIndex,
+ };
+ db.JDGL_WeekPlan.InsertOnSubmit(newWeekPlan);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改周计划情况
+ ///
+ ///
+ public static void UpdateWeekPlan(Model.JDGL_WeekPlan WeekPlan)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.JDGL_WeekPlan newWeekPlan = db.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlan.WeekPlanId);
+ if (newWeekPlan != null)
+ {
+ newWeekPlan.UnitWork = WeekPlan.UnitWork;
+ newWeekPlan.Major = WeekPlan.Major;
+ newWeekPlan.WorkContent = WeekPlan.WorkContent;
+ newWeekPlan.UnitId = WeekPlan.UnitId;
+ newWeekPlan.DutyPerson = WeekPlan.DutyPerson;
+ newWeekPlan.PlanDate = WeekPlan.PlanDate;
+ newWeekPlan.IsOK = WeekPlan.IsOK;
+ newWeekPlan.Remark = WeekPlan.Remark;
+ newWeekPlan.CompileMan = WeekPlan.CompileMan;
+ newWeekPlan.CompileDate = WeekPlan.CompileDate;
+ newWeekPlan.SortIndex = WeekPlan.SortIndex;
+
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除周计划情况
+ ///
+ ///
+ public static void DeleteWeekPlanByWeekPlanId(string WeekPlanId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.JDGL_WeekPlan where x.WeekPlanId == WeekPlanId select x).FirstOrDefault();
+ if (q != null)
+ {
+ db.JDGL_WeekPlan.DeleteOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除周计划情况
+ ///
+ ///
+ public static void DeleteAllWeekPlan(string projectId, string weekNo)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = from x in db.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x;
+ if (q != null)
+ {
+ db.JDGL_WeekPlan.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
index 588b9c69..e990e507 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
* @param doc Document对象
* @return
*/
- public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "",string CenterPage="")
+ public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "", string CenterPage = "")
{
Cell cell = new Cell(doc);
Paragraph p = new Paragraph(doc);
@@ -177,7 +177,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//序号
value = " " + value;
}
-
+
p.AppendChild(new Run(doc, value));
@@ -217,10 +217,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
var endDate = Convert.ToDateTime(weekModel.EndDate);
//获取project
var pModel = db.Base_Project.FirstOrDefault(x => x.ProjectId == weekModel.ProjectId);
- var urlHz = startDate.ToString("yyyyMMdd")+"-"
+ var urlHz = startDate.ToString("yyyyMMdd") + "-"
+ endDate.ToString("yyyyMMdd");
- newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第"+ weekModel.SortId + "期)"+ urlHz);
+ newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第" + weekModel.SortId + "期)" + urlHz);
if (File.Exists(newUrl))
{
@@ -242,9 +242,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
orderby x.UnitName
select x).FirstOrDefault();
- Bookmark bkmark = doc.Range.Bookmarks["username"];
- if (bkmark != null) {
-
+ Bookmark bkmark = doc.Range.Bookmarks["username"];
+ if (bkmark != null)
+ {
+
if (unitsYz != null)
{
bkmark.Text = unitsYz.UnitName;
@@ -256,14 +257,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//}
}
- bkmark= doc.Range.Bookmarks["projectNo"];
- if (bkmark!=null)
+ bkmark = doc.Range.Bookmarks["projectNo"];
+ if (bkmark != null)
{
bkmark.Text = pModel.ProjectCode;
}
bkmark = doc.Range.Bookmarks["createdate"];
- if (bkmark!=null)
+ if (bkmark != null)
{
bkmark.Text = weekModel.CreateDate.ToString().Split(' ')[0].Replace('/', '.');
}
@@ -275,7 +276,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
bkmark = doc.Range.Bookmarks["quamanagername"];
- if (bkmark != null) {
+ if (bkmark != null)
+ {
//var zlName = "";
////根据项目获取质量经理
//var puserList = db.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId && x.RoleId.Contains(BLL.Const.QAManager)).ToList();
@@ -297,19 +299,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
var sdate = Convert.ToDateTime(weekModel.StartDate);
var edate = Convert.ToDateTime(weekModel.EndDate);
- bkmark.Text = sdate.Year+"年"+ sdate.Month +"月"+ sdate.Day+"日至"+
+ bkmark.Text = sdate.Year + "年" + sdate.Month + "月" + sdate.Day + "日至" +
edate.Year + "年" + edate.Month + "月" + edate.Day + "日";
}
bkmark = doc.Range.Bookmarks["reportindex"];
- if (bkmark!=null)
+ if (bkmark != null)
{
bkmark.Text = weekModel.SortId;
}
bkmark = doc.Range.Bookmarks["fromcode"];
//fromcode,项目号-RM-PQM-顺序号
- if (bkmark!=null)
+ if (bkmark != null)
{
bkmark.Text = pModel.ProjectCode + "-RM-PQM-" + weekModel.SortId;
}
@@ -323,12 +325,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//跳过页眉的表头
while (isYm)
{
- if (table.Range.Text.Substring(0, 2)!="序号")
+ if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
- else{
+ else
+ {
isYm = false;
}
}
@@ -338,14 +341,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width,"","1"));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.ProStage, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.ProDescribe, doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.TargetValue, doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.MonthPer, doc, table.FirstRow.Cells[4].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
-
+
numberIndex += 1;
}
//自动设置表格样式
@@ -359,7 +362,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
bkmark = doc.Range.Bookmarks["Content1"];
if (bkmark != null)
{
- bkmark.Text= txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
+ bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
}
bkmark = doc.Range.Bookmarks["Content2"];
@@ -379,10 +382,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText;
}
-
+
#endregion
- var ContuructionAllList = db.Report_Construction_Plan.Where(x => x.ReportId == Id).OrderBy(x=>x.UnitOrMajor).ToList();
+ var ContuructionAllList = db.Report_Construction_Plan.Where(x => x.ReportId == Id).OrderBy(x => x.UnitOrMajor).ToList();
#region 3.施工方案及检验试验计划审批情况
@@ -459,7 +462,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
numberIndex = 1;
- int? num1 = 0, num2 = 0, num3=0;
+ int? num1 = 0, num2 = 0, num3 = 0;
foreach (var item in wdsgfaList)
{
//创建行
@@ -473,7 +476,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
- num3+= item.Quantity3;
+ num3 += item.Quantity3;
numberIndex += 1;
}
//自动设置表格样式
@@ -575,11 +578,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
@@ -590,11 +596,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
//创建行
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -628,11 +637,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
@@ -643,11 +655,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
//创建行
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -668,9 +683,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
int i = 1;
- var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
- && x.CNProfessionalId != BLL.Const.ComprehensiveId
- orderby x.SortIndex select x;
+ var cNProfessionals = from x in Funs.DB.Base_CNProfessional
+ where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId
+&& x.CNProfessionalId != BLL.Const.ComprehensiveId
+ orderby x.SortIndex
+ select x;
foreach (var item in cNProfessionals)
{
//专业下所有集合
@@ -695,7 +712,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity5Sum += Convert.ToInt32(checkStatisc.OneOKRate);
Quantity6Sum += Convert.ToInt32(checkStatisc.TotalOneOKRate);
}
- if (StatisticsList.Count>0)
+ if (StatisticsList.Count > 0)
{
isYm = true;
whileIndex += 1;
@@ -719,14 +736,35 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell((numberIndex-1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.WorkName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.CheckNum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalCheckNum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.OKNum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalOKNum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- row.Cells.Add(CreateCell(item.OneOKRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalOneOKRate.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.CheckNum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalCheckNum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.OKNum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalOKNum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.OneOKRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalOneOKRate.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
@@ -738,13 +776,33 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Row rowhj = new Row(doc);
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity1Sum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity2Sum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity3Sum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity4Sum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity5Sum.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity6Sum.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity1Sum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity2Sum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity3Sum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity4Sum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity5Sum.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity6Sum.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -759,11 +817,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region 7.1合格焊工管理情况
- Quantity1Sum = 0; Quantity2Sum = 0; Quantity3Sum = 0; Quantity4Sum = 0; Quantity5Sum = 0; Quantity6Sum = 0;
+ Quantity1Sum = 0; Quantity2Sum = 0; Quantity3Sum = 0; Quantity4Sum = 0; Quantity5Sum = 0; Quantity6Sum = 0;
int Quantity7Sum = 0, Quantity8Sum = 0;
-
+
List PassWelderList = new List();
-
+
if (project != null)
{
if (project.StartDate != null)
@@ -777,7 +835,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2
orderby y.UnitCode
select new { x.UnitId, y.UnitName };
-
+
foreach (var item in units)
{
@@ -835,7 +893,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity7Sum += passWelderStatisc.OtherMountGuard;
Quantity8Sum += passWelderStatisc.OtherTotal;
}
- if (PassWelderList.Count>0)
+ if (PassWelderList.Count > 0)
{
isYm = true;
whileIndex += 1;
@@ -861,15 +919,41 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Row row = new Row(doc);
row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitName, doc, table.Rows[0].Cells[1].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.PipeMountGuard.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.PipeTotal.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.SteelStructureMountGuard.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.SteelStructureTotal.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- row.Cells.Add(CreateCell(item.EquipmentMountGuard.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.EquipmentTotal.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
- row.Cells.Add(CreateCell(item.OtherMountGuard.ToString(), doc, table.Rows[1].Cells[8].CellFormat.Width));
- row.Cells.Add(CreateCell(item.OtherTotal.ToString(), doc, table.Rows[1].Cells[9].CellFormat.Width));
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.PipeMountGuard.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.PipeTotal.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.SteelStructureMountGuard.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.SteelStructureTotal.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.EquipmentMountGuard.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.EquipmentTotal.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[8] != null)
+ {
+ row.Cells.Add(CreateCell(item.OtherMountGuard.ToString(), doc, table.Rows[1].Cells[8].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[9] != null)
+ {
+ row.Cells.Add(CreateCell(item.OtherTotal.ToString(), doc, table.Rows[1].Cells[9].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
@@ -881,14 +965,41 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Row rowhj = new Row(doc);
rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity1Sum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity2Sum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity3Sum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity4Sum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity5Sum.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity6Sum.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity7Sum.ToString(), doc, table.Rows[1].Cells[8].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(Quantity8Sum.ToString(), doc, table.Rows[1].Cells[9].CellFormat.Width));
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity1Sum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity2Sum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity3Sum.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity4Sum.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity5Sum.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity6Sum.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[8] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity7Sum.ToString(), doc, table.Rows[1].Cells[8].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[9] != null)
+ {
+ rowhj.Cells.Add(CreateCell(Quantity8Sum.ToString(), doc, table.Rows[1].Cells[9].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
@@ -925,10 +1036,22 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建行
Row row = new Row(doc);
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ if (table.FirstRow.Cells[1] != null)
+ {
+ row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
@@ -940,16 +1063,29 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建行
Row rowhj = new Row(doc);
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ if (table.FirstRow.Cells[1] != null)
+ {
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
- else {
+ else
+ {
isYm = true;
numberIndex = 1;
whileIndex += 1;
@@ -1169,7 +1305,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建行
Row row = new Row(doc);
-
+
//如果是第一列,或者
if (numberIndex == 1 || Unitname != item.CreateMan)
@@ -1178,25 +1314,48 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
pageCount += 1;
}
- row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "0", "1"));
- row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "0"));
-
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "0", "1"));
+ row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "0"));
+ }
+
Unitname = item.CreateMan;
}
else
{
- row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "1", "1"));
- row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "1"));
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "1", "1"));
+ row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "1"));
+ }
Unitname = item.CreateMan;
}
-
- row.Cells.Add(CreateCell(item.ProfessionalName.ToString(), doc, table.Rows[0].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthQuantity.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalQuantity.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthRate.ToString(), doc, table.Rows[0].Cells[5].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalRate.ToString(), doc, table.Rows[0].Cells[6].CellFormat.Width));
+ if (table.Rows[0] != null)
+ {
+ if (table.Rows[0].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProfessionalName.ToString(), doc, table.Rows[0].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthQuantity.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalQuantity.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthRate.ToString(), doc, table.Rows[0].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalRate.ToString(), doc, table.Rows[0].Cells[6].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
@@ -1204,27 +1363,46 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
pageCount += 1;
}
-
+
}
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
//创建行
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(totalNum0.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(totalNum1.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[6].CellFormat.Width));
+ if (table.Rows[0] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ if (table.Rows[0].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(totalNum0.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(totalNum1.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[0].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[6].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
- else {
+ else
+ {
isYm = true;
numberIndex = 1;
whileIndex += 1;
@@ -1244,15 +1422,18 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[0].Cells[6].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
+ double numcount6 = table.Rows[0].Cells[6].CellFormat.Width;
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1288,12 +1469,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.QuaRate.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.QuaRate.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
@@ -1304,18 +1500,34 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
//创建行
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
- else {
+ else
+ {
isYm = true;
numberIndex = 1;
whileIndex += 1;
@@ -1335,14 +1547,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
+ double numcount5 = 0;
+ if (table.Rows[0].Cells[5] != null)
+ {
+ numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1380,11 +1599,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -1394,11 +1625,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -1426,11 +1669,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
- row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ if (table.FirstRow.Cells[1] != null)
+ {
+ row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
}
@@ -1468,21 +1726,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -1514,15 +1789,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ }
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1549,16 +1847,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1595,22 +1903,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -1642,14 +1966,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ if (table.Rows[0] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ }
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
@@ -1677,16 +2025,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1723,22 +2081,41 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ }
+ if (table.Rows[1] != null)
+ {
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -1770,15 +2147,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ }
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1805,16 +2205,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null && table.Rows[0] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1851,22 +2261,41 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ }
+ if (table.Rows[1] != null)
+ {
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -1898,15 +2327,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ }
+ if (table.Rows[1] != null)
+ {
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1933,16 +2385,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -1979,22 +2441,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -2026,15 +2504,35 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2061,16 +2559,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2107,22 +2615,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -2154,15 +2678,35 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2189,16 +2733,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2235,22 +2789,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
-
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
- // 合并第一行的前两个单元格
- table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
- table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
-
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
-
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.Rows[0].Cells[1].CellFormat.Width));
+ // 合并第一行的前两个单元格
+ table.Rows[0].Cells[0].CellFormat.VerticalMerge = CellMerge.First;
+ table.Rows[1].Cells[0].CellFormat.VerticalMerge = CellMerge.Previous;
+ if (table.Rows[1].Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, row);
num1 += item.MonthsCount;
@@ -2282,15 +2852,35 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
-
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.Rows[0].Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[0].Cells[1].CellFormat.Width));
+ if (table.Rows[1].Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[6] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num5.ToString(), doc, table.Rows[1].Cells[6].CellFormat.Width));
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num6.ToString(), doc, table.Rows[1].Cells[7].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2317,16 +2907,26 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建合计
Row rowhj = new Row(doc);
- double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
- double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
- double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
- double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
- double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
- double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
- double numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
- double numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
- double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
- rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ if (table.Rows[0] != null && table.Rows[1] != null)
+ {
+ double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
+ double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
+ double numcount2 = table.Rows[1].Cells[2].CellFormat.Width;
+ double numcount3 = table.Rows[1].Cells[3].CellFormat.Width;
+ double numcount4 = table.Rows[1].Cells[4].CellFormat.Width;
+ double numcount5 = table.Rows[1].Cells[5].CellFormat.Width;
+ double numcount6 = 0, numcount7 = 0;
+ if (table.Rows[1].Cells[6] != null)
+ {
+ numcount6 = table.Rows[1].Cells[6].CellFormat.Width;
+ }
+ if (table.Rows[1].Cells[7] != null)
+ {
+ numcount7 = table.Rows[1].Cells[7].CellFormat.Width;
+ }
+ double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6 + numcount7;
+ rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
+ }
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
@@ -2374,11 +2974,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
//num1 += MonthsCountstring;
//num2 += ProjectCountstring;
@@ -2413,11 +3025,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2454,12 +3078,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2471,12 +3110,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2511,12 +3165,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num3 += item.TotalNoBackCount;
num1 += item.MonthsCount;
@@ -2527,12 +3196,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2567,12 +3251,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2583,12 +3282,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2624,12 +3338,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2650,12 +3379,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2690,12 +3434,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.RectificationRate, doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.RectificationRate, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2705,12 +3464,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2745,11 +3519,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2759,11 +3545,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2798,12 +3596,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.MonthsBackCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.TotalNoBackCount.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, row);
num1 += item.MonthsCount;
num2 += item.ProjectCount;
@@ -2815,12 +3628,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
//创建合计
Row rowhj = new Row(doc);
- rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
- rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ if (table.FirstRow != null)
+ {
+ rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
+ if (table.FirstRow.Cells[2] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[3] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[4] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table.FirstRow.Cells[5] != null)
+ {
+ rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -2852,12 +3680,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex18_1.ToString(), doc, table18_1.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitId, doc, table18_1.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProblemDesrioption, doc, table18_1.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TreatmentMeasures, doc, table18_1.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProcessingResults, doc, table18_1.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remark, doc, table18_1.FirstRow.Cells[5].CellFormat.Width));
+ if (table18_1.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex18_1.ToString(), doc, table18_1.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.UnitId, doc, table18_1.FirstRow.Cells[1].CellFormat.Width));
+ if (table18_1.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProblemDesrioption, doc, table18_1.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table18_1.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.TreatmentMeasures, doc, table18_1.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table18_1.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProcessingResults, doc, table18_1.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table18_1.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remark, doc, table18_1.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table18_1.Rows.Insert(numberIndex18_1, row);
numberIndex18_1 += 1;
@@ -2889,12 +3732,27 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex18_2.ToString(), doc, table18_2.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.UnitId, doc, table18_2.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProblemDesrioption, doc, table18_2.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.TreatmentMeasures, doc, table18_2.FirstRow.Cells[3].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProcessingResults, doc, table18_2.FirstRow.Cells[4].CellFormat.Width));
- row.Cells.Add(CreateCell(item.Remark, doc, table18_2.FirstRow.Cells[5].CellFormat.Width));
+ if (table18_2.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex18_2.ToString(), doc, table18_2.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.UnitId, doc, table18_2.FirstRow.Cells[1].CellFormat.Width));
+ if (table18_2.FirstRow.Cells[2] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProblemDesrioption, doc, table18_2.FirstRow.Cells[2].CellFormat.Width));
+ }
+ if (table18_2.FirstRow.Cells[3] != null)
+ {
+ row.Cells.Add(CreateCell(item.TreatmentMeasures, doc, table18_2.FirstRow.Cells[3].CellFormat.Width));
+ }
+ if (table18_2.FirstRow.Cells[4] != null)
+ {
+ row.Cells.Add(CreateCell(item.ProcessingResults, doc, table18_2.FirstRow.Cells[4].CellFormat.Width));
+ }
+ if (table18_2.FirstRow.Cells[5] != null)
+ {
+ row.Cells.Add(CreateCell(item.Remark, doc, table18_2.FirstRow.Cells[5].CellFormat.Width));
+ }
+ }
table18_2.Rows.Insert(numberIndex18_2, row);
numberIndex18_2 += 1;
@@ -2927,8 +3785,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex19.ToString(), doc, table19.FirstRow.Cells[0].CellFormat.Width, "", "1"));
- row.Cells.Add(CreateCell(item.NextQualityControlContent, doc, table19.FirstRow.Cells[1].CellFormat.Width));
+ if (table19.FirstRow != null)
+ {
+ row.Cells.Add(CreateCell(numberIndex19.ToString(), doc, table19.FirstRow.Cells[0].CellFormat.Width, "", "1"));
+ row.Cells.Add(CreateCell(item.NextQualityControlContent, doc, table19.FirstRow.Cells[1].CellFormat.Width));
+ }
table19.Rows.Insert(numberIndex19, row);
numberIndex19 += 1;
@@ -3105,7 +3966,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (bkmark != null)
{
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText;
- }
+ }
bkmark = doc.Range.Bookmarks["ImageContent2"];
if (bkmark != null)
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls
new file mode 100644
index 0000000000000000000000000000000000000000..7d83766c40e083189165f6293a35b8a61e33ab0b
GIT binary patch
literal 25088
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
I{0~9@2aRF3fdBvi
literal 0
HcmV?d00001
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index d76f0f88..dacec2ee 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1403,6 +1403,8 @@
+
+
@@ -13922,6 +13924,20 @@
UndergroundPipeCompletionIn.aspx
+
+ WeekPlan.aspx
+ ASPXCodeBehind
+
+
+ WeekPlan.aspx
+
+
+ WeekPlanIn.aspx
+ ASPXCodeBehind
+
+
+ WeekPlanIn.aspx
+
EarnedValueCurve.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
index 9e91deff..63ca13cc 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
@@ -1,7 +1,7 @@
- Debug|Any CPU
+ Release|Any CPU
true
false
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx
new file mode 100644
index 00000000..3d59cd90
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx
@@ -0,0 +1,114 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlan.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlan" %>
+
+
+
+
+
+ 周进度计划
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs
new file mode 100644
index 00000000..2484cb80
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Data;
+using System.Data.SqlClient;
+using BLL;
+using Newtonsoft.Json.Linq;
+
+namespace FineUIPro.Web.JDGL.Check
+{
+ public partial class WeekPlan : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();
+ btnNew.OnClientClick = Window1.GetShowReference("WeekPlanEdit.aspx") + "return false;";
+ this.txtWeeks.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
+ BindGrid();
+ }
+ }
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == BLL.Const._Null)
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.WeekPlanMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnNew.Hidden = false;
+ this.btnModify.Hidden = false;
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void btnModify_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "录入";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanEdit.aspx?Weeks={0}", this.txtWeeks.Text, "编辑 - ")));
+ }
+
+ ///
+ /// 加载Grid
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName,uw.UnitWorkName,cn.ProfessionalName,case mp.IsOK when 1 then '已完成' when 0 then '未完成' else '' end as IsOKStr from [dbo].[JDGL_WeekPlan] mp
+left join Base_Unit u on u.UnitId=mp.UnitId
+left join Sys_User us on us.UserId=mp.DutyPerson
+left join WBS_UnitWork uw on uw.UnitWorkId=mp.UnitWork
+left join Base_CNProfessional cn on cn.CNProfessionalId=mp.Major
+where mp.ProjectId=@ProjectId and mp.WeekNo=@WeekNo order by mp.SortIndex";
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ listStr.Add(new SqlParameter("@WeekNo", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtWeeks.Text.Trim() + "-01"))));
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #region 月份选择事件
+ ///
+ /// 月份选择事件
+ ///
+ ///
+ ///
+ protected void txtWeeks_TextChanged(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 保存按钮
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (this.Grid1.Rows.Count > 0)
+ {
+ JArray mergedData = Grid1.GetMergedData();
+ foreach (JObject mergedRow in mergedData)
+ {
+ JObject values = mergedRow.Value("values");
+ int i = mergedRow.Value("index");
+ Model.JDGL_WeekPlan WeekPlan = BLL.WeekPlanService.GetWeekPlanById(this.Grid1.Rows[i].RowID);
+ if (WeekPlan != null)
+ {
+ WeekPlan.CompileMan = this.CurrUser.UserId;
+ WeekPlan.CompileDate = DateTime.Now;
+ BLL.WeekPlanService.UpdateWeekPlan(WeekPlan);
+ }
+ }
+ Alert.ShowInTop("保存成功!", MessageBoxIcon.Success);
+ }
+ else
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ #endregion
+
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ BLL.WeekPlanService.DeleteWeekPlanByWeekPlanId(rowID);
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+
+ #region 导入
+ ///
+ /// 导入按钮
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "导入";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - ")));
+ }
+
+ ///
+ /// 关闭导入弹出窗口
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 统计
+ ///
+ /// 统计分析
+ ///
+ ///
+ ///
+ protected void BtnAnalyse_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "统计";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanStatisc.aspx", "统计 - ")));
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs
new file mode 100644
index 00000000..3e7ac331
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.Check {
+
+
+ public partial class WeekPlan {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtWeeks 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtWeeks;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// BtnAnalyse 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button BtnAnalyse;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnModify;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx
new file mode 100644
index 00000000..d13ca509
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx
@@ -0,0 +1,125 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlanIn" %>
+
+
+
+
+
+ 导入信息
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs
new file mode 100644
index 00000000..fbaf8fb4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs
@@ -0,0 +1,735 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.OleDb;
+using System.IO;
+using System.Linq;
+using System.Web.UI;
+
+namespace FineUIPro.Web.JDGL.Check
+{
+ public partial class WeekPlanIn : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private string initPath = Const.ExcelUrl;
+
+ ///
+ /// 人员集合
+ ///
+ public static List WeekPlans = new List();
+
+ ///
+ /// 错误集合
+ ///
+ public static string errorInfos = string.Empty;
+
+ ///
+ /// 项目ID
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.hdFileName.Text = string.Empty;
+ this.hdCheckResult.Text = string.Empty;
+ if (WeekPlans != null)
+ {
+ WeekPlans.Clear();
+ }
+ errorInfos = string.Empty;
+ this.ProjectId = Request.Params["ProjectId"];
+ }
+ }
+ #endregion
+
+ #region 审核
+ ///
+ /// 审核
+ ///
+ ///
+ ///
+ protected void btnAudit_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (this.fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
+ if (IsXls != ".xls")
+ {
+ ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (WeekPlans != null)
+ {
+ WeekPlans.Clear();
+ }
+ if (!string.IsNullOrEmpty(errorInfos))
+ {
+ errorInfos = string.Empty;
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath))
+ {
+ Directory.CreateDirectory(initFullPath);
+ }
+
+ this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
+ string filePath = initFullPath + this.hdFileName.Text;
+ this.fuAttachUrl.PostedFile.SaveAs(filePath);
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - ")));
+ ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
+ }
+ catch (Exception ex)
+ {
+ ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region 读Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL(ds.Tables[0], 8);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集行数
+ ///
+ private bool AddDatasetToSQL(DataTable pds, int Cols)
+ {
+ string result = string.Empty;
+ int ic, ir;
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning);
+ }
+ ir = pds.Rows.Count;
+ Model.SGGLDB db = Funs.DB;
+ var projectUnits = from x in db.Project_ProjectUnit
+ join y in db.Base_Unit on x.UnitId equals y.UnitId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UnitId, y.UnitName };
+ var cns = from x in db.Base_CNProfessional select x;
+ var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ var projectUsers = from x in db.Project_ProjectUser
+ join y in db.Sys_User on x.UserId equals y.UserId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UserId, y.UserName };
+ if (pds != null && ir > 0)
+ {
+ for (int i = 0; i < ir; i++)
+ {
+ string col0 = pds.Rows[i][0].ToString().Trim();
+ if (string.IsNullOrEmpty(col0))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var unitWork = unitWorks.FirstOrDefault(e => e.UnitWorkName == col0);
+ if (unitWork == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "[" + col0 + "]不在项目单位工程中!" + "|";
+ }
+ }
+
+ string col1 = pds.Rows[i][1].ToString().Trim();
+ if (string.IsNullOrEmpty(col1))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var cn = cns.FirstOrDefault(e => e.ProfessionalName == col1);
+ if (cn == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "[" + col1 + "]不在专业信息中!" + "|";
+ }
+ }
+
+ string col2 = pds.Rows[i][2].ToString().Trim();
+ if (string.IsNullOrEmpty(col2))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|";
+ }
+
+ string col3 = pds.Rows[i][3].ToString().Trim();
+ if (string.IsNullOrEmpty(col3))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var unit = projectUnits.FirstOrDefault(e => e.UnitName == col3);
+ if (unit == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col3 + "]不在项目单位中!" + "|";
+ }
+ }
+
+ string col4 = pds.Rows[i][4].ToString().Trim();
+ if (string.IsNullOrEmpty(col4))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var user = projectUsers.FirstOrDefault(e => e.UserName == col4);
+ if (user == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col4 + "]不在项目用户信息中!" + "|";
+ }
+ }
+
+ string col5 = pds.Rows[i][5].ToString().Trim();
+ if (!string.IsNullOrEmpty(col5))
+ {
+ try
+ {
+ DateTime dec = Convert.ToDateTime(col5);
+ }
+ catch (Exception)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col5 + "]错误!" + "|";
+ }
+ }
+ else
+ {
+ result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|";
+ }
+
+ string col6 = pds.Rows[i][6].ToString().Trim();
+ if (!string.IsNullOrEmpty(col6))
+ {
+ if (col6 != "已完成" && col6 != "未完成")
+ {
+ result += "第" + (i + 2).ToString() + "行," + "完成状态" + "," + "[" + col6 + "]错误!" + "|";
+ }
+ }
+ }
+ if (!string.IsNullOrEmpty(result))
+ {
+ result = result.Substring(0, result.LastIndexOf("|"));
+ errorInfos = result;
+ Alert alert = new Alert
+ {
+ Message = result,
+ Target = Target.Self
+ };
+ alert.Show();
+
+
+ }
+ else
+ {
+ errorInfos = string.Empty;
+ ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 导入
+ ///
+ /// 导入
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ if (!string.IsNullOrEmpty(this.hdFileName.Text))
+ {
+ string rootPath = Server.MapPath("~/");
+ ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
+ }
+ else
+ {
+ ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData2(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL2(ds.Tables[0], 8);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集列数
+ ///
+ private bool AddDatasetToSQL2(DataTable pds, int Cols)
+ {
+ int ic, ir;
+ WeekPlans.Clear();
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
+ }
+
+ ir = pds.Rows.Count;
+ Model.SGGLDB db = Funs.DB;
+ var projectUnits = from x in db.Project_ProjectUnit
+ join y in db.Base_Unit on x.UnitId equals y.UnitId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UnitId, y.UnitName };
+ var projectUsers = from x in db.Project_ProjectUser
+ join y in db.Sys_User on x.UserId equals y.UserId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UserId, y.UserName };
+ var cns = from x in db.Base_CNProfessional select x;
+ var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ string weekNo = this.txtWeekNo.Text.Trim();
+ DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
+ DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
+ if (pds != null && ir > 0)
+ {
+ for (int i = 0; i < ir; i++)
+ {
+ Model.JDGL_WeekPlan WeekPlan = new Model.JDGL_WeekPlan();
+ string col0 = pds.Rows[i][0].ToString().Trim();
+ string col1 = pds.Rows[i][1].ToString().Trim();
+ string col2 = pds.Rows[i][2].ToString().Trim();
+ string col3 = pds.Rows[i][3].ToString().Trim();
+ string col4 = pds.Rows[i][4].ToString().Trim();
+ string col5 = pds.Rows[i][5].ToString().Trim();
+ string col6 = pds.Rows[i][6].ToString().Trim();
+ string col7 = pds.Rows[i][7].ToString().Trim();
+ WeekPlan.WeekNo = weekNo;
+ WeekPlan.StartDate = startDate;
+ WeekPlan.EndDate = endDate;
+ if (!string.IsNullOrEmpty(col0))//单位工程
+ {
+ var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkName == col0);
+ if (unitWork != null)
+ {
+ WeekPlan.UnitWork = unitWork.UnitWorkId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col1))//专业
+ {
+ var cn = cns.FirstOrDefault(x => x.ProfessionalName == col1);
+ if (cn != null)
+ {
+ WeekPlan.Major = cn.CNProfessionalId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col2))//工作项
+ {
+ WeekPlan.WorkContent = col2;
+ }
+ if (!string.IsNullOrEmpty(col3))//责任单位
+ {
+ var projectUnit = projectUnits.FirstOrDefault(x => x.UnitName == col3);
+ if (projectUnit != null)
+ {
+ WeekPlan.UnitId = projectUnit.UnitId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col4))//五环责任人
+ {
+ var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col4);
+ if (projectUser != null)
+ {
+ WeekPlan.DutyPerson = projectUser.UserId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col5))//计划完成时间
+ {
+ WeekPlan.PlanDate = Funs.GetNewDateTime(col5);
+
+ }
+ if (!string.IsNullOrEmpty(col6))//完成状态
+ {
+ WeekPlan.IsOK = col6 == "已完成" ? true : false;
+ }
+ if (!string.IsNullOrEmpty(col7))//备注
+ {
+ WeekPlan.Remark = col7;
+ }
+ int num = (from x in Funs.DB.JDGL_WeekPlan where x.WeekNo == weekNo && x.ProjectId == this.CurrUser.LoginProjectId select x).Count();
+ WeekPlan.SortIndex = num + 1;
+ WeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
+ WeekPlans.Add(WeekPlan);
+ }
+ if (WeekPlans.Count > 0)
+ {
+ this.Grid1.Hidden = false;
+ this.Grid1.DataSource = WeekPlans;
+ this.Grid1.DataBind();
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.txtWeekNo.Text.Trim()))
+ {
+ ShowNotify("请选择周号!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ var WeekPlanLists = from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == this.ProjectId select x;
+ string quantityListId = string.Empty;
+ int a = WeekPlans.Count();
+ string weekNo = this.txtWeekNo.Text.Trim();
+
+ for (int i = 0; i < a; i++)
+ {
+ var oldWeekPlan = WeekPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.WeekNo == weekNo && x.UnitId == WeekPlans[i].UnitId && x.WorkContent == WeekPlans[i].WorkContent);
+ if (oldWeekPlan == null)
+ {
+ Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan();
+ newWeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
+ newWeekPlan.ProjectId = this.ProjectId;
+ newWeekPlan.WeekNo = weekNo;
+ newWeekPlan.StartDate= WeekPlans[i].StartDate;
+ newWeekPlan.EndDate = WeekPlans[i].EndDate;
+ newWeekPlan.UnitWork = WeekPlans[i].UnitWork;
+ newWeekPlan.Major = WeekPlans[i].Major;
+ newWeekPlan.WorkContent = WeekPlans[i].WorkContent;
+ newWeekPlan.UnitId = WeekPlans[i].UnitId;
+ newWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
+ newWeekPlan.PlanDate = WeekPlans[i].PlanDate;
+ newWeekPlan.IsOK = WeekPlans[i].IsOK;
+ newWeekPlan.Remark = WeekPlans[i].Remark;
+ newWeekPlan.SortIndex = WeekPlans[i].SortIndex;
+ newWeekPlan.CompileMan = this.CurrUser.UserId;
+ newWeekPlan.CompileDate = DateTime.Now;
+ BLL.WeekPlanService.AddWeekPlan(newWeekPlan);
+ }
+ else
+ {
+ oldWeekPlan.UnitWork = WeekPlans[i].UnitWork;
+ oldWeekPlan.Major = WeekPlans[i].Major;
+ oldWeekPlan.WorkContent = WeekPlans[i].WorkContent;
+ oldWeekPlan.UnitId = WeekPlans[i].UnitId;
+ oldWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
+ oldWeekPlan.PlanDate = WeekPlans[i].PlanDate;
+ oldWeekPlan.IsOK = WeekPlans[i].IsOK;
+ oldWeekPlan.Remark = WeekPlans[i].Remark;
+ BLL.WeekPlanService.UpdateWeekPlan(oldWeekPlan);
+ }
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ string filePath = initFullPath + this.hdFileName.Text;
+ if (filePath != string.Empty && System.IO.File.Exists(filePath))
+ {
+ System.IO.File.Delete(filePath);//删除上传的XLS文件
+ }
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 导出错误提示
+ ///
+ /// 导出错误提示
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss");
+ //System.Web.HttpContext HC = System.Web.HttpContext.Current;
+ //HC.Response.Clear();
+ //HC.Response.Buffer = true;
+ //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文
+
+ ////---导出为Excel文件
+ //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls");
+ //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
+
+ //System.IO.StringWriter sw = new System.IO.StringWriter();
+ //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
+ //this.gvErrorInfo.RenderControl(htw);
+ //HC.Response.Write(sw.ToString());
+ //HC.Response.End();
+ }
+
+ ///
+ /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
+ ///
+ ///
+ public override void VerifyRenderingInServerForm(Control control)
+ {
+ }
+ #endregion
+
+ #region 下载模板
+ ///
+ /// 下载模板按钮
+ ///
+ ///
+ ///
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
+ }
+
+ ///
+ /// 下载导入模板
+ ///
+ ///
+ ///
+ protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
+ {
+ if (e.EventArgument == "Confirm_OK")
+ {
+ string rootPath = Server.MapPath("~/");
+ string uploadfilepath = rootPath + Const.WeekPlanTemplateUrl;
+ string filePath = Const.WeekPlanTemplateUrl;
+ string fileName = Path.GetFileName(filePath);
+ FileInfo info = new FileInfo(uploadfilepath);
+ long fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(uploadfilepath, 0, fileSize);
+ Response.End();
+ }
+ }
+ #endregion
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertUnitName(object UnitId)
+ {
+ string name = string.Empty;
+ if (UnitId != null)
+ {
+ name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString());
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertDutyPersonName(object DutyPerson)
+ {
+ string name = string.Empty;
+ if (DutyPerson != null)
+ {
+ name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString());
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertUnitWorkName(object UnitWork)
+ {
+ string name = string.Empty;
+ if (UnitWork != null)
+ {
+ Model.WBS_UnitWork uw = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWork.ToString());
+ if (uw != null)
+ {
+ name = uw.UnitWorkName;
+ }
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertProfessionalName(object Major)
+ {
+ string name = string.Empty;
+ if (Major != null)
+ {
+ Model.Base_CNProfessional major = BLL.CNProfessionalService.GetCNProfessional(Major.ToString());
+ if (major != null)
+ {
+ name = major.ProfessionalName;
+ }
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertIsOK(object IsOK)
+ {
+ string name = string.Empty;
+ if (IsOK != null)
+ {
+ if (IsOK.ToString() == "True")
+ {
+ name = "已完成";
+ }
+ else
+ {
+ name = "未完成";
+ }
+ }
+ return name;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs
new file mode 100644
index 00000000..f23fddd1
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs
@@ -0,0 +1,204 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.Check {
+
+
+ public partial class WeekPlanIn {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtWeekNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWeekNo;
+
+ ///
+ /// txtStartDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtStartDate;
+
+ ///
+ /// txtEndDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEndDate;
+
+ ///
+ /// btnAudit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAudit;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// lbImageUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbImageUrl;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+
+ ///
+ /// hdCheckResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckResult;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index f50b26d3..963148f2 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -77,7 +77,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
index 8968a929..f926ddf3 100644
--- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
@@ -250,15 +250,12 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
}).ToList();
//一次共检合格数
- var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
- join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
- where y.IsOnceQualified == true && y.InspectionDate != null
- select new { y.ProjectId,y.InspectionDate,y.IsOnceQualified,x.InspectionId, Isid= y.InspectionId }).ToList();
+ 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();
////总数
- var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
- join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
- where y.InspectionDate != null
- select new { y.ProjectId, x.InspectionId, Isid = y.InspectionId,y.InspectionDate }).ToList();
+ var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement
+ select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.CompileDate }).ToList();
//关键事项
var list22 = (from x in Funs.DB.GJSX
@@ -639,7 +636,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
if (hgs>0)
{
//验收日期
- model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate;
+ model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate;
}
model.SummeryResult = hgs.ToString();
allList.Add(model);
diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
index 2fac288a..b34c5503 100644
--- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
@@ -11,6 +11,7 @@
+
diff --git a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
index 4e1a7268..e209644b 100644
--- a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
+++ b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
@@ -291,9 +291,9 @@
var one1 =<%=One1 %>
var one2 =<%=One2 %>
var one3 =<%=One3 %>
- category_One('one1', "质量验收一次合格率", one1, one1 + "%")
+ category_One('one1', "施工质量一次共检合格率", one1, one1 + "%")
category_One('one2', "焊接一次拍片合格率", one2, one2 + "%")
- category_One('one3', "质量问题整改完成率", one3, one3 + "%")
+ category_One('one3', "质量巡检问题整改率", one3, one3 + "%")