duheng
2024-12-11 32abbbecf79bd804dc28034bdc79d20b50bb4b89
Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
已重命名4个文件
已添加5个文件
1442 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/00-core/SimulationAsposeWordHelper.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/00-core/SimulationWordReportHelper.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/01-view/ReportViewModel.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/01-view/SimulationWorkingReportViewModel.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportInfoItemViewModel.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportPumpItemViewModel.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportWorkingItemViewModel.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWordReport.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs 1284 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/00-core/SimulationAsposeWordHelper.cs
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/00-core/SimulationWordReportHelper.cs
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/01-view/ReportViewModel.cs
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/01-view/SimulationWorkingReportViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HStation.WinFrmUI
{
    /// <summary>
    /// æ¨¡æ‹Ÿå·¥å†µæŠ¥å‘ŠViewModel
    /// </summary>
    public class SimulationWorkingReportViewModel
    {
        /// <summary>
        /// æŠ¥å‘Šç±»åž‹
        /// </summary>
        public string ReportType { get; set; }
        /// <summary>
        /// åŸºæœ¬ä¿¡æ¯
        /// </summary>
        public SimulationReportInfoItemViewModel Info { get; set; }
        /// <summary>
        /// æ°´æ³µåˆ—表
        /// </summary>
        public List<SimulationReportPumpItemViewModel> Pumps { get; set; }
        /// <summary>
        /// å·¥å†µä¿¡æ¯
        /// </summary>
        public SimulationReportWorkingItemViewModel Working { get; set; }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportInfoItemViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HStation.WinFrmUI
{
    /// <summary>
    /// æŠ¥å‘ŠåŸºæœ¬ä¿¡æ¯
    /// </summary>
    public class SimulationReportInfoItemViewModel
    {
        /// <summary>
        /// åç§°
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// è¯´æ˜Ž
        /// </summary>
        public string Description { get; set; }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportPumpItemViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HStation.WinFrmUI
{
    /// <summary>
    /// æ°´æ³µä¿¡æ¯é¡¹ViewModel
    /// </summary>
    public class SimulationReportPumpItemViewModel
    {
        /// <summary>
        /// åç§°
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// åºåˆ—号
        /// </summary>
        public string SerialNO { get; set; }
        /// <summary>
        /// åž‹å·
        /// </summary>
        public string ModelType { get; set; }
        /// <summary>
        /// é¢å®šæµé‡
        /// </summary>
        public string RatedQ { get; set; }
        /// <summary>
        /// é¢å®šæ‰¬ç¨‹
        /// </summary>
        public string RatedH { get; set; }
        /// <summary>
        /// é¢å®šåŠŸçŽ‡
        /// </summary>
        public string RatedP { get; set; }
        /// <summary>
        /// é¢å®šæ•ˆçއ
        /// </summary>
        public string RatedE { get; set; }
        /// <summary>
        /// é¢å®šè½¬é€Ÿ
        /// </summary>
        public string RatedN { get; set; }
        /// <summary>
        /// é¢å®šç”µåŽ‹
        /// </summary>
        public string RatedU { get; set; }
        /// <summary>
        /// é¢å®šç”µæµ
        /// </summary>
        public string RatedI { get; set; }
        /// <summary>
        /// é¢å®šå› æ•°
        /// </summary>
        public string RatedF { get; set; }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/01-viewmodel/02-item/SimulationReportWorkingItemViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HStation.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public class SimulationReportWorkingItemViewModel
    {
        /// <summary>
        /// åç§°
        /// </summary>
        public string Name { get; set; }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWordReport.cs
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportHelper.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1284 @@
using Aspose.Words;
using Aspose.Words.Layout;
using Aspose.Words.Tables;
namespace HStation.WinFrmUI
{
    /// <summary>
    /// å·¥å†µæŠ¥å‘Šè¾…助类
    /// </summary>
    public class SimulationWorkingReportHelper
    {
        //文字描述运行模式介绍    äºŒï¼‰è¿è¡Œæƒ…况与能耗分析中 "全年:"后
        private string _run_mode = "*******************************************************************";
        //运行时间计算方式  äºŒï¼‰è¿è¡Œæƒ…况与能耗分析中  â€œå¹´å¹³å‡è¿è¡Œæ—¶é—´æŒ‰ï¼šâ€åŽ
        private string _avg_runtime_mode = "**************************";
        //按_Company_1公司循环水系统平均运行***小时    å››ï¼‰é¡¹ç›®èŠ‚ç”µæ•ˆç›Šåˆ†æžä¸­
        private string _Company_1 = "****************";
        //按****公司循环水系统平均运行_Avg_Hour小时    å››ï¼‰é¡¹ç›®èŠ‚ç”µæ•ˆç›Šåˆ†æžä¸­
        private string _Avg_Hour = "*******";
        //系统年节电量=_Electricity=******(万度)    å››ï¼‰é¡¹ç›®èŠ‚ç”µæ•ˆç›Šåˆ†æžä¸­
        private string _Electricity = "*******";
        //系统年节电量=******=_Electricity_kWh(万度)    å››ï¼‰é¡¹ç›®èŠ‚ç”µæ•ˆç›Šåˆ†æžä¸­
        private string _Electricity_kWh = "*******";
        //本案是在科维公司技术人员于_Time对***水系统进行详细调查     äº”)综述中
        private DateTime _Time = DateTime.Today;
        //本案是在科维公司技术人员于******对_System水系统进行详细调查     äº”)综述中
        private string _System = "***********";
        //通过技改节电效果如下(按年运行_Hour小时计):     äº”)综述中
        private string _Hour = "*******";
        //  éžå¸¸æ„Ÿè°¢_Company_2公司各部门领导对节能工作的重视和支持 äº”)综述中 æœ€åŽè¡¨æ„Ÿè°¢çš„部分
        private string _Company_2 = "****************";
        //非常感谢_Company_3公司技术人员对检测工作的大力配合,并提供宝贵资料及系统情况     äº”)综述中 æœ€åŽè¡¨æ„Ÿè°¢çš„部分
        private string _Company_3 = "****************";
        //报告结尾 æ—¶é—´å¹´
        private int _Year = DateTime.Today.Year;
        //报告结尾 æ—¶é—´æœˆ
        private int _month = DateTime.Today.Month;
        /// <summary>
        /// åˆ›å»ºword
        /// </summary>
        public bool Create(string strFilePath, SimulationWorkingReportViewModel reportViewModel)
        {
            MemoryStream stream = Create4Stream(reportViewModel);
            if (stream != null)
            {
                var data_bytes = stream.ToArray();
                using (var fileStream = new System.IO.FileStream(strFilePath, FileMode.OpenOrCreate))
                {
                    fileStream.Write(data_bytes, 0, data_bytes.Length);
                    fileStream.Close();
                }
                stream.Dispose();
            }
            return true;
        }
        protected MemoryStream Create4Stream(SimulationWorkingReportViewModel reportViewModel)
        {
            Document doc = new Document();
            CreatePage(doc, reportViewModel);
            doc.RemoveChild(doc.FirstSection);//删除第一页空白
            MemoryStream strem = new MemoryStream();
            doc.Save(strem, Aspose.Words.SaveFormat.Doc);
            return strem;
        }
        protected void SetWordHander(Aspose.Words.Document doc, string title, string reportType)
        {
            DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
            builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary);
            SimulationWordReportHelper Text_center_10_Gray = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Right, fontsize = 10, fontcolor = Color.Gray };
            Text_center_10_Gray.structureText(string.Format("{0}{1}", title, reportType));
            builder.InsertHorizontalRule();
            // ç§»åŠ¨åˆ°ä¸‹ä¸€è¡Œï¼Œä»¥ä¾¿ç»§ç»­æ·»åŠ å…¶ä»–å†…å®¹
            builder.MoveToDocumentStart();
        }
        protected void SetWordFooter(Aspose.Words.Document doc, string title, string reportType)
        {
            DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
            builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
            SimulationWordReportHelper Text_center_10_Gray = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Left, fontsize = 10, fontcolor = Color.Gray };
            builder.InsertHorizontalRule();
            Text_center_10_Gray.structureText(string.Format("{0}{1}", title, reportType));
            // ç§»åŠ¨åˆ°ä¸‹ä¸€è¡Œï¼Œä»¥ä¾¿ç»§ç»­æ·»åŠ å…¶ä»–å†…å®¹
            builder.MoveToDocumentStart();
        }
        //正文
        private void CreatePage(Document doc, SimulationWorkingReportViewModel vm)
        {
            Aspose.Words.Document src = new Aspose.Words.Document();
            Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(src);
            builder.SetSheet(Aspose.Words.Orientation.Portrait);
            SimulationWordReportHelper Text_center_25_black = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Center, fontsize = 25, isblod = true };//主标题
            SimulationWordReportHelper Text_left_15_black = new SimulationWordReportHelper(builder) { fontsize = 15, isblod = true };//一级标题
            SimulationWordReportHelper Text_left_12_black = new SimulationWordReportHelper(builder) { fontsize = 12 };
            SimulationWordReportHelper Text_reight_10_black = new SimulationWordReportHelper(builder) { fontalignment = ParagraphAlignment.Right, fontsize = 12 };
            SetWordHander(src, vm.Info.Name, vm.ReportType);
            SetWordFooter(src, vm.Info.Name, vm.ReportType);
            builder.ParagraphFormat.LineSpacingRule = LineSpacingRule.Multiple;
            builder.ParagraphFormat.LineSpacing = 18; // è®¾ç½®è¡Œè·ä¸º1.5倍默认行距
            SimulationWordReportHelper Cell = new SimulationWordReportHelper(builder) { };
            //合并
            SimulationWordReportHelper Cell_v_merging_start = new SimulationWordReportHelper(builder) { verticalMerge = Aspose.Words.Tables.CellMerge.First };
            SimulationWordReportHelper Cell_v_merging_end = new SimulationWordReportHelper(builder) { verticalMerge = Aspose.Words.Tables.CellMerge.Previous };
            SimulationWordReportHelper Cell_h_merging_start = new SimulationWordReportHelper(builder) { horizontalMerge = Aspose.Words.Tables.CellMerge.First };
            SimulationWordReportHelper Cell_h_merging_end = new SimulationWordReportHelper(builder) { horizontalMerge = Aspose.Words.Tables.CellMerge.Previous };
            Text_center_25_black.structureText(string.Format("{0}{1}", vm.Info.Name, vm.ReportType));
            Text_left_15_black.structureText("一、系统概述");
            Text_left_15_black.AddBlankLine();
            Text_left_15_black.AddBlankLine();
            Text_left_12_black.structureText(string.Format("{0}", vm.Info.Description));
            Text_left_12_black.structureText("1.1、设备基本配置");
            #region è®¾åˆ«åŸºæœ¬é…ç½®è¡¨
            var basic_config_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell_v_merging_start.structureCell("设备型号");
            Cell.structureCell("额定流量");
            Cell.structureCell("额定扬程");
            Cell_v_merging_start.structureCell("驱动方式");
            Cell.structureCell("额定电压");
            Cell.structureCell("额定电流");
            Cell.structureCell("额定功率");
            Cell.structureCell("额定因数");
            Cell.structureCell("转速  ");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("Q(m³/ h)");
            Cell.structureCell("H(m)");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("U(kV)");
            Cell.structureCell("I(A)");
            Cell.structureCell("P(kW)");
            Cell.structureCell("cosφ");
            Cell.structureCell("r/m  ");
            builder.EndRow();
            //if (vm.Pumps != null)
            //{
            //    foreach (var item in vm.Equipments)
            //    {
            //        Cell.structureCell(item.EquipmentName);
            //        Cell.structureCell(item.EquipmentNumber);
            //        Cell.structureCell(item.EquipmentMainName);
            //        Cell.structureCell(item.RatedFlow);
            //        Cell.structureCell(item.RatedHead);
            //        Cell.structureCell(item.TypeOfDrive);
            //        Cell.structureCell("电机驱动");
            //        Cell.structureCell(item.RatedCurrent);
            //        Cell.structureCell(item.RatedPower);
            //        Cell.structureCell(item.RatedFactor);
            //        Cell.structureCell(item.Speed);
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
            }
            builder.EndTable();
            basic_config_table.AllowAutoFit = false;
            Processing_pagination(src, builder, basic_config_table);
            #endregion è®¾åˆ«åŸºæœ¬é…ç½®è¡¨
            Text_left_12_black.structureLeft20Text("1.2、运行实际情况");
            Text_left_12_black.structureLeft20Text("1.2.1 å¾ªçŽ¯æ°´æ³µç«™è¿è¡ŒçŠ¶å†µ");
            #region å¾ªçŽ¯æ°´æ³µç«™è¿è¡ŒçŠ¶å†µè¡¨
            var pumpingStation_run_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell_h_merging_start.structureCell("æ³µ");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_start.structureCell("电机");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_start.structureCell("母管");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("出口压力标高");
            Cell.structureCell("出口阀开度");
            Cell.structureCell("运行电流");
            Cell.structureCell("功率");
            Cell.structureCell("总管流量");
            Cell.structureCell("供水压力/标高");
            Cell.structureCell("回水压力/标高");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("MPa/m");
            Cell.structureCell("100%");
            Cell.structureCell("A");
            Cell.structureCell("kW");
            Cell.structureCell("m3/h");
            Cell.structureCell("MPa/m");
            Cell.structureCell("MPa/m");
            builder.EndRow();
            //if (vm.PumpStations != null)
            //{
            //    foreach (var item in vm.PumpStations)
            //    {
            //        Cell.structureCell(item.EquipmentName);
            //        Cell.structureCell(item.EquipmentNumber);
            //        Cell.structureCell(item.OutletPressure);
            //        Cell.structureCell(item.OutletValveOpening);
            //        Cell.structureCell(item.RunningCurrent);
            //        Cell.structureCell(item.Power);
            //        Cell.structureCell(item.TotalFlow);
            //        Cell.structureCell(item.SuppyPressure);
            //        Cell.structureCell(item.ReturnPressure);
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
            }
            builder.EndTable();
            pumpingStation_run_table.AllowAutoFit = false;
            Processing_pagination(src, builder, pumpingStation_run_table);
            #endregion å¾ªçŽ¯æ°´æ³µç«™è¿è¡ŒçŠ¶å†µè¡¨
            Text_left_12_black.structureLeft20Text("1.2.2 å†·å´å¡”运行状况");
            #region å†·å´å¡”运行状况表
            var coolingtower_run_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell.structureCell("上塔管径");
            Cell.structureCell("上塔阀开度");
            Cell.structureCell("喷头高度");
            Cell.structureCell("风机电流");
            Cell.structureCell("上塔温度");
            Cell.structureCell("出水温度");
            Cell.structureCell("温差");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("mm");
            Cell.structureCell("%");
            Cell.structureCell("m");
            Cell.structureCell("A");
            Cell.structureCell("℃");
            Cell.structureCell("℃");
            Cell.structureCell("℃");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndTable();
            coolingtower_run_table.AllowAutoFit = false;
            Processing_pagination(src, builder, coolingtower_run_table);
            #endregion å†·å´å¡”运行状况表
            Text_left_12_black.structureLeft20Text("1.2.3 æœ«ç«¯æ¢çƒ­å™¨è¿è¡Œçж况");
            #region æœ«ç«¯æ¢çƒ­å™¨è¿è¡ŒçŠ¶å†µè¡¨
            var end_heatExchanger_run_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell.structureCell("供回水管径");
            Cell.structureCell("供水闸开度");
            Cell.structureCell("供水压力");
            Cell.structureCell("供水温度");
            Cell.structureCell("回水阀开度");
            Cell.structureCell("回水压力");
            Cell.structureCell("回水温度");
            Cell.structureCell("流量");
            Cell.structureCell("压差");
            Cell.structureCell("温差");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("mm");
            Cell.structureCell("%");
            Cell.structureCell("MPa");
            Cell.structureCell("℃");
            Cell.structureCell("%");
            Cell.structureCell("MPa");
            Cell.structureCell("℃");
            Cell.structureCell("m3/h");
            Cell.structureCell("℃");
            Cell.structureCell("℃");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndTable();
            end_heatExchanger_run_table.AllowAutoFit = false;
            Processing_pagination(src, builder, end_heatExchanger_run_table);
            #endregion æœ«ç«¯æ¢çƒ­å™¨è¿è¡ŒçŠ¶å†µè¡¨
            Text_left_15_black.structureText("二)\t运行情况与能耗分析");
            Text_left_12_black.structureLeft20Text("2.1、运行模式及运行时间");
            Text_left_12_black.structureLeft20Text(string.Format("全年:{0}", _run_mode));
            Text_left_12_black.structureLeft20Text(string.Format("年平均运行时间:按{0}", _avg_runtime_mode));
            Text_left_12_black.structureLeft20Text("2.2、运行情况及能耗统计");
            Text_left_12_black.structureLeft20Text("根据实测参数、流体输送工程学复核,本循环水系统目前各种运行方式的实际能耗情况如下表:");
            #region å®žé™…能耗情况表
            var actual_energy_consumption_table = builder.StartTable();
            Cell.SetFont(9);
            Cell.structureCell("项    ç›®");
            Cell_h_merging_start.structureCell("æ°´  æ³µ  å·¥  å†µ");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            builder.EndRow();
            Cell.structureCell("运行模式");
            Cell.structureCell("技改前实耗功率 (kW)");
            Cell.structureCell("年运行时间(h)");
            Cell.structureCell("年耗电量(万kW.h)");
            builder.EndRow();
            double totalPower = 0;
            int totalHour = 0;
            double AnnualPower = 0;
            //if (vm.PowerConsumptionInfos != null)
            //{
            //    foreach (var item in vm.PowerConsumptionInfos)
            //    {
            //        Cell.structureCell(item.RunMode);
            //        Cell.structureCell(item.PreTechPowerConsumption);
            //        if (double.TryParse(item.PreTechPowerConsumption, out double power))
            //        {
            //            totalPower += power;
            //        }
            //        Cell.structureCell(item.AnnualRunningHours);
            //        if (int.TryParse(item.AnnualRunningHours, out int hour))
            //        {
            //            totalHour += hour;
            //        }
            //        Cell.structureCell(item.AnnualPowerConsumption);
            //        if (double.TryParse(item.AnnualPowerConsumption, out double annualPower))
            //        {
            //            AnnualPower += annualPower;
            //        }
            //        builder.EndRow();
            //    }
            //}
            Cell.structureCell("合计");
            if (totalPower != 0)
            {
                Cell.structureCell(totalPower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (totalHour != 0)
            {
                Cell.structureCell(totalHour.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (AnnualPower != 0)
            {
                Cell.structureCell(AnnualPower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            builder.EndTable();
            actual_energy_consumption_table.AllowAutoFit = false;
            Processing_pagination(src, builder, actual_energy_consumption_table);
            #endregion å®žé™…能耗情况表
            Text_left_12_black.structureLeft20Text("2.3、高能耗分析");
            Text_left_12_black.structureLeft20Text("通过对系统运行工况进行检测分析,认为该系统存在 â€œä½Žæ•ˆçŽ‡ã€é«˜èƒ½è€—â€çŽ°è±¡ã€‚ä¸»è¦è¡¨çŽ°åœ¨ä»¥ä¸‹æ–¹é¢ï¼š");
            Text_left_12_black.structureLeft20Text("1)水泵特性与管网特性不相匹配,造成水泵偏离设计工况运行,其实际运行效率下降,造成较多的无效能耗,处于不经济运行状态;而当前循环水工况又并非是系统的最佳状态,优化管网阻抗整合运行参数,将使本系统具有较大的节能空间。");
            Text_left_12_black.structureLeft20Text("2)水泵性能曲线和管网特性曲线不相匹配,在水系统在输送过程中存在闭阀调节阻力,增加了输送过程中的无效能耗,降低水系统的输送效率;需要重新对系统进行建模分析,降低系统阻力,优化水泵扬程。");
            Text_left_12_black.structureLeft20Text("3)缺乏技术手段对换热设备进行量化调节,流量过大存在浪费。通过调试并配置优化,对换热器定量分析,制定换热器运行合理方案,改换热器为定量控制,最终消除无效流量,使系统处在优良状态下运行。");
            Text_left_15_black.structureText("三)\t节能技改方案与设计指标");
            Text_left_12_black.structureLeft20Text("3.1、设计依据");
            Text_left_12_black.structureLeft20Text("3.1.1 å¾ªçŽ¯æ°´æ³µè¿è¡ŒåŠŸçŽ‡ï¼šæ ¹æ®ä¸‰ç›¸å¼‚æ­¥ç”µåŠ¨æœºè¿è¡ŒåŠŸçŽ‡è®¡ç®—å…¬å¼P=√3×U×I×cosφ,也可以按照运行一段时间内电度表有功功率统计得出;");
            Text_left_12_black.structureLeft20Text("3.1.2 æ°´æ³µæ€»åŽ‹åŠ›ï¼ˆæ‰¬ç¨‹ï¼‰è®¡ç®—å…¬å¼ï¼š");
            Text_left_12_black.structureLeft20Text("H=(p出-p进)×102+(出口表高-进口液位高),再考虑进出口流速变化的动能损耗。");
            Text_left_12_black.structureLeft20Text("3.1.3 é€šè¿‡æ°´æ³µæ€§èƒ½æ›²çº¿æ¨¡æ‹Ÿï¼Œæ°´æ³µè¿è¡Œåœ¨ä¸€å®šçš„工况下,其流量Q、扬程H、功率P、效率η相对应;实际性能与标准性能一般差异(主要为效率η指标)");
            Text_left_12_black.structureLeft20Text("3.1.4 ç®¡è·¯ç³»ç»ŸåŽ‹åŠ›é™æ¢ç®—åŸºæœ¬å…¬å¼ï¼ˆi代表单位米长度管道上沿程阻力系数)");
            // æ’入图片
            //  builder.Write("      ");
            Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_big1.2.png", 30, 150);
            //  builder.Write("      ");
            Text_left_12_black.structureTextAndImage("00-core\\Pressure_conversion_formula_small1.2.png", 35, 220);
            Text_left_12_black.structureLeft20Text("3.1.5 å±€éƒ¨é˜»åŠ›è®¡ç®—å…¬å¼");
            //      builder.Write("      ");
            Text_left_12_black.structureTextAndImage("00-core\\Local_resistance.png", 35, 60);
            Text_left_12_black.structureLeft20Text("3.1.6 é˜€é—¨å¼€åº¦ä¸Žå±€éƒ¨é˜»åŠ›ç³»æ•°å…³ç³»ï¼ˆå‚è€ƒï¼‰");
            #region é˜€é—¨å¼€åº¦ä¸Žå±€éƒ¨é˜»åŠ›ç³»æ•°å…³ç³»è¡¨
            var Opening_resistance_table = builder.StartTable();
            Cell.SetFont(9);
            Cell.structureCell("开度α");
            //if (vm.ValveOpens != null)
            //{
            //    foreach (var item in vm.ValveOpens)
            //    {
            //        Cell.structureCell(item.Name);
            //    }
            //    builder.EndRow();
            //    Cell.structureCell("ξ");
            //    foreach (var item in vm.ValveOpens)
            //    {
            //        Cell.structureCell(item.MinorLoss);
            //    }
            //    builder.EndRow();
            //}
            //else
            {
                Cell.structureCell("开度α");
                Cell.structureCell("90");
                Cell.structureCell("80");
                Cell.structureCell("70");
                Cell.structureCell("60");
                Cell.structureCell("55");
                Cell.structureCell("50");
                Cell.structureCell("45");
                Cell.structureCell("40");
                Cell.structureCell("35");
                Cell.structureCell("30");
                Cell.structureCell("25");
                Cell.structureCell("20");
                Cell.structureCell("15");
                Cell.structureCell("10");
                builder.EndRow();
                Cell.structureCell("ξ");
                Cell.structureCell("0.22");
                Cell.structureCell("0.45");
                Cell.structureCell("1.18");
                Cell.structureCell("3.25");
                Cell.structureCell("5.50");
                Cell.structureCell("9.27");
                Cell.structureCell("15.0");
                Cell.structureCell("26.8");
                Cell.structureCell("45.0");
                Cell.structureCell("79.2");
                Cell.structureCell("152");
                Cell.structureCell("332");
                Cell.structureCell("945");
                Cell.structureCell("3620");
            }
            builder.EndTable();
            Opening_resistance_table.AllowAutoFit = false;
            Processing_pagination(src, builder, Opening_resistance_table);
            #endregion é˜€é—¨å¼€åº¦ä¸Žå±€éƒ¨é˜»åŠ›ç³»æ•°å…³ç³»è¡¨
            Text_left_12_black.structureLeft20Text("3.2、设计过程");
            Text_left_12_black.structureLeft20Text("科维公司采用流体输送Go.Well技术对检测数据进行系统分析、研究,结合生产工艺特征,设计本循环水系统过程能量优化解决方案。");
            Text_left_12_black.structureLeft20Text("1)通过分析系统装置热负荷以及工艺特点,按经济供回水温差原则及供水压力与设计压力比较,判断流量的合理性,并确定合理流量,做到“装置侧合理用水、泵站侧高效供水,降低水送能耗指标;");
            Text_left_12_black.structureLeft20Text("2)对换热器及冷却塔的热工性能进行评估,针对性选择提高冷却效果的改造方案,以确保经济供回水温差实现的可行性;");
            Text_left_12_black.structureLeft20Text("3)运用计算机模拟技术分析管网水力节点平衡,得到可实现的最优管网性能曲线,即相应流量下所对应实际需要的最小阻力,降低系统管网阻抗,提高管网运行效率;");
            Text_left_12_black.structureLeft20Text("4)通过对泵站原有各种运行模式的工况分析,判断电机及水泵的实际运行效率是否高效,并结合装置侧所需的技术参数要求,提出最优的泵组搭配运行模式及运行参数,确定高效节能泵参数设计值,做好泵站优化设计;");
            Text_left_12_black.structureLeft20Text("5)借助三元流理论,采用国外最先进的“CFD”仿真模拟技术,通过精确模拟,设计出最优化的水力模型,确保ECOWELL高效泵性能可靠、运行稳定,并确保在各种运行模式下均处于高效运行。");
            Text_left_12_black.structureLeft20Text("3.3、泵站部分节能设计指标与技改方案");
            Text_left_12_black.structureLeft20Text("3.3.1 æŠ€æ”¹åŽè®¾å¤‡é…ç½®æƒ…况");
            Text_left_12_black.AddBlankLine();
            #region è®¾å¤‡é…ç½®æƒ…况表
            var Device_configuration_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell_v_merging_start.structureCell("设备型号");
            Cell_v_merging_start.structureCell("台数");
            Cell.structureCell("额定扬程");
            Cell.structureCell("额定流量");
            Cell_v_merging_start.structureCell("驱动方式");
            Cell.structureCell("额定电压");
            Cell.structureCell("额定电流");
            Cell.structureCell("额定功率");
            Cell.structureCell("功率因数");
            Cell.structureCell("转速");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("H(m)");
            Cell.structureCell("Q(m³/h)");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("U(kV)");
            Cell.structureCell("I(A)");
            Cell.structureCell("P(kW)");
            Cell.structureCell("cosφ");
            Cell.structureCell("r/m");
            builder.EndRow();
            //if (vm.AfterEquipments != null)
            //{
            //    foreach (var item in vm.AfterEquipments)
            //    {
            //        Cell.structureCell(item.EquipmentName);
            //        Cell.structureCell(item.EquipmentNumber);
            //        Cell.structureCell(item.EquipmentMainName);
            //        Cell.structureCell(item.Count);
            //        Cell.structureCell(item.RatedFlow);
            //        Cell.structureCell(item.RatedHead);
            //        Cell.structureCell(item.TypeOfDrive);
            //        Cell.structureCell("电机驱动");
            //        Cell.structureCell(item.RatedCurrent);
            //        Cell.structureCell(item.RatedPower);
            //        Cell.structureCell(item.RatedFactor);
            //        Cell.structureCell(item.Speed);
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
            }
            builder.EndTable();
            Device_configuration_table.AllowAutoFit = false;
            Processing_pagination(src, builder, Device_configuration_table);
            #endregion è®¾å¤‡é…ç½®æƒ…况表
            Text_left_12_black.structureLeft20Text("3.3.2 æŠ€æ”¹åŽè®¾å¤‡é¢„计运行状况");
            #region é¢„计运行状况表
            var estimated_running_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell_h_merging_start.structureCell("æ³µ");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_start.structureCell("电机");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_start.structureCell("母管");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("出口压力标高");
            Cell.structureCell("出口阀开度");
            Cell.structureCell("运行电流");
            Cell.structureCell("功率");
            Cell.structureCell("总管流量");
            Cell.structureCell("供水压力标高");
            Cell.structureCell("回水压力标高");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("MPa/m");
            Cell.structureCell("100%");
            Cell.structureCell("A");
            Cell.structureCell("kW");
            Cell.structureCell("m3/h");
            Cell.structureCell("MPa/m");
            Cell.structureCell("MPa/m");
            builder.EndRow();
            //if (vm.AfterPumpStations != null)
            //{
            //    foreach (var item in vm.AfterPumpStations)
            //    {
            //        Cell.structureCell(item.EquipmentName);
            //        Cell.structureCell(item.EquipmentNumber);
            //        Cell.structureCell(item.OutletPressure);
            //        Cell.structureCell(item.OutletValveOpening);
            //        Cell.structureCell(item.RunningCurrent);
            //        Cell.structureCell(item.Power);
            //        Cell.structureCell(item.TotalFlow);
            //        Cell.structureCell(item.SuppyPressure);
            //        Cell.structureCell(item.ReturnPressure);
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
            }
            builder.EndTable();
            //estimated_running_table.AllowAutoFit = false;
            //builder.ParagraphFormat.KeepWithNext = true;
            //Processing_pagination(src, builder, estimated_running_table);
            #endregion é¢„计运行状况表
            Text_left_12_black.structureLeft20Text("3.3.3 æœ«ç«¯æ¢çƒ­å™¨é¢„计运行状况");
            #region æœ«ç«¯æ¢çƒ­å™¨é¢„计运行状况表
            var estimatedendRun_table = builder.StartTable();
            Cell.SetFont(9);
            Cell_v_merging_start.structureCell("设备名称");
            Cell_v_merging_start.structureCell("设备位号");
            Cell.structureCell("供回水管径");
            Cell.structureCell("供水闸开度");
            Cell.structureCell("供水压力");
            Cell.structureCell("供水温度");
            Cell.structureCell("回水阀开度");
            Cell.structureCell("回水压力");
            Cell.structureCell("回水温度");
            Cell.structureCell("流量");
            Cell.structureCell("压差");
            Cell.structureCell("温差");
            builder.EndRow();
            Cell_v_merging_end.structureCell("");
            Cell_v_merging_end.structureCell("");
            Cell.structureCell("mm");
            Cell.structureCell("%");
            Cell.structureCell("MPa");
            Cell.structureCell("℃");
            Cell.structureCell("%");
            Cell.structureCell("MPa");
            Cell.structureCell("℃");
            Cell.structureCell("m3/h");
            Cell.structureCell("℃");
            Cell.structureCell("℃");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndRow();
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            Cell.structureCell("");
            builder.EndTable();
            estimatedendRun_table.AllowAutoFit = false;
            Processing_pagination(src, builder, estimatedendRun_table);
            #endregion æœ«ç«¯æ¢çƒ­å™¨é¢„计运行状况表
            Text_left_12_black.structureLeft20Text("3.3.2 æŠ€æ”¹åŽå„运行模式下设备预计节电情况");
            #region è®¾å¤‡é¢„计节电情况表
            var expected_power_savings = builder.StartTable();
            Cell.SetFont(9);
            Cell.structureCell("项    ç›®");
            Cell_h_merging_start.structureCell("设  å¤‡  å·¥  å†µ");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            builder.EndRow();
            Cell.structureCell("运行模式");
            Cell.structureCell("技改后设计功率 (kW)");
            Cell.structureCell("年运行时间(h)");
            Cell.structureCell("改后年耗电量(万kW.h)");
            builder.EndRow();
            totalPower = 0;
            totalHour = 0;
            AnnualPower = 0;
            //if (vm.AfterPowerConsumptionInfos != null)
            //{
            //    foreach (var item in vm.AfterPowerConsumptionInfos)
            //    {
            //        Cell.structureCell(item.RunMode);
            //        Cell.structureCell(item.PreTechPowerConsumption);
            //        if (double.TryParse(item.PreTechPowerConsumption, out double power))
            //        {
            //            totalPower += power;
            //        }
            //        Cell.structureCell(item.AnnualRunningHours);
            //        if (int.TryParse(item.AnnualRunningHours, out int hour))
            //        {
            //            totalHour += hour;
            //        }
            //        Cell.structureCell(item.AnnualPowerConsumption);
            //        if (double.TryParse(item.AnnualPowerConsumption, out double annualPower))
            //        {
            //            AnnualPower += annualPower;
            //        }
            //        builder.EndRow();
            //    }
            //}
            Cell.structureCell("合计");
            if (totalPower != 0)
            {
                Cell.structureCell(totalPower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (totalHour != 0)
            {
                Cell.structureCell(totalHour.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (AnnualPower != 0)
            {
                Cell.structureCell(AnnualPower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            builder.EndTable();
            expected_power_savings.AllowAutoFit = false;
            Processing_pagination(src, builder, expected_power_savings);
            #endregion è®¾å¤‡é¢„计节电情况表
            Text_left_12_black.structureLeft20Text("3.4、技改说明");
            Text_left_12_black.structureLeft20Text("针对前述的系统存在的问题分析,目前系统在优化运行方面还有较大的提升空间,存在较大的节能潜力,从整体上提出以下解决方案:");
            Text_left_12_black.structureLeft20Text("a、优化水泵匹配实现节能;");
            Text_left_12_black.structureLeft20Text("b、改善水泵气蚀实现节能;");
            Text_left_12_black.structureLeft20Text("c、提高水泵运行效率节能;");
            Text_left_12_black.structureLeft20Text("d、实现合理供水,调整水力平衡,优化母管供、回水压力,降低阻力实现节能;");
            Text_left_15_black.structureText("四)\t项目节电效益分析");
            Text_left_12_black.structureLeft20Text("4.1、每年节电量");
            Text_left_12_black.structureLeft20Text(string.Format("按{0}公司循环水系统年平均运行{1}小时计,则系统年节电量:", _Company_1, _Avg_Hour));
            Text_left_12_black.structureLeft20Text(string.Format("系统年节电量={0}={1}(万度)", _Electricity, _Electricity_kWh));
            Text_left_12_black.structureLeft20Text("4.2、节电计算汇总如下表");
            #region èŠ‚ç”µè®¡ç®—æ±‡æ€»è¡¨
            var summary_table = builder.StartTable();
            Cell.SetFont(9);
            Cell.structureCell("运行模式");
            Cell.structureCell("技改前实耗功率");
            Cell.structureCell("技改后设计功率");
            Cell.structureCell("小时节电量");
            Cell.structureCell("节电率");
            Cell.structureCell("运行时间");
            builder.EndRow();
            Cell.structureCell("单位");
            Cell.structureCell("(kW)");
            Cell.structureCell("(kW)");
            Cell.structureCell("(kW)");
            Cell.structureCell("(%)");
            Cell.structureCell("(h)");
            builder.EndRow();
            double savingRate = 0;
            double runningTime = 0;
            //if (vm.PowerRelatedInfos != null)
            //{
            //    foreach (var item in vm.PowerRelatedInfos)
            //    {
            //        Cell.structureCell(item.RunMode);
            //        Cell.structureCell(item.PreTechPowerConsumption);
            //        Cell.structureCell(item.PostTechDesignedPower);
            //        Cell.structureCell(item.HourlyPowerSaving);
            //        Cell.structureCell(item.PowerSavingRate);
            //        if (double.TryParse(item.PowerSavingRate, out double power))
            //        {
            //            savingRate += power;
            //        }
            //        Cell.structureCell(item.RunningTime);
            //        if (double.TryParse(item.RunningTime, out double time))
            //        {
            //            runningTime += time;
            //        }
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
            }
            Cell_h_merging_start.structureCell("合计年节电量(万度)");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            Cell_h_merging_end.structureCell("");
            if (savingRate != 0)
            {
                Cell_h_merging_start.structureCell(savingRate.ToString());
            }
            else
            {
                Cell_h_merging_start.structureCell("");
            }
            if (runningTime != 0)
            {
                Cell_h_merging_start.structureCell(runningTime.ToString());
            }
            else
            {
                Cell_h_merging_start.structureCell("");
            }
            builder.EndTable();
            summary_table.AllowAutoFit = false;
            Processing_pagination(src, builder, summary_table);
            #endregion èŠ‚ç”µè®¡ç®—æ±‡æ€»è¡¨
            Text_left_15_black.structureLeft20Text("五)\t综述");
            Text_left_12_black.structureLeft20Text(string.Format("本案是在科维公司技术人员于{0}对{1}水系统进行详细调查、检测基础上,采用流体输送Go·well技术对检测资料进行系统分析、研究,并结合该系统运行的负荷情况,精心设计的节能技改方案。", _Time, _System));
            Text_left_12_black.structureLeft20Text(string.Format("通过技改节电效果如下(按年运行(0)小时计):", _Hour));
            #region è®¾å¤‡é¢„计节电情况表
            var power_saving_effect_table = builder.StartTable();
            Cell.SetFont(9);
            Cell.structureCell("序号");
            Cell.structureCell("设备名称");
            Cell.structureCell("技改前年耗电量(万度/å¹´)");
            Cell.structureCell("节电率\r\n(%)");
            Cell.structureCell("改后年节电量\r\n(万度/å¹´)");
            builder.EndRow();
            double totalBeforePower = 0;
            double totalSavingRate = 0;
            double totalAfterAnnualPower = 0;
            //if (vm.AfterEquipmentPowers != null)
            //{
            //    int i = 0;
            //    foreach (var item in vm.AfterEquipmentPowers)
            //    {
            //        Cell.structureCell((++i).ToString());
            //        Cell.structureCell(item.EquipmentName);
            //        Cell.structureCell(item.PowerConsumptionBeforeTech);
            //        if (double.TryParse(item.PowerConsumptionBeforeTech, out double BeforePower))
            //        {
            //            totalBeforePower += BeforePower;
            //        }
            //        Cell.structureCell(item.PowerSavingRate);
            //        if (double.TryParse(item.PowerSavingRate, out double SavingRate))
            //        {
            //            totalSavingRate += SavingRate;
            //        }
            //        Cell.structureCell(item.AnnualPowerSavingAfterTech);
            //        if (double.TryParse(item.AnnualPowerSavingAfterTech, out double AfterAnnualPower))
            //        {
            //            totalAfterAnnualPower += AfterAnnualPower;
            //        }
            //        builder.EndRow();
            //    }
            //}
            //else
            {
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                Cell.structureCell("");
                builder.EndRow();
            }
            Cell.structureCell("");
            Cell.structureCell("合计");
            if (totalBeforePower != 0)
            {
                Cell.structureCell(totalBeforePower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (totalSavingRate != 0)
            {
                Cell.structureCell(totalSavingRate.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            if (totalAfterAnnualPower != 0)
            {
                Cell.structureCell(totalAfterAnnualPower.ToString());
            }
            else
            {
                Cell.structureCell("");
            }
            builder.EndRow();
            builder.EndTable();
            power_saving_effect_table.AllowAutoFit = false;
            Processing_pagination(src, builder, power_saving_effect_table);
            #endregion è®¾å¤‡é¢„计节电情况表
            Text_left_12_black.structureLeft20Text("必须郑重指出,本案属流体输送Go·well技术设计成果,仅作为本系统节能技改投资决策和实施的依据。");
            Text_left_12_black.structureLeft20Text(string.Format("在此,非常感谢{0}公司各部门领导对节能工作的重视和支持,非常感谢{1}公司技术人员对检测工作的大力配合,并提供宝贵资料及系统情况。", _Company_2, _Company_3));
            Text_reight_10_black.structureText("浙江科维节能技术股份有限公司");
            Text_reight_10_black.structureLeft20Text(string.Format("{0}å¹´{1}月", _Year, _month));
            doc.AppendDocument(src, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
        }
        private void Processing_pagination(Document doc, DocumentBuilder builder, Table table)
        {
            // åˆ›å»ºLayoutCollector对象
            LayoutCollector collector = new LayoutCollector(doc);
            // æ›´æ–°é¡µé¢å¸ƒå±€
            doc.UpdatePageLayout();
            // èŽ·å–è¡¨æ ¼çš„å¼€å§‹å’Œç»“æŸé¡µé¢ç´¢å¼•
            int startPageIndex = collector.GetStartPageIndex(table);
            int endPageIndex = collector.GetEndPageIndex(table);
            // åˆ¤æ–­è¡¨æ ¼æ˜¯å¦é€‚合放在当前页面上
            if (endPageIndex > startPageIndex)
            {
                // è¡¨æ ¼ä¸é€‚合放在当前页面上,需要换页
                // åœ¨è¡¨æ ¼å‰æ’入分页符
                builder.MoveTo(table.PreviousSibling);
                builder.InsertBreak(BreakType.PageBreak);
                builder.MoveToDocumentEnd();
            }
        }
    }
}