From 254c7ac7c04982b2cfbdb19e8ea1e046fabcc6e0 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 30 Oct 2024 17:15:30 +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_V2024-10-29-gaofei.sql | 42 ++ .../版本日志/SGGLDB_V2024-10-30-gaofei.sql | 6 + SGGL/BLL/WebService/CNCECHSSEWebService.cs | 378 ++++++------ SGGL/BLL/ZHGL/DataSync/ServerService.cs | 9 +- .../ZHGL/Environmental/EnergyReportService.cs | 2 +- .../Environmental/EnergyreportItemService .cs | 68 +-- .../ArchitectureReportSave.aspx.cs | 112 ++-- .../Environmental/ChemicalReportSave.aspx.cs | 84 +-- .../ZHGL/Environmental/EnergyReport.aspx | 2 + .../ZHGL/Environmental/EnergyReport.aspx.cs | 60 +- .../ZHGL/Environmental/EnergyReportSave.aspx | 13 +- .../Environmental/EnergyReportSave.aspx.cs | 202 +++++-- .../ZHGL/Environmental/OperationReport.aspx | 18 +- .../Environmental/OperationReport.aspx.cs | 69 ++- .../OperationReport.aspx.designer.cs | 27 - .../Environmental/OperationReportEdit.aspx | 163 ++++-- .../Environmental/OperationReportEdit.aspx.cs | 209 +++++-- .../OperationReportEdit.aspx.designer.cs | 252 ++++---- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 4 +- SGGL/Model/APIItem/EPSummaryReport.cs | 17 +- SGGL/Model/APIItem/EnergyReportItem.cs | 1 + .../Environmental_OperationReportDto.cs | 74 +++ SGGL/Model/Model.cs | 542 +++++++++++++----- SGGL/Model/Model.csproj | 1 + 24 files changed, 1527 insertions(+), 828 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2024-10-29-gaofei.sql create mode 100644 DataBase/版本日志/SGGLDB_V2024-10-30-gaofei.sql create mode 100644 SGGL/Model/APIItem/Environmental_OperationReportDto.cs diff --git a/DataBase/版本日志/SGGLDB_V2024-10-29-gaofei.sql b/DataBase/版本日志/SGGLDB_V2024-10-29-gaofei.sql new file mode 100644 index 00000000..58e8b765 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-10-29-gaofei.sql @@ -0,0 +1,42 @@ +alter table Environmental_OperationReport drop column Code +alter table Environmental_OperationReport drop column UnitLevel +alter table Environmental_OperationReport drop column CreateDate +alter table Environmental_OperationReport drop column Place +alter table Environmental_OperationReport drop column PersonNum +alter table Environmental_OperationReport drop column TotalAssets +alter table Environmental_OperationReport drop column TotalValue +alter table Environmental_OperationReport drop column NewInvestment +GO + +CREATE TABLE [dbo].[Environmental_OperationReportItem]( + [BusinessReportItemId] [nvarchar](50) NOT NULL, + [BusinessReportId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Code] [nvarchar](50) NULL, + [UnitLevel] [nvarchar](50) NULL, + [CreateDate] [datetime] NULL, + [Place] [nvarchar](200) NULL, + [PersonNum] [int] NULL, + [TotalAssets] [decimal](18, 4) NULL, + [TotalValue] [decimal](18, 4) NULL, + [NewInvestment] [decimal](18, 4) NULL, + [UnitName] [nvarchar](200) NULL, + [SortUnitName] [nvarchar](200) NULL, + CONSTRAINT [PK_Environmental_OperationReportItem] PRIMARY KEY CLUSTERED +( + [BusinessReportItemId] 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].[Environmental_OperationReportItem] WITH CHECK ADD CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport] FOREIGN KEY([BusinessReportId]) +REFERENCES [dbo].[Environmental_OperationReport] ([BusinessReportId]) +GO + +ALTER TABLE [dbo].[Environmental_OperationReportItem] CHECK CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵܻҵҵ;Ӫϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_OperationReportItem' +GO + +update sys_menu set IsUsed=0 where menuid='EFA6E45F-1267-4804-BEE7-41E0C5461204'; \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2024-10-30-gaofei.sql b/DataBase/版本日志/SGGLDB_V2024-10-30-gaofei.sql new file mode 100644 index 00000000..22622d88 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-10-30-gaofei.sql @@ -0,0 +1,6 @@ +--Ϊ˵λ +alter table Environmental_EnergyReportItem +add SortUnit int NULL; +GO +update Environmental_EnergyReportItem set SortUnit=1 where EnergyReportId='template'; +GO diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 089d28d7..d3891e8f 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -889,183 +889,6 @@ } #endregion - #region 中央企业环保产业企业基本情况和经营情况汇总表 - - public static string UpOperationReport(string businessReportId, Model.Person_Persons CurrUser) - { - string code = "0"; - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try - { - var upReport = from x in db.Environmental_OperationReport - where x.BusinessReportId == businessReportId - select new Model.OperationReportDto - { - BusinessReportId = x.BusinessReportId, - UnitId = x.UnitId, - Year = x.Year, - Quarters = x.Quarters, - Code = x.Code, - UnitLevel = x.UnitLevel, - CreateDate = x.CreateDate, - Place = x.Place, - PersonNum = x.PersonNum, - TotalAssets = x.TotalAssets, - TotalValue = x.TotalValue, - NewInvestment = x.NewInvestment, - FillingMan = x.FillingMan, - FillingDate = x.FillingDate, - StatisticsDutyPerson = x.StatisticsDutyPerson, - UnitDutyPerson = x.UnitDutyPerson, - Remark = x.Remark - }; - - //新接口Api - code = UpApiOperationReport(upReport).ToString(); - if (code == "1") - { - var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId); - if (report != null) - { - report.UpState = BLL.Const.UpState_3; - db.SubmitChanges(); - } - LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); - } - else - { - LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); - } - } - catch (Exception ex) - { - ErrLogInfo.WriteLog("【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器", ex); - LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); - } - return code; - } - - } - - private static int UpApiOperationReport(IQueryable upReport) - { - string baseurl = "/api/InformationData/SaveOperationReport"; - var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); - var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); - return responeData.code; - } - - - #endregion - - #region 中央企业节能环保产业企业生产和服务业务情况报表上报 - /// - /// 中央企业节能环保产业企业生产和服务业务情况报表上报 - /// - public static string UpEnergyReport(string energyReportId, Model.Person_Persons CurrUser) - { - string code = "0"; - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - try - { - - var upReport = from x in db.Environmental_EnergyReport - where x.EnergyReportId == energyReportId - select new Model.EnergyReport - { - EnergyReportId = x.EnergyReportId, - UnitId = x.UnitId, - Year = x.Year, - Quarters = x.Quarters, - FillingMan = x.FillingMan, - FillingDate = x.FillingDate, - DutyPerson = x.DutyPerson, - - }; - - var upReportItem = from x in db.Environmental_EnergyReportItem - where x.EnergyReportId == energyReportId - select new Model.EnergyReportItem - { - EnergyReportItemId = x.EnergyReportItemId, - EnergyReportId = x.EnergyReportId, - SortIndex = x.SortIndex, - BusinessCategory = x.BusinessCategory, - Throughput_BasePeriod = x.Throughput_BasePeriod, - Throughput_LastPeriod = x.Throughput_LastPeriod, - Throughput_ThisPeriod = x.Throughput_ThisPeriod, - Throughput_UnitOfMeasurement = x.Throughput_UnitOfMeasurement, - Yield_BasePeriod = x.Yield_BasePeriod, - Yield_LastPeriod = x.Yield_LastPeriod, - Yield_ThisPeriod = x.Yield_ThisPeriod, - Yield_UnitOfMeasurement = x.Yield_UnitOfMeasurement, - OutputValue_BasePeriod = x.OutputValue_BasePeriod, - OutputValue_LastYear = x.OutputValue_LastYear, - OutputValue_ThisYear = x.OutputValue_ThisYear, - OperationScale_BasePeriod = x.OperationScale_BasePeriod, - OperationScale_LastYear = x.OperationScale_LastYear, - OperationScale_ThisYear = x.OperationScale_ThisYear, - OperationScale_UnitOfMeasurement = x.OperationScale_UnitOfMeasurement, - ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod, - ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear, - ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear, - }; - - //老接口Serveice - //var getR = hsseC.DataInsertInformation_ChemicalReportTable(upReport.ToList(), upReportItem.ToList()); - //新接口Api - code = UpApiEnergyReport(upReport, upReportItem).ToString(); - if (code == "1") - { - foreach (var item in upReport.Select(p => p.EnergyReportId)) - { - var report = db.Environmental_EnergyReport.FirstOrDefault(e => e.EnergyReportId == item); - if (report != null) - { - report.UpState = BLL.Const.UpState_3; - db.SubmitChanges(); - ////更新 当前人要处理的意见 - //ProjectDataFlowSetService.CloseFlowOperate(Const.ChemicalReportMenuId, item, string.Empty); - // //更新催报信息 - //UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString()); - } - } - LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); - } - else - { - LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); - } - } - catch (Exception ex) - { - ErrLogInfo.WriteLog("【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器", ex); - LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); - } - return code; - } - } - /// - /// UpApiChemicalReportApi调用 - /// - /// 主表 - /// 明细表 - /// - private static int UpApiEnergyReport(IQueryable upReport, IQueryable upReportItem) - { - string baseurl = "/api/InformationData/SaveEnergyReport"; - //合并 - //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); - var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); - var resultJsonReportItem = JsonConvert.SerializeObject(new { EnergyReportItem = upReportItem }); - resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}"; - var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); - return responeData.code; - } - #endregion - #region 建筑行业能源节约与生态环境保护汇总表上报 /// /// 建筑行业能源节约与生态环境保护汇总表上报 @@ -1158,8 +981,209 @@ } #endregion + #region 中央企业环保产业企业基本情况和经营情况汇总表 + private static List getreportItemList(string BusinessReportId) + { + return Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == BusinessReportId) + .OrderBy(x => x.SortIndex).OrderBy(x => x.SortUnitName).Select(x => new Model.reportItemListDto() + { + BusinessReportItemId = x.BusinessReportItemId, + BusinessReportId = x.BusinessReportId, + SortIndex = x.SortIndex, + Code = x.Code, + UnitLevel = x.UnitLevel, + CreateDate = x.CreateDate, + Place = x.Place, + PersonNum = x.PersonNum, + TotalAssets = x.TotalAssets, + TotalValue = x.TotalValue, + NewInvestment = x.NewInvestment, + UnitName = x.UnitName, + SortUnitName = x.SortUnitName + }).ToList(); + } + public static string UpOperationReport(string businessReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Environmental_OperationReport + where x.BusinessReportId == businessReportId + select new Model.Environmental_OperationReportDto + { + BusinessReportId = x.BusinessReportId, + UnitId = x.UnitId, + Year = x.Year, + Quarters = x.Quarters, + FillingMan = x.FillingMan, + FillingDate = x.FillingDate, + StatisticsDutyPerson = x.StatisticsDutyPerson, + UnitDutyPerson = x.UnitDutyPerson, + Remark = x.Remark, + reportItemList = getreportItemList(x.BusinessReportId) + }; + + //新接口Api + code = UpApiOperationReportNew(upReport).ToString(); + if (code == "1") + { + var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + } + LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业环保产业企业基本情况和经营情况汇总表】上传到服务器失败;", null, BLL.Const.OperationReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + + } + + #region 上报中央企业环保产业企业基本情况和经营情况季表 + private static int UpApiOperationReport(IQueryable upReport) + { + string baseurl = "/api/InformationData/SaveOperationReport"; + var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); + return responeData.code; + } + + private static int UpApiOperationReportNew(IQueryable upReport) + { + string baseurl = "/api/InformationData/SaveOperationReportNew"; + var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); + return responeData.code; + } + + + #endregion + + #endregion + + #region 中央企业节能环保产业企业生产和服务业务情况报表上报 + /// + /// 中央企业节能环保产业企业生产和服务业务情况报表上报 + /// + public static string UpEnergyReport(string energyReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + + var upReport = from x in db.Environmental_EnergyReport + where x.EnergyReportId == energyReportId + select new Model.EnergyReport + { + EnergyReportId = x.EnergyReportId, + UnitId = x.UnitId, + Year = x.Year, + Quarters = x.Quarters, + FillingMan = x.FillingMan, + FillingDate = x.FillingDate, + DutyPerson = x.DutyPerson, + + }; + + var upReportItem = from x in db.Environmental_EnergyReportItem + where x.EnergyReportId == energyReportId + select new Model.EnergyReportItem + { + EnergyReportItemId = x.EnergyReportItemId, + EnergyReportId = x.EnergyReportId, + SortIndex = x.SortIndex, + BusinessCategory = x.BusinessCategory, + Throughput_BasePeriod = x.Throughput_BasePeriod, + Throughput_LastPeriod = x.Throughput_LastPeriod, + Throughput_ThisPeriod = x.Throughput_ThisPeriod, + Throughput_UnitOfMeasurement = x.Throughput_UnitOfMeasurement, + Yield_BasePeriod = x.Yield_BasePeriod, + Yield_LastPeriod = x.Yield_LastPeriod, + Yield_ThisPeriod = x.Yield_ThisPeriod, + Yield_UnitOfMeasurement = x.Yield_UnitOfMeasurement, + OutputValue_BasePeriod = x.OutputValue_BasePeriod, + OutputValue_LastYear = x.OutputValue_LastYear, + OutputValue_ThisYear = x.OutputValue_ThisYear, + OperationScale_BasePeriod = x.OperationScale_BasePeriod, + OperationScale_LastYear = x.OperationScale_LastYear, + OperationScale_ThisYear = x.OperationScale_ThisYear, + OperationScale_UnitOfMeasurement = x.OperationScale_UnitOfMeasurement, + ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod, + ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear, + ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear, + SortUnit = x.SortUnit + }; + + //老接口Serveice + //var getR = hsseC.DataInsertInformation_ChemicalReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiEnergyReport(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.EnergyReportId)) + { + var report = db.Environmental_EnergyReport.FirstOrDefault(e => e.EnergyReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + //ProjectDataFlowSetService.CloseFlowOperate(Const.ChemicalReportMenuId, item, string.Empty); + // //更新催报信息 + //UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业节能环保产业企业生产和服务业务情况报表上报】上传到服务器失败;", null, BLL.Const.EnergyReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + } + /// + /// UpApiChemicalReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiEnergyReport(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveEnergyReport"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJsonReportItem = JsonConvert.SerializeObject(new { EnergyReportItem = upReportItem }); + resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); + return responeData.code; + } + #endregion + #region 安全管理工作总结报告 /// /// 安全管理工作总结报告 diff --git a/SGGL/BLL/ZHGL/DataSync/ServerService.cs b/SGGL/BLL/ZHGL/DataSync/ServerService.cs index ec2caa03..bcde99ae 100644 --- a/SGGL/BLL/ZHGL/DataSync/ServerService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ServerService.cs @@ -63,13 +63,8 @@ namespace BLL IRestResponse response = client.Execute(request); APICommonService.SaveSysHttpLog("api_Out", baseurl, response.Content); var returnData = JsonConvert.DeserializeObject(response.Content.ToString()); - if (returnData.code == 0) - { - responeData.code = 0; - responeData.message = returnData.message; - return responeData; - - } + responeData.code = returnData.code; + responeData.message = returnData.message; return responeData; } public static Model.TokenItem GetToken() diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs index 0f709d3a..24554f61 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyReportService.cs @@ -142,7 +142,7 @@ namespace BLL } public static void DeleteEnvironmental_EnergyReportById(string EnergyReportId) { - + Model.SGGLDB db = Funs.DB; Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId); if (table != null) { diff --git a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs index c08460be..faf399be 100644 --- a/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs +++ b/SGGL/BLL/ZHGL/Environmental/EnergyreportItemService .cs @@ -99,7 +99,7 @@ namespace BLL { return (from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId - orderby x.SortIndex + orderby x.SortIndex,x.SortUnit select x).ToList(); } @@ -141,38 +141,39 @@ namespace BLL { var q = (from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId - orderby x.SortIndex + orderby x.SortIndex,x.SortUnit select x).ToList(); - List newItems = new List(); - foreach (var item in q) - { - Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem(); + //List newItems = new List(); + //foreach (var item in q) + //{ + // Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem(); - newItem.EnergyReportItemId = item.EnergyReportItemId; - newItem.EnergyReportId = item.EnergyReportId; - newItem.SortIndex = item.SortIndex; - newItem.BusinessCategory = item.BusinessCategory; - newItem.Throughput_BasePeriod = item.Throughput_BasePeriod; - newItem.Throughput_LastPeriod = item.Throughput_LastPeriod; - newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod; - newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement; - newItem.Yield_BasePeriod = item.Yield_BasePeriod; - newItem.Yield_LastPeriod = item.Yield_LastPeriod; - newItem.Yield_ThisPeriod = item.Yield_ThisPeriod; - newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement; - newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod; - newItem.OutputValue_LastYear = item.OutputValue_LastYear; - newItem.OutputValue_ThisYear = item.OutputValue_ThisYear; - newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod; - newItem.OperationScale_LastYear = item.OperationScale_LastYear; - newItem.OperationScale_ThisYear = item.OperationScale_ThisYear; - newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement; - newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod; - newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear; - newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear; - newItems.Add(newItem); - } - return newItems; + // newItem.EnergyReportItemId = item.EnergyReportItemId; + // newItem.EnergyReportId = item.EnergyReportId; + // newItem.SortIndex = item.SortIndex; + // newItem.BusinessCategory = item.BusinessCategory; + // newItem.Throughput_BasePeriod = item.Throughput_BasePeriod; + // newItem.Throughput_LastPeriod = item.Throughput_LastPeriod; + // newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod; + // newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement; + // newItem.Yield_BasePeriod = item.Yield_BasePeriod; + // newItem.Yield_LastPeriod = item.Yield_LastPeriod; + // newItem.Yield_ThisPeriod = item.Yield_ThisPeriod; + // newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement; + // newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod; + // newItem.OutputValue_LastYear = item.OutputValue_LastYear; + // newItem.OutputValue_ThisYear = item.OutputValue_ThisYear; + // newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod; + // newItem.OperationScale_LastYear = item.OperationScale_LastYear; + // newItem.OperationScale_ThisYear = item.OperationScale_ThisYear; + // newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement; + // newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod; + // newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear; + // newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear; + + // newItems.Add(newItem); + //} + return q; } public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable) { @@ -268,11 +269,12 @@ namespace BLL } public static void DeleteEnergyReportItemByChemicalReportId(string EnergyReportId) { + Model.SGGLDB db = Funs.DB; var q = from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId select x; if (q != null) { - Funs.DB.Environmental_EnergyReportItem.DeleteAllOnSubmit(q); - Funs.DB.SubmitChanges(); + db.Environmental_EnergyReportItem.DeleteAllOnSubmit(q); + db.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs index 0d5235c3..cdb9f0e6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs @@ -1093,11 +1093,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[0].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 != 0) { this.Grid1.Rows[14].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 != 0) { this.Grid1.Rows[14].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F20, 4); } @@ -1105,11 +1105,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 != 0) { this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 != 0) { this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4); } @@ -1117,11 +1117,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 != 0) { this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 != 0) { this.Grid1.Rows[18].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F24, 4); } @@ -1129,11 +1129,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 != 0) { this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 != 0) { this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4); } @@ -1141,11 +1141,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 != 0) { this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 != 0) { this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4); } @@ -1153,11 +1153,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 != 0) { this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 > 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 != 0) { this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4); } @@ -1165,11 +1165,11 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%"; } - if (E64 > 0 && E65 > 0 && E20 > 0) + if (E64 != 0 && E65 != 0 && E20 != 0) { this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4); } - if (F64 > 0 && F65 > 0 && F20 > 0) + if (F64 != 0 && F65 != 0 && F20 != 0) { this.Grid1.Rows[58].Values[5] = decimal.Round((F64 + F65) / F20, 4); } @@ -1265,6 +1265,10 @@ namespace FineUIPro.Web.ZHGL.Environmental PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); return; } + else if (code=="3") + { + Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error); + } else { Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); @@ -1280,26 +1284,26 @@ namespace FineUIPro.Web.ZHGL.Environmental protected void btnSave_Click(object sender, EventArgs e) { - //bool isEmpty = false; - //foreach (JObject mergedRow in Grid1.GetMergedData()) - //{ - // JObject values = mergedRow.Value("values"); - // int rowIndex = mergedRow.Value("index"); - // string sortIndex = values.Value("SortIndex"); - // if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") - // { - // if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) - // { - // isEmpty = true; - // break; - // } - // } - //} - //if (isEmpty) - //{ - // ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); - // return; - //} + /* bool isEmpty = false; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int rowIndex = mergedRow.Value("index"); + string sortIndex = values.Value("SortIndex"); + if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") + { + if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) + { + isEmpty = true; + break; + } + } + } + if (isEmpty) + { + ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); + return; + }*/ Save("add"); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); @@ -1332,26 +1336,26 @@ namespace FineUIPro.Web.ZHGL.Environmental protected void btnSubmit_Click(object sender, EventArgs e) { - //bool isEmpty = false; - //foreach (JObject mergedRow in Grid1.GetMergedData()) - //{ - // JObject values = mergedRow.Value("values"); - // int rowIndex = mergedRow.Value("index"); - // string sortIndex = values.Value("SortIndex"); - // if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") - // { - // if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) - // { - // isEmpty = true; - // break; - // } - // } - //} - //if (isEmpty) - //{ - // ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); - // return; - //} + bool isEmpty = false; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int rowIndex = mergedRow.Value("index"); + string sortIndex = values.Value("SortIndex"); + if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38") + { + if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) + { + isEmpty = true; + break; + } + } + } + if (isEmpty) + { + ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); + return; + } Save("submit"); } #endregion diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs index 457f4f63..82697f8b 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ChemicalReportSave.aspx.cs @@ -1887,6 +1887,10 @@ namespace FineUIPro.Web.ZHGL.Environmental PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); return; } + else if (code == "3") + { + Alert.ShowInParent("集团当前季度数据已锁定,无法上传!", MessageBoxIcon.Error); + } else { Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); @@ -1902,26 +1906,26 @@ namespace FineUIPro.Web.ZHGL.Environmental protected void btnSave_Click(object sender, EventArgs e) { - //bool isEmpty = false; - //foreach (JObject mergedRow in Grid1.GetMergedData()) - //{ - // JObject values = mergedRow.Value("values"); - // int rowIndex = mergedRow.Value("index"); - // string sortIndex = values.Value("SortIndex"); - // if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70") - // { - // if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) - // { - // isEmpty = true; - // break; - // } - // } - //} - //if (isEmpty) - //{ - // ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); - // return; - //} + bool isEmpty = false; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int rowIndex = mergedRow.Value("index"); + string sortIndex = values.Value("SortIndex"); + if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70") + { + if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) + { + isEmpty = true; + break; + } + } + } + if (isEmpty) + { + ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); + return; + } Save("add"); ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); @@ -1954,26 +1958,26 @@ namespace FineUIPro.Web.ZHGL.Environmental protected void btnSubmit_Click(object sender, EventArgs e) { - //bool isEmpty = false; - //foreach (JObject mergedRow in Grid1.GetMergedData()) - //{ - // JObject values = mergedRow.Value("values"); - // int rowIndex = mergedRow.Value("index"); - // string sortIndex = values.Value("SortIndex"); - // if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70") - // { - // if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) - // { - // isEmpty = true; - // break; - // } - // } - //} - //if (isEmpty) - //{ - // ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); - // return; - //} + bool isEmpty = false; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int rowIndex = mergedRow.Value("index"); + string sortIndex = values.Value("SortIndex"); + if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70") + { + if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value("ThisYearValue"))) == 0) + { + isEmpty = true; + break; + } + } + } + if (isEmpty) + { + ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning); + return; + } Save("submit"); } #endregion diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx index d84c07bb..3542c4d8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx @@ -161,6 +161,8 @@ diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs index c315576c..b267f225 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReport.aspx.cs @@ -86,35 +86,35 @@ namespace FineUIPro.Web.ZHGL.Environmental var businessCategorys = EnergyreportItemService.GetItems("Template"); //之前月度合计值集合 List reportItems = BLL.EnergyreportItemService.GetItems(report.EnergyReportId); - List newItemList = new List(); - foreach (var item in reportItems) - { - Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem(); - newItem.EnergyReportItemId = item.EnergyReportItemId; - newItem.EnergyReportId = item.EnergyReportId; - newItem.SortIndex = item.SortIndex; - newItem.BusinessCategory = item.BusinessCategory; - newItem.Throughput_BasePeriod = item.Throughput_BasePeriod; - newItem.Throughput_LastPeriod = item.Throughput_LastPeriod; - newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod; - newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement; - newItem.Yield_BasePeriod = item.Yield_BasePeriod; - newItem.Yield_LastPeriod = item.Yield_LastPeriod; - newItem.Yield_ThisPeriod = item.Yield_ThisPeriod; - newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement; - newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod; - newItem.OutputValue_LastYear = item.OutputValue_LastYear; - newItem.OutputValue_ThisYear = item.OutputValue_ThisYear; - newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod; - newItem.OperationScale_LastYear = item.OperationScale_LastYear; - newItem.OperationScale_ThisYear = item.OperationScale_ThisYear; - newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement; - newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod; - newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear; - newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear; - newItemList.Add(item); - } - Grid1.DataSource = newItemList; + //List newItemList = new List(); + //foreach (var item in reportItems) + //{ + // Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem(); + // newItem.EnergyReportItemId = item.EnergyReportItemId; + // newItem.EnergyReportId = item.EnergyReportId; + // newItem.SortIndex = item.SortIndex; + // newItem.BusinessCategory = item.BusinessCategory; + // newItem.Throughput_BasePeriod = item.Throughput_BasePeriod; + // newItem.Throughput_LastPeriod = item.Throughput_LastPeriod; + // newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod; + // newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement; + // newItem.Yield_BasePeriod = item.Yield_BasePeriod; + // newItem.Yield_LastPeriod = item.Yield_LastPeriod; + // newItem.Yield_ThisPeriod = item.Yield_ThisPeriod; + // newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement; + // newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod; + // newItem.OutputValue_LastYear = item.OutputValue_LastYear; + // newItem.OutputValue_ThisYear = item.OutputValue_ThisYear; + // newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod; + // newItem.OperationScale_LastYear = item.OperationScale_LastYear; + // newItem.OperationScale_ThisYear = item.OperationScale_ThisYear; + // newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement; + // newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod; + // newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear; + // newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear; + // newItemList.Add(item); + //} + Grid1.DataSource = reportItems; Grid1.DataBind(); } else @@ -201,7 +201,7 @@ namespace FineUIPro.Web.ZHGL.Environmental if (getReport != null) { this.btnNew.Hidden = true; - //if (getReport.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + //if (getReport.HandleMan == this.CurrUser.UserId) //当前人是下一步办理入 //{ // if (getReport.HandleState == BLL.Const.HandleState_2) // { diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx index 7c96db24..748535a4 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/EnergyReportSave.aspx @@ -48,8 +48,9 @@ + EnableHeaderMenu="false" Height="700px"> + @@ -191,6 +192,12 @@ + + + + @@ -209,7 +216,7 @@ ValidateForms="SimpleForm1" OnClick="btnCopy_Click" Hidden="true"> --%> -