| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraLayout; |
| | | using DevExpress.XtraLayout.Utils; |
| | | using DevExpress.XtraRichEdit.Model; |
| | | using NPOI.HPSF; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraLayout.Utils; |
| | | using Yw.Model; |
| | | using Yw.Vmo; |
| | | |
| | |
| | | private SimulationPumpSingleWorkingChartCtrl _workingChart = null; |
| | | private HydroSingleWorkingLossCurveCtrl _lossCurve = null; |
| | | private HydroSingleWorkingLossStatisticsCtrl _lossStatistics = null; |
| | | |
| | | |
| | | private XhsProjectVmo _project = null; |
| | | private Yw.Model.HydroModelInfo _hydroInfo = null; |
| | |
| | | projectGroup.AllowBorderColorBlending = true; |
| | | projectGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | |
| | | #endregion |
| | | #endregion 项目信息 |
| | | |
| | | #region 能耗分析 |
| | | |
| | |
| | | energyGroup.AllowBorderColorBlending = true; |
| | | energyGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | |
| | | #endregion |
| | | #endregion 能耗分析 |
| | | |
| | | #region 损失曲线 |
| | | |
| | |
| | | lossCurveGroup.AllowBorderColorBlending = true; |
| | | lossCurveGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | |
| | | #endregion |
| | | #endregion 损失曲线 |
| | | |
| | | #region 损失统计 |
| | | |
| | |
| | | lossStatisticsGroup.AllowBorderColorBlending = true; |
| | | lossStatisticsGroup.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion 损失统计 |
| | | } |
| | | |
| | | private const string _tempFoler = "workingImageTemp"; |
| | |
| | | /// <summary> |
| | | /// 获取视图 |
| | | /// </summary> |
| | | public async Task<SimulationWorkingReportViewModel> GetViewModel() |
| | | public async Task<HStation.ReportFile.SimulationWorkingReportViewModel> GetViewModel() |
| | | { |
| | | var vm = new SimulationWorkingReportViewModel(); |
| | | var vm = new HStation.ReportFile.SimulationWorkingReportViewModel(); |
| | | vm.ReportType = "模拟工况运行报告"; |
| | | vm.Info = new SimulationReportInfoItemViewModel() |
| | | vm.Info = new HStation.ReportFile.SimulationReportInfoItemViewModel() |
| | | { |
| | | Name = _project.Name, |
| | | Description = _project.Description, |
| | | }; |
| | | vm.Pumps = new List<SimulationReportPumpItemViewModel>(); |
| | | vm.Pumps = new List<HStation.ReportFile.SimulationReportPumpItemViewModel>(); |
| | | var pumps = _hydroInfo.Pumps; |
| | | foreach (var pump in _hydroInfo.Pumps) |
| | | { |
| | | var pumpItem = new SimulationReportPumpItemViewModel(); |
| | | var pumpItem = new HStation.ReportFile.SimulationReportPumpItemViewModel(); |
| | | pumpItem.Name = pump.Name; |
| | | pumpItem.ModelType = pumpItem.ModelType; |
| | | pumpItem.SerialNO = (_hydroInfo.Pumps.IndexOf(pump) + 1).ToString(); |
| | | pumpItem.RatedQ = $"{pump.RatedQ ?? 0}m³/h"; |
| | | pumpItem.RatedH = $"{pump.RatedH ?? 0}m"; |
| | | pumpItem.RatedQ = $"{pump.RatedQ}m³/h"; |
| | | pumpItem.RatedH = $"{pump.RatedH}m"; |
| | | pumpItem.RatedP = $"{pump.RatedP}kW"; |
| | | pumpItem.RatedN = $"{pump.RatedN ?? 0}r/min"; |
| | | pumpItem.RatedN = $"{pump.RatedN}r/min"; |
| | | vm.Pumps.Add(pumpItem); |
| | | var pumpDb = await BLLFactory<HStation.BLL.AssetsPumpMain>.Instance.GetByIDEx(long.Parse(pump.DbId)); |
| | | if (pumpDb != null) |
| | |
| | | } |
| | | } |
| | | } |
| | | vm.Working = new SimulationReportWorkingItemViewModel(); |
| | | vm.Working = new HStation.ReportFile.SimulationReportWorkingItemViewModel(); |
| | | vm.Working.Name = _working.Name; |
| | | if (string.IsNullOrEmpty(vm.Working.Name)) |
| | | { |
| | |
| | | vm.Working.EnergyStatisticsImagePath = GetImageFilePath(_energyStatisticsImageFileName); |
| | | _lossStatistics.ExportStatisticsToImage(vm.Working.EnergyStatisticsImagePath); |
| | | |
| | | vm.PumpChart = new Yw.DiagramFile.PumpChartViewModel(); |
| | | |
| | | return vm; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |