| | |
| | | public DataVerificationPage() |
| | | { |
| | | InitializeComponent(); |
| | | this.PageTitle.Caption = "数据验证"; |
| | | PageTitle.Caption = "数据验证"; |
| | | |
| | | this.gridView1.SetNormalView(); |
| | | this.gridView2.SetNormalView(); |
| | | this.gridView3.SetNormalView(); |
| | | this.gridView4.SetNormalView(); |
| | | this.gridView5.SetNormalView(); |
| | | gridView1.SetNormalView(); |
| | | gridView2.SetNormalView(); |
| | | gridView3.SetNormalView(); |
| | | gridView4.SetNormalView(); |
| | | gridView5.SetNormalView(); |
| | | |
| | | this.colYearMonth.Visible = false; |
| | | this.colTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | this.colTime.DisplayFormat.FormatString = "G"; |
| | | colYearMonth.Visible = false; |
| | | colTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | colTime.DisplayFormat.FormatString = "G"; |
| | | |
| | | this.colTime1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | this.colTime1.DisplayFormat.FormatString = "G"; |
| | | colTime1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | colTime1.DisplayFormat.FormatString = "G"; |
| | | |
| | | this.colTime2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | this.colTime2.DisplayFormat.FormatString = "G"; |
| | | colTime2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; |
| | | colTime2.DisplayFormat.FormatString = "G"; |
| | | |
| | | this.stationListCtrl1.FocusedChangedEvent += StationListCtrl1_FocusedChangedEvent; |
| | | this.monitorDataSourcesTreeList1.FocusedChangedEvent += MonitorDataSourcesListCtrl1_FocusedChangedEvent; |
| | | stationListCtrl1.FocusedChangedEvent += StationListCtrl1_FocusedChangedEvent; |
| | | monitorDataSourcesTreeList1.FocusedChangedEvent += MonitorDataSourcesListCtrl1_FocusedChangedEvent; |
| | | |
| | | } |
| | | |
| | |
| | | public string RunFlags { get; set; } |
| | | |
| | | [Display(Name = "转速")] |
| | | public string RpmList { get; set; } |
| | | public string RpmList { get; set; } |
| | | |
| | | [Display(Name = "出口")] |
| | | public string OutletList { get; set; } |
| | |
| | | public int Flag { get; set; } |
| | | |
| | | [Display(Name = "转速")] |
| | | public double Rpm { get; set; } |
| | | public double Rpm { get; set; } |
| | | |
| | | [Display(Name = "出口")] |
| | | public double Outlet { get; set; } |
| | |
| | | /// </summary> |
| | | public void Clear() |
| | | { |
| | | this.combineStatisticsViewModelBindingSource.DataSource = new List<CombineStatisticsViewModel>(); |
| | | this.combineMeterDeviationViewModelBindingSource.DataSource = new List<CombineMeterDeviationViewModel>(); |
| | | combineStatisticsViewModelBindingSource.DataSource = new List<CombineStatisticsViewModel>(); |
| | | combineMeterDeviationViewModelBindingSource.DataSource = new List<CombineMeterDeviationViewModel>(); |
| | | |
| | | this.pumpViewModelBindingSource.DataSource = new List<PumpViewModel>(); |
| | | this.pumpMeterDeviationViewModelBindingSource.DataSource = new List<PumpMeterDeviationViewModel>(); |
| | | pumpViewModelBindingSource.DataSource = new List<PumpViewModel>(); |
| | | pumpMeterDeviationViewModelBindingSource.DataSource = new List<PumpMeterDeviationViewModel>(); |
| | | |
| | | this.pumpViewModelBindingSource1.DataSource = new List<PumpViewModel>(); |
| | | pumpViewModelBindingSource1.DataSource = new List<PumpViewModel>(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public override void InitialDataSource() |
| | | { |
| | | this.stationListCtrl1.SetBindingData(); |
| | | this.monitorDataSourcesTreeList1.SetBindingData(); |
| | | stationListCtrl1.SetBindingData(); |
| | | monitorDataSourcesTreeList1.SetBindingData(); |
| | | } |
| | | |
| | | //泵站变换 |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (this.barCekLoad.Checked) |
| | | if (barCekLoad.Checked) |
| | | { |
| | | return; |
| | | } |
| | |
| | | var vm_combine_meter_dev_list = new List<CombineMeterDeviationViewModel>(); |
| | | |
| | | var vm_pump_list = new List<PumpViewModel>(); |
| | | var vm_pump_meter_dev_list=new List<PumpMeterDeviationViewModel>(); |
| | | var vm_pump_meter_dev_list = new List<PumpMeterDeviationViewModel>(); |
| | | if (packets != null && packets.Any()) |
| | | { |
| | | foreach (var packet in packets) |
| | |
| | | vm_combine.RunFlags = IStation.Untity.IntListHelper.ToString(run_flags); |
| | | vm_combine.RpmList = IStation.Untity.DoubleListHelper.ToString(rpm_list); |
| | | vm_combine.OutletPressureList = IStation.Untity.DoubleListHelper.ToString(outlet_pressure_list); |
| | | vm_combine.HeadList = IStation.Untity.DoubleListHelper.ToString(head_list); |
| | | vm_combine.HeadList = IStation.Untity.DoubleListHelper.ToString(head_list); |
| | | vm_combine.TotalPower = Math.Round(total_power, 1); |
| | | vm_combine_list.Add(vm_combine); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | var use_head = this.barCekUseHead.Checked; |
| | | var use_head = barCekUseHead.Checked; |
| | | if (vm_combine_list.Any()) |
| | | { |
| | | var group_by_run_flags = vm_combine_list.GroupBy(x => x.RunFlags); |
| | |
| | | foreach (var rpm_item in group_by_rpm_list) |
| | | { |
| | | var rpm_list_key = rpm_item.Key; |
| | | var outlet_dict=new Dictionary<string,List<CombineStatisticsViewModel>>(); |
| | | var outlet_dict = new Dictionary<string, List<CombineStatisticsViewModel>>(); |
| | | if (use_head) |
| | | { |
| | | outlet_dict = rpm_item.GroupBy(x => x.HeadList).ToDictionary(x => x.Key, y => y.ToList()); |
| | |
| | | { |
| | | outlet_dict = rpm_item.GroupBy(x => x.OutletPressureList).ToDictionary(x => x.Key, y => y.ToList()); |
| | | } |
| | | |
| | | |
| | | foreach (var item in outlet_dict) |
| | | { |
| | | var outlet_key = item.Key; |
| | |
| | | foreach (var rpm_item in group_by_rpm) |
| | | { |
| | | var rpm_key = rpm_item.Key; |
| | | var outlet_dict = new Dictionary<double, List<PumpViewModel>>(); |
| | | var outlet_dict = new Dictionary<double, List<PumpViewModel>>(); |
| | | //if (use_head) |
| | | //{ |
| | | // outlet_dict = rpm_item.GroupBy(x => x.Head).ToDictionary(x => x.Key, y => y.ToList()); |
| | |
| | | |
| | | |
| | | |
| | | this.combineStatisticsViewModelBindingSource.DataSource = vm_combine_list; |
| | | this.combineMeterDeviationViewModelBindingSource.DataSource = vm_combine_meter_dev_list; |
| | | combineStatisticsViewModelBindingSource.DataSource = vm_combine_list; |
| | | combineMeterDeviationViewModelBindingSource.DataSource = vm_combine_meter_dev_list; |
| | | |
| | | |
| | | this.pumpViewModelBindingSource.DataSource = vm_pump_list; |
| | | this.pumpMeterDeviationViewModelBindingSource.DataSource = vm_pump_meter_dev_list; |
| | | pumpViewModelBindingSource.DataSource = vm_pump_list; |
| | | pumpMeterDeviationViewModelBindingSource.DataSource = vm_pump_meter_dev_list; |
| | | WaitFrmHelper.HideWaitForm(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //加载 |
| | | private void barCekLoad_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | SetBindingData(_monitorDataSources, _station); |
| | | } |
| | | |
| | | |
| | | |
| | | //扬程验证 |
| | | private void barCekUseHead_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | |
| | | //全部展开 |
| | | private void barBtnExpandAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | this.gridView1.ExpandAllGroups(); |
| | | gridView1.ExpandAllGroups(); |
| | | } |
| | | |
| | | //全部折叠 |
| | | private void barBtnCollapseAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | this.gridView1.CollapseAllGroups(); |
| | | gridView1.CollapseAllGroups(); |
| | | } |
| | | |
| | | //检索 |
| | | private void barCekSearch_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (this.barCekSearch.Checked) |
| | | this.gridView1.ShowFindPanel(); |
| | | if (barCekSearch.Checked) |
| | | gridView1.ShowFindPanel(); |
| | | else |
| | | this.gridView1.HideFindPanel(); |
| | | gridView1.HideFindPanel(); |
| | | } |
| | | |
| | | // 刷新数据 |
| | |
| | | |
| | | private void gridView4_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) |
| | | { |
| | | var vm = this.gridView4.GetRow(e.FocusedRowHandle) as PumpMeterDeviationViewModel; |
| | | var vm = gridView4.GetRow(e.FocusedRowHandle) as PumpMeterDeviationViewModel; |
| | | if (vm == null) |
| | | { |
| | | this.pumpViewModelBindingSource1.DataSource = new List<PumpViewModel>(); |
| | | pumpViewModelBindingSource1.DataSource = new List<PumpViewModel>(); |
| | | return; |
| | | } |
| | | this.pumpViewModelBindingSource1.DataSource = vm.RecordList; |
| | | this.pumpViewModelBindingSource1.ResetBindings(false); |
| | | pumpViewModelBindingSource1.DataSource = vm.RecordList; |
| | | pumpViewModelBindingSource1.ResetBindings(false); |
| | | |
| | | } |
| | | } |