From 7079cbb505471a8d3251cac4e27c7a3841f8e656 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 04 十二月 2024 22:51:37 +0800 Subject: [PATCH] 修改单独匹配界面 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.cs | 75 + BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs | 5 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingDlg.cs | 17 Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/UpdateAssetsCompressorMainInput.cs | 14 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.Designer.cs | 23 Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AssetsExchangerCoefficientDto.cs | 12 Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerCoefficientVmo.cs | 10 Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/UpdateExchangerMainInput.cs | 15 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs | 33 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.cs | 32 BLL/HStation.BLL.Assets.Core/03-localclient/11-Exchanger/AssetsExchangerCoefficient.cs | 13 Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs | 66 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.cs | 106 +- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingViewModel.cs | 14 Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AssetsCompressorMainDto.cs | 15 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.resx | 0 Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerCoefficient.cs | 14 Service/HStation.Service.Assets.Core/01-entity/15-Tank/AssetsTankCoefficient.cs | 67 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerSeries.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMainAndPartMapping.cs | 0 Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/AddExchangerMainInput.cs | 15 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.Designer.cs | 0 Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainVmo.cs | 15 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.resx | 0 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPropContent.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.Designer.cs | 4 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerSeriesManufacturerMapping.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.Designer.cs | 4 BLL/HStation.BLL.Assets.Core/01-interface/12-ICompressor/IAssetsCompressorCoefficient.cs | 1 Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/ExchangerMainDto.cs | 15 Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorCoefficientVmo.cs | 10 Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AddAssetsCompressorCoefficientInput.cs | 10 Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AssetsCompressorCoefficientDto.cs | 12 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMain.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs | 7 WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs | 756 ++++++++++++++++++ Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerCoefficient.cs | 14 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingCtrl.cs | 133 +- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.resx | 0 Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainVmo.cs | 15 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs | 8 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.cs | 106 +- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingCtrl.cs | 87 - Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorCoefficient.cs | 9 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.Designer.cs | 0 Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorCoefficient.cs | 14 BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPartMain.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.cs | 43 + BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/06-CompressorCoefficient/AssetsCompressorCoefficient.cs | 11 Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankCoefficient.cs | 101 +- BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs | 13 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.cs | 133 +++ Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AddAssetsExchangerCoefficientInput.cs | 10 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs | 61 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingViewModel.cs | 14 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingForm.cs | 30 Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AddAssetsCompressorMainInput.cs | 15 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs | 68 WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj | 29 Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.resx | 0 Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/UpdateAssetsExchangerCoefficientInput.cs | 10 BLL/HStation.BLL.Assets.Core/03-localclient/12-Compressor/AssetsCompressorCoefficient.cs | 13 Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/UpdateAssetsCompressorCoefficientInput.cs | 10 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.resx | 35 /dev/null | 46 - BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerCoefficient.cs | 1 BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/06-AssetsExchangerCoefficient/AssetsExchangerCoefficient.cs | 7 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingViewModel.cs | 14 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.Designer.cs | 4 BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs | 1 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.cs | 43 + 73 files changed, 1,944 insertions(+), 544 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IAssetsExchangerCoefficient.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerCoefficient.cs similarity index 79% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IAssetsExchangerCoefficient.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerCoefficient.cs index 85f2606..ead5960 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IAssetsExchangerCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerCoefficient.cs @@ -8,5 +8,6 @@ /// </summary> public interface IAssetsExchangerCoefficient : IBaseCAL<AddAssetsExchangerCoefficientInput, UpdateAssetsExchangerCoefficientInput, AssetsExchangerCoefficientDto> { + public Task<List<AssetsExchangerCoefficientDto>> GetByMainID(long ID); } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IAssetsExchangerSeriesManufacturerMapping.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerSeriesManufacturerMapping.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IAssetsExchangerSeriesManufacturerMapping.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IAssetsExchangerSeriesManufacturerMapping.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMain.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerMain.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMain.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerMainAndPartMapping.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMainAndPartMapping.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerMainAndPartMapping.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerMainAndPartMapping.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerPartMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPartMain.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerPartMain.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPartMain.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerPropContent.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPropContent.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerPropContent.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerPropContent.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerSeries.cs b/BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerSeries.cs similarity index 100% rename from BLL/HStation.BLL.Assets.Core/01-interface/11-Exchanger/IExchangerSeries.cs rename to BLL/HStation.BLL.Assets.Core/01-interface/11-IExchanger/IExchangerSeries.cs diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/12-ICompressor/IAssetsCompressorCoefficient.cs b/BLL/HStation.BLL.Assets.Core/01-interface/12-ICompressor/IAssetsCompressorCoefficient.cs index 4b245a8..67aff9a 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/12-ICompressor/IAssetsCompressorCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/12-ICompressor/IAssetsCompressorCoefficient.cs @@ -8,5 +8,6 @@ /// </summary> public interface IAssetsCompressorCoefficient : IBaseCAL<AddAssetsCompressorCoefficientInput, UpdateAssetsCompressorCoefficientInput, AssetsCompressorCoefficientDto> { + public Task<List<AssetsCompressorCoefficientDto>> GetByMainID(long ID); } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs index e23fbcb..0912f25 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs @@ -8,5 +8,6 @@ ///</summary> public interface IAssetsTankCoefficient : IBaseCAL<AddAssetsTankCoefficientInput, UpdateAssetsTankCoefficientInput, AssetsTankCoefficientDto> { + public Task<List<AssetsTankCoefficientDto>> GetByMainID(long ID); } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs index 8a56ea1..d7f26c3 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs @@ -15,5 +15,10 @@ { get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankCoefficient"; } } + + public Task<List<AssetsTankCoefficientDto>> GetByMainID(long ID) + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/11-Exchanger/AssetsExchangerCoefficient.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/11-Exchanger/AssetsExchangerCoefficient.cs index 416dbde..33639ee 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/11-Exchanger/AssetsExchangerCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/11-Exchanger/AssetsExchangerCoefficient.cs @@ -50,6 +50,19 @@ }); } + /// <summary> + /// 閫氳繃 MainID 鑾峰彇 + /// </summary> + public async Task<List<AssetsExchangerCoefficientDto>> GetByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetAll(); + var select = model.Where(x => x.MainID == ID).ToList(); + return select?.Select(x => new AssetsExchangerCoefficientDto(x)).ToList(); + }); + } + #endregion Query #region Insert diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/12-Compressor/AssetsCompressorCoefficient.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/12-Compressor/AssetsCompressorCoefficient.cs index 4d619a8..edeccc9 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/12-Compressor/AssetsCompressorCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/12-Compressor/AssetsCompressorCoefficient.cs @@ -50,6 +50,19 @@ }); } + /// <summary> + /// 閫氳繃 MainID 鑾峰彇 + /// </summary> + public async Task<List<AssetsCompressorCoefficientDto>> GetByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetAll(); + var select = model.Where(x => x.MainID == ID).ToList(); + return select?.Select(x => new AssetsCompressorCoefficientDto(x)).ToList(); + }); + } + #endregion Query #region Insert diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs index a8cd455..303c6ec 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs @@ -50,6 +50,19 @@ }); } + /// <summary> + /// 閫氳繃 MainID 鑾峰彇 + /// </summary> + public async Task<List<AssetsTankCoefficientDto>> GetByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetAll(); + var select = model.Where(x => x.MainID == ID).ToList(); + return select?.Select(x => new AssetsTankCoefficientDto(x)).ToList(); + }); + } + #endregion Query #region Insert diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/06-AssetsExchangerCoefficient/AssetsExchangerCoefficient.cs b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/06-AssetsExchangerCoefficient/AssetsExchangerCoefficient.cs index 96f6484..8784b79 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/06-AssetsExchangerCoefficient/AssetsExchangerCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/11-Exchanger/06-AssetsExchangerCoefficient/AssetsExchangerCoefficient.cs @@ -39,6 +39,13 @@ return vmoList; } + public async Task<List<Vmo.AssetsExchangerCoefficientVmo>> GetByMainID(long ID) + { + var DtoList = await _cal.GetByMainID(ID); + var vmoList = Dto2Vmos(DtoList); + return vmoList; + } + #endregion Query #region Insert diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/06-CompressorCoefficient/AssetsCompressorCoefficient.cs b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/06-CompressorCoefficient/AssetsCompressorCoefficient.cs index 2f75823..b910465 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/06-CompressorCoefficient/AssetsCompressorCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/12-Comressor/06-CompressorCoefficient/AssetsCompressorCoefficient.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.BLL +锘縰sing AutoMapper; + +namespace HStation.BLL { /// <summary> /// @@ -39,6 +41,13 @@ return vmoList; } + public async Task<List<Vmo.AssetsCompressorCoefficientVmo>> GetByMainID(long ID) + { + var DtoList = await _cal.GetByMainID(ID); + var vmoList = Dto2Vmos(DtoList); + return vmoList; + } + #endregion Query #region Insert diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs index c1cf224..f2c2004 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs @@ -38,6 +38,13 @@ return Dto2Vmos(dtoList); } + public async Task<List<Vmo.AssetsTankCoefficientVmo>> GetByMainID(long ID) + { + var DtoList = await _cal.GetByMainID(ID); + var vmoList = Dto2Vmos(DtoList); + return vmoList; + } + #endregion Query #region Insert diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/AddExchangerMainInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/AddExchangerMainInput.cs index 33362b7..97a78a8 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/AddExchangerMainInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/AddExchangerMainInput.cs @@ -40,6 +40,21 @@ public double MinorLoss { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 璇嗗埆鍏抽敭瀛� /// </summary> public List<string> KeyWord { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/ExchangerMainDto.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/ExchangerMainDto.cs index 2b5c4fb..9426d16 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/ExchangerMainDto.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/ExchangerMainDto.cs @@ -40,6 +40,21 @@ public double MinorLoss { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 璇嗗埆鍏抽敭瀛� /// </summary> public List<string> KeyWord { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/UpdateExchangerMainInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/UpdateExchangerMainInput.cs index 1d5291f..28afc5e 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/UpdateExchangerMainInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/02-ExchangerMain/UpdateExchangerMainInput.cs @@ -31,6 +31,21 @@ public double MinorLoss { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 璇嗗埆鍏抽敭瀛� /// </summary> public List<string> KeyWord { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AddAssetsExchangerCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AddAssetsExchangerCoefficientInput.cs index 8c912d5..65cae7a 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AddAssetsExchangerCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AddAssetsExchangerCoefficientInput.cs @@ -8,6 +8,11 @@ public string Name { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鏉愭枡 /// </summary> public string Material { get; set; } @@ -16,5 +21,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AssetsExchangerCoefficientDto.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AssetsExchangerCoefficientDto.cs index 78038d4..5d4e3ca 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AssetsExchangerCoefficientDto.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/AssetsExchangerCoefficientDto.cs @@ -9,15 +9,22 @@ public AssetsExchangerCoefficientDto(Model.AssetsExchangerCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> /// id /// </summary> public long ID { get; set; } + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } /// <summary> /// 鍚嶇О @@ -33,5 +40,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/UpdateAssetsExchangerCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/UpdateAssetsExchangerCoefficientInput.cs index 47496ce..f139ab3 100644 --- a/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/UpdateAssetsExchangerCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/11-Exchanger/06-ExchangerCoefficient/UpdateAssetsExchangerCoefficientInput.cs @@ -11,6 +11,11 @@ public long ID { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } @@ -24,5 +29,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AddAssetsCompressorMainInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AddAssetsCompressorMainInput.cs index 3f4df81..ce107ef 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AddAssetsCompressorMainInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AddAssetsCompressorMainInput.cs @@ -41,6 +41,21 @@ public string Material { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 绯绘暟 /// </summary> public double? MinorLoss { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AssetsCompressorMainDto.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AssetsCompressorMainDto.cs index e119972..def8049 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AssetsCompressorMainDto.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/AssetsCompressorMainDto.cs @@ -49,6 +49,21 @@ public double? MinorLoss { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 璇嗗埆鍏抽敭瀛� /// </summary> public List<string> KeyWord { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/UpdateAssetsCompressorMainInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/UpdateAssetsCompressorMainInput.cs index 1ef77a6..4136e36 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/UpdateAssetsCompressorMainInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/02-CompressorMain/UpdateAssetsCompressorMainInput.cs @@ -41,9 +41,19 @@ public string KeyWord { get; set; } /// <summary> - /// 鏄惁榛樿 + /// 鍙傛暟 /// </summary> - public bool IsDefault { get; set; } + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } /// <summary> /// 鎺掑簭鐮� diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AddAssetsCompressorCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AddAssetsCompressorCoefficientInput.cs index 88c4187..321cc63 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AddAssetsCompressorCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AddAssetsCompressorCoefficientInput.cs @@ -8,6 +8,11 @@ public string Name { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍙e緞 /// </summary> public double? Caliber { get; set; } @@ -21,5 +26,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AssetsCompressorCoefficientDto.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AssetsCompressorCoefficientDto.cs index 8b13581..895ddab 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AssetsCompressorCoefficientDto.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/AssetsCompressorCoefficientDto.cs @@ -10,9 +10,11 @@ { this.ID = rhs.ID; this.Name = rhs.Name; + this.MainID = rhs.MainID; this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> @@ -24,6 +26,11 @@ /// 鍚嶇О /// </summary> public string Name { get; set; } + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } /// <summary> /// 鍙e緞 @@ -39,5 +46,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/UpdateAssetsCompressorCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/UpdateAssetsCompressorCoefficientInput.cs index 1bb76f3..7ad9bd1 100644 --- a/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/UpdateAssetsCompressorCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/12-Compressor/06-CompressorCoefficientInput/UpdateAssetsCompressorCoefficientInput.cs @@ -11,6 +11,11 @@ public long ID { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } @@ -29,5 +34,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs index e25a89e..72adb9a 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs @@ -4,31 +4,38 @@ { /// <summary> /// 姘存睜绯绘暟 - ///</summary> + ///</summary> public class AddAssetsTankCoefficientInput - { + { /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> [Required] public string Name { get; set; } - + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + /// <summary> /// 鍙e緞 - ///</summary> + ///</summary> public double? Caliber { get; set; } - + /// <summary> /// 鏉愭枡 - ///</summary> + ///</summary> public string Material { get; set; } - + /// <summary> /// 灞�闃荤郴鏁� - ///</summary> + ///</summary> public double MinorLoss { get; set; } - - - } -} + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs index 578846e..df9dc3f 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs @@ -2,52 +2,62 @@ { /// <summary> /// 姘存睜绯绘暟 - ///</summary> + ///</summary> public class AssetsTankCoefficientDto { - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientDto() { } + /// <summary> + /// + /// </summary> + public AssetsTankCoefficientDto() + { } - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientDto(Model.AssetsTankCoefficient rhs) - { - this.ID=rhs.ID; - this.Name=rhs.Name; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - } + /// <summary> + /// + /// </summary> + public AssetsTankCoefficientDto(Model.AssetsTankCoefficient rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.MainID = rhs.MainID; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + this.VolCurve = rhs.VolCurve; + } /// <summary> /// ID - ///</summary> + ///</summary> public long ID { get; set; } - + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } - + /// <summary> /// 鍙e緞 - ///</summary> + ///</summary> public double? Caliber { get; set; } - + /// <summary> /// 鏉愭枡 - ///</summary> + ///</summary> public string Material { get; set; } - + /// <summary> /// 灞�闃荤郴鏁� - ///</summary> + ///</summary> public double MinorLoss { get; set; } - - - } -} + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs index 2c465ff..fff5c83 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs @@ -4,37 +4,44 @@ { /// <summary> /// 姘存睜绯绘暟 - ///</summary> + ///</summary> public class UpdateAssetsTankCoefficientInput - { + { /// <summary> - /// ID - ///</summary> - [Required, Range(1, long.MaxValue, ErrorMessage ="ID 蹇呴』澶т簬0")] + /// ID + ///</summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] public long ID { get; set; } - + /// <summary> - /// 鍚嶇О - ///</summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 鍚嶇О + ///</summary> [Required] public string Name { get; set; } - - /// <summary> - /// 鍙e緞 - ///</summary> - public double? Caliber { get; set; } - - /// <summary> - /// 鏉愭枡 - ///</summary> - public string Material { get; set; } - - /// <summary> - /// 灞�闃荤郴鏁� - ///</summary> - public double MinorLoss { get; set; } - - - } -} + /// <summary> + /// 鍙e緞 + ///</summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鏉愭枡 + ///</summary> + public string Material { get; set; } + + /// <summary> + /// 灞�闃荤郴鏁� + ///</summary> + public double MinorLoss { get; set; } + + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerCoefficient.cs b/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerCoefficient.cs index 1903b1e..f5efc19 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/11-Exchanger/AssetsExchangerCoefficient.cs @@ -18,23 +18,32 @@ public AssetsExchangerCoefficient(AssetsExchangerCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } public void Reset(AssetsExchangerCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } /// <summary> /// 鏉愭枡 @@ -47,6 +56,11 @@ public double MinorLoss { get; set; } /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } + + /// <summary> /// /// </summary> public AssetsExchangerCoefficient Clone() diff --git a/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorCoefficient.cs b/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorCoefficient.cs index 5e7f280..2984c62 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/12-Compressor/AssetsCompressorCoefficient.cs @@ -18,19 +18,23 @@ public AssetsCompressorCoefficient(AssetsCompressorCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } public void Reset(AssetsCompressorCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> @@ -39,6 +43,11 @@ public string Name { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍙e緞 /// </summary> public double? Caliber { get; set; } diff --git a/Service/HStation.Service.Assets.Core/01-entity/15-Tank/AssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/01-entity/15-Tank/AssetsTankCoefficient.cs index 5e6da34..36cba3d 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/15-Tank/AssetsTankCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/15-Tank/AssetsTankCoefficient.cs @@ -6,64 +6,71 @@ /// 姘存睜绯绘暟 ///</summary> [SysType("assets-tank-coefficient")] - [SugarTable("assets_tank_coefficient")] - public class AssetsTankCoefficient : BaseEntity , System.ICloneable + [SugarTable("assets_tank_coefficient")] + public class AssetsTankCoefficient : BaseEntity, System.ICloneable { - /// <summary> - /// - /// </summary> - public AssetsTankCoefficient() { } + /// <summary> + /// + /// </summary> + public AssetsTankCoefficient() + { } - /// <summary> - /// - /// </summary> - public AssetsTankCoefficient(AssetsTankCoefficient rhs) : base(rhs) - { + /// <summary> + /// + /// </summary> + public AssetsTankCoefficient(AssetsTankCoefficient rhs) : base(rhs) + { this.Name = rhs.Name; + this.MainID = rhs.MainID; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; - } + this.VolCurve = rhs.VolCurve; + } /// <summary> - /// 鍚嶇О + /// 鍚嶇О ///</summary> - [SugarColumn(Length = 50, IsNullable = true)] + [SugarColumn(Length = 50, IsNullable = true)] public string Name { get; set; } - + /// <summary> - /// 鍙e緞 + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 鍙e緞 ///</summary> public double? Caliber { get; set; } - + /// <summary> - /// 鏉愭枡 + /// 鏉愭枡 ///</summary> - [SugarColumn(Length = 255, IsNullable = true)] + [SugarColumn(Length = 255, IsNullable = true)] public string Material { get; set; } - + /// <summary> - /// 灞�闃荤郴鏁� + /// 灞�闃荤郴鏁� ///</summary> public double MinorLoss { get; set; } - + + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } /// <summary> /// /// </summary> public AssetsTankCoefficient Clone() { - return (AssetsTankCoefficient)this.MemberwiseClone(); + return (AssetsTankCoefficient)this.MemberwiseClone(); } object ICloneable.Clone() { - return this.MemberwiseClone(); + return this.MemberwiseClone(); } - } -} - - - - +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerCoefficient.cs b/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerCoefficient.cs index 533a9b4..36188cd 100644 --- a/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/02-model/11-Exchanger/AssetsExchangerCoefficient.cs @@ -17,23 +17,32 @@ public AssetsExchangerCoefficient(AssetsExchangerCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } public void Reset(AssetsExchangerCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } /// <summary> /// 鏉愭枡 @@ -46,6 +55,11 @@ public double MinorLoss { get; set; } /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } + + /// <summary> /// /// </summary> public AssetsExchangerCoefficient Clone() diff --git a/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsExchangerCoefficient.cs b/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorCoefficient.cs similarity index 79% rename from Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsExchangerCoefficient.cs rename to Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorCoefficient.cs index 105d4e8..225e58d 100644 --- a/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsExchangerCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/02-model/12-Compressor/AssetsCompressorCoefficient.cs @@ -17,25 +17,34 @@ public AssetsCompressorCoefficient(AssetsCompressorCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } public void Reset(AssetsCompressorCoefficient rhs) { this.ID = rhs.ID; + this.MainID = rhs.MainID; this.Name = rhs.Name; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.MinorLossCurve = rhs.MinorLossCurve; } /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } /// <summary> /// 鍙e緞 @@ -53,6 +62,11 @@ public double MinorLoss { get; set; } /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } + + /// <summary> /// /// </summary> public AssetsCompressorCoefficient Clone() diff --git a/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankCoefficient.cs index 0583fe8..681b881 100644 --- a/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankCoefficient.cs @@ -1,78 +1,87 @@ 锘縰sing Yw.Model; + namespace HStation.Model { /// <summary> /// 姘存睜绯绘暟 ///</summary> - [SysType("assets-tank-coefficient")] - public class AssetsTankCoefficient : BaseModel , System.ICloneable + [SysType("assets-tank-coefficient")] + public class AssetsTankCoefficient : BaseModel, System.ICloneable { - /// <summary> - /// - /// </summary> - public AssetsTankCoefficient() { } - - /// <summary> - /// - /// </summary> - public AssetsTankCoefficient(AssetsTankCoefficient rhs) : base(rhs) - { - this.Name=rhs.Name; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - } - - /// <summary> - /// - /// </summary> - public void Reset(AssetsTankCoefficient rhs) - { - this.ID=rhs.ID; - this.Name=rhs.Name; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - } - + /// <summary> + /// + /// </summary> + public AssetsTankCoefficient() + { } /// <summary> - /// 鍚嶇О + /// + /// </summary> + public AssetsTankCoefficient(AssetsTankCoefficient rhs) : base(rhs) + { + this.Name = rhs.Name; + this.MainID = rhs.MainID; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + this.VolCurve = rhs.VolCurve; + } + + /// <summary> + /// + /// </summary> + public void Reset(AssetsTankCoefficient rhs) + { + this.ID = rhs.ID; + this.MainID = rhs.MainID; + this.Name = rhs.Name; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + this.VolCurve = rhs.VolCurve; + } + + /// <summary> + /// 鍚嶇О ///</summary> public string Name { get; set; } - + /// <summary> - /// 鍙e緞 + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 鍙e緞 ///</summary> public double? Caliber { get; set; } - + /// <summary> - /// 鏉愭枡 + /// 鏉愭枡 ///</summary> public string Material { get; set; } - + /// <summary> - /// 灞�闃荤郴鏁� + /// 灞�闃荤郴鏁� ///</summary> public double MinorLoss { get; set; } - + + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } /// <summary> /// /// </summary> public AssetsTankCoefficient Clone() { - return (AssetsTankCoefficient)this.MemberwiseClone(); + return (AssetsTankCoefficient)this.MemberwiseClone(); } object ICloneable.Clone() { - return this.MemberwiseClone(); + return this.MemberwiseClone(); } - } -} - - - - +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs index 42e0a45..1da6f78 100644 --- a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs @@ -13,11 +13,6 @@ public long MainID { get; set; } /// <summary> - /// 姘村ご鎹熷け鏇茬嚎 - /// </summary> - public string MinorLossCurve { get; set; } - - /// <summary> /// 寮�搴︽崯澶辨洸绾� /// </summary> public string OpenLossCurve { get; set; } @@ -41,5 +36,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerCoefficientVmo.cs b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerCoefficientVmo.cs index a318cf7..909d9bc 100644 --- a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerCoefficientVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerCoefficientVmo.cs @@ -8,6 +8,11 @@ public long ID { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } @@ -21,5 +26,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainVmo.cs b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainVmo.cs index 8dd6c19..01aa340 100644 --- a/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/11-Exchanger/AssetsExchangerMainVmo.cs @@ -30,6 +30,21 @@ public List<string> KeyWord { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 鎺掑簭鐮� /// </summary> public int SortCode { get; set; } diff --git a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsExchangerCoefficientVmo.cs b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorCoefficientVmo.cs similarity index 72% rename from Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsExchangerCoefficientVmo.cs rename to Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorCoefficientVmo.cs index 7d85a09..016aff9 100644 --- a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsExchangerCoefficientVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorCoefficientVmo.cs @@ -8,6 +8,11 @@ public long ID { get; set; } /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + + /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } @@ -26,5 +31,10 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } + + /// <summary> + /// 姘村ご鎹熷け鏇茬嚎 + /// </summary> + public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainVmo.cs b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainVmo.cs index c1684c2..48d2a34 100644 --- a/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/12-Compressor/AssetsCompressorMainVmo.cs @@ -30,6 +30,21 @@ public double MinorLoss { get; set; } /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> /// 璇嗗埆鍏抽敭瀛� /// </summary> public List<string> KeyWord { get; set; } diff --git a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs index 94f1772..a72a29b 100644 --- a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs @@ -2,52 +2,60 @@ { /// <summary> /// 姘存睜绯绘暟 - ///</summary> + ///</summary> public class AssetsTankCoefficientVmo { - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientVmo() { } + /// <summary> + /// + /// </summary> + public AssetsTankCoefficientVmo() + { } - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientVmo(Dto.AssetsTankCoefficientDto rhs) - { - this.ID=rhs.ID; - this.Name=rhs.Name; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - } + /// <summary> + /// + /// </summary> + public AssetsTankCoefficientVmo(Dto.AssetsTankCoefficientDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + } /// <summary> /// ID - ///</summary> + ///</summary> public long ID { get; set; } - + + /// <summary> + /// 鍨嬪彿ID + /// </summary> + public long MainID { get; set; } + /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } - + /// <summary> /// 鍙e緞 - ///</summary> + ///</summary> public double? Caliber { get; set; } - + /// <summary> /// 鏉愭枡 - ///</summary> + ///</summary> public string Material { get; set; } - + /// <summary> /// 灞�闃荤郴鏁� - ///</summary> + ///</summary> public double MinorLoss { get; set; } - - - } -} + /// <summary> + /// 瀹圭Н鏇茬嚎 + /// </summary> + public string VolCurve { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.Designer.cs index 882473e..e2db501 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.Designer.cs @@ -54,6 +54,8 @@ dockPanel1 = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); TankTreeListCtrl1 = new TankTreeListCtrl(); + barBtnValveLine = new DevExpress.XtraBars.BarButtonItem(); + barBtnTankChart = new DevExpress.XtraBars.BarButtonItem(); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)svgImageCollection1).BeginInit(); sidePanel1.SuspendLayout(); @@ -70,9 +72,9 @@ ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.True; ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, BarBtnEidtPumpPart, barBtnSetCoefficient }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, BarBtnEidtPumpPart, barBtnSetCoefficient, barBtnTankChart }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 25; + ribbonControl1.MaxItemId = 26; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; @@ -137,6 +139,7 @@ // ribbonPageGroup2 // ribbonPageGroup2.ItemLinks.Add(barBtnSetCoefficient); + ribbonPageGroup2.ItemLinks.Add(barBtnTankChart); ribbonPageGroup2.Name = "ribbonPageGroup2"; ribbonPageGroup2.Text = "鏇村"; // @@ -270,6 +273,20 @@ TankTreeListCtrl1.Size = new Size(193, 491); TankTreeListCtrl1.TabIndex = 0; // + // barBtnValveLine + // + barBtnValveLine.Caption = "闃�闂ㄦ洸绾�"; + barBtnValveLine.Id = 22; + barBtnValveLine.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnValveLine.ImageOptions.SvgImage"); + barBtnValveLine.Name = "barBtnValveLine"; + // + // barBtnTankChart + // + barBtnTankChart.Caption = "barButtonItem1"; + barBtnTankChart.Id = 25; + barBtnTankChart.Name = "barBtnTankChart"; + barBtnTankChart.ItemClick += barBtnTankChart_ItemClick; + // // TankManageMainPage // Appearance.BackColor = SystemColors.Control; @@ -319,5 +336,7 @@ private DevExpress.XtraBars.BarButtonItem barBtnSetCoefficient; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; + private DevExpress.XtraBars.BarButtonItem barBtnTankChart; + private DevExpress.XtraBars.BarButtonItem barBtnValveLine; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.cs index cb57e49..3c1f215 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.cs @@ -124,5 +124,37 @@ dlg.SetBindingData(); dlg.ShowDialog(); } + + //鏇茬嚎 + private async void barBtnTankChart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (currentVm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + var guid = new PageGuid() + { + Function = "闃�闂ㄦ按澶存崯澶辨洸绾�", + TagName = currentVm.ID.ToString(), + Modular = "" + }; + if (!IsExistPage(guid, true)) + { + var model = await _bll.GetByID(currentVm.ID); + if (model == null) + { + MessageBoxHelper.ShowWarning($"{currentVm.Name}:AssetsValveMainDto is null锛�"); + return; + } + var page = new HStation.WinFrmUI.PhartRelation.XhsValveMainPhartPanel(); + page.InitialDataSource(currentVm.ID); + guid.Function = "闃�闂ㄦ按澶存崯澶辨洸绾�"; + page.PageTitle.Caption = guid.Function; + page.PageGuid = guid; + CreatePage(page, guid); + } + } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.resx index 14e4919..924820c 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/BluntheadManageMainPage.resx @@ -216,12 +216,41 @@ </value> </data> <metadata name="svgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>279, 17</value> + <value>249, 17</value> </metadata> - <metadata name="BluntheadViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="TankViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>455, 17</value> + <value>425, 17</value> </metadata> + <data name="barBtnValveLine.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku + Qmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9CgkuWWVsbG93e2ZpbGw6I0ZG + QjExNTt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk + aXNwbGF5OmlubGluZTtmaWxsOiMxMTc3RDc7fQoJLnN0NHtkaXNwbGF5OmlubGluZTtmaWxsOiM3Mjcy + NzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iU3BhcmtsaW5lTGluZSI+DQogICAgPHBhdGggZD0iTTI3LDhj + LTEuNywwLTMsMS4zLTMsM2MwLDAuNSwwLjEsMC45LDAuMywxLjNsLTYsNkMxNy45LDE4LjEsMTcuNSwx + OCwxNywxOHMtMC45LDAuMS0xLjMsMC4zbC0yLTIgICBjMC4yLTAuNCwwLjMtMC44LDAuMy0xLjNjMC0x + LjctMS4zLTMtMy0zcy0zLDEuMy0zLDNjMCwwLjUsMC4xLDAuOSwwLjMsMS4zbC0yLDJDNS45LDE4LjEs + NS41LDE4LDUsMThjLTEuNywwLTMsMS4zLTMsM3MxLjMsMywzLDMgICBzMy0xLjMsMy0zYzAtMC41LTAu + MS0wLjktMC4zLTEuM2wyLTJjMC40LDAuMiwwLjgsMC4zLDEuMywwLjNzMC45LTAuMSwxLjMtMC4zbDIs + MkMxNC4xLDIwLjEsMTQsMjAuNSwxNCwyMWMwLDEuNywxLjMsMywzLDMgICBzMy0xLjMsMy0zYzAtMC41 + LTAuMS0wLjktMC4zLTEuM2w2LTZjMC40LDAuMiwwLjgsMC4zLDEuMywwLjNjMS43LDAsMy0xLjMsMy0z + UzI4LjcsOCwyNyw4eiBNNSwyMmMtMC42LDAtMS0wLjQtMS0xczAuNC0xLDEtMSAgIHMxLDAuNCwxLDFT + NS42LDIyLDUsMjJ6IE0xMSwxNmMtMC42LDAtMS0wLjQtMS0xczAuNC0xLDEtMXMxLDAuNCwxLDFTMTEu + NiwxNiwxMSwxNnogTTE3LDIyYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xczEsMC40LDEsMSAgIFMx + Ny42LDIyLDE3LDIyeiBNMjcsMTJjLTAuNiwwLTEtMC40LTEtMXMwLjQtMSwxLTFzMSwwLjQsMSwxUzI3 + LjYsMTIsMjcsMTJ6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs index 58d931b..253e4c1 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs @@ -103,6 +103,86 @@ IsMaching = true; } } + //鍠峰ご鍖归厤 + foreach (var item in assetsAutoMatchingView.Nozzles) + { + if (MatchingSprinkler(item, allSprinkler)) + { + IsMaching = true; + } + } + //闂峰ご鍖归厤 + foreach (var item in assetsAutoMatchingView.Bluntheads) + { + if (MatchingBlunthead(item, allBluntheadMain)) + { + IsMaching = true; + } + } + //鎹㈢儹鍣ㄥ尮閰� + foreach (var item in assetsAutoMatchingView.Exchangers) + { + if (MatchingExchanger(item, allExchanger)) + { + IsMaching = true; + } + } + //鍘嬬缉鏈哄尮閰� + foreach (var item in assetsAutoMatchingView.Compressors) + { + if (MatchingCompressor(item, allCompressorMain)) + { + IsMaching = true; + } + } + //姘存睜鍖归厤 + foreach (var item in assetsAutoMatchingView.Tanks) + { + if (MatchingTank(item, allTankMain)) + { + IsMaching = true; + } + } + //姘磋〃鍖归厤 + foreach (var item in assetsAutoMatchingView.Meters) + { + if (MatchingMeter(item, allMeterMain)) + { + IsMaching = true; + } + } + //娴侀噺璁″尮閰� + foreach (var item in assetsAutoMatchingView.Flowmeters) + { + if (MatchingFlowmeter(item, allFlowmeterMain)) + { + IsMaching = true; + } + } + //娑堢伀鏍撳尮閰� + foreach (var item in assetsAutoMatchingView.Hydrants) + { + if (MatchingHydrant(item, allHydrantMain)) + { + IsMaching = true; + } + } + //鍘嬪姏琛ㄥ尮閰� + foreach (var item in assetsAutoMatchingView.Pressmeters) + { + if (MatchingPressmeter(item, allPressmeterMain)) + { + IsMaching = true; + } + } + //杩囨浮浠跺尮閰� + foreach (var item in assetsAutoMatchingView.Translations) + { + if (MatchingTranslation(item, allTranslationMain)) + { + IsMaching = true; + } + } } catch (Exception ex) { @@ -708,6 +788,682 @@ return false; } + //鍠峰ご鍖归厤 + public static bool MatchingSprinkler(HydroNozzleMatchingViewModel input, List<Vmo.AssetsSprinklerMainVmo> sprinklerVmos) + { + if (sprinklerVmos == null) + { + return true; + } + Vmo.AssetsSprinklerMainVmo vmo = null; + var nameMatching = sprinklerVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = sprinklerVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = sprinklerVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = sprinklerVmos.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = sprinklerVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = sprinklerVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //鎹㈢儹鍣ㄥ尮閰� + public static bool MatchingExchanger(HydroExchangerMatchingViewModel input, List<Vmo.AssetsExchangerMainVmo> exchangerVmos) + { + if (exchangerVmos == null) + { + return true; + } + Vmo.AssetsExchangerMainVmo vmo = null; + var nameMatching = exchangerVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = exchangerVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = exchangerVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = exchangerVmos.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = exchangerVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = exchangerVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //绌哄帇鏈哄尮閰� + public static bool MatchingCompressor(HydroCompressorMatchingViewModel input, List<Vmo.AssetsCompressorMainVmo> compressorVmos) + { + if (compressorVmos == null) + { + return true; + } + Vmo.AssetsCompressorMainVmo vmo = null; + var nameMatching = compressorVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = compressorVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = compressorVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = compressorVmos.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = compressorVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = compressorVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //闂峰ご鍖归厤 + public static bool MatchingBlunthead(HydroBluntheadMatchingViewModel input, List<Vmo.AssetsBluntheadMainVmo> bluntheadVmos) + { + if (bluntheadVmos == null) + { + return true; + } + Vmo.AssetsBluntheadMainVmo vmo = null; + var nameMatching = bluntheadVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = bluntheadVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = bluntheadVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = bluntheadVmos.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = bluntheadVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = bluntheadVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //姘存睜鍖归厤 + public static bool MatchingTank(HydroTankMatchingViewModel input, List<Vmo.AssetsTankMainVmo> tankVmos) + { + if (tankVmos == null) + { + return true; + } + Vmo.AssetsTankMainVmo vmo = null; + var nameMatching = tankVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var defaultList = nameMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = tankVmos.First(); + } + else if (defaultList.Count < 0) + { + vmo = tankVmos.First(); + } + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + vmo = tankVmos.First(); + if (vmo != null) + { + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingModelType = vmo.Name; + // input.mat + return true; + } + return false; + } + + //姘磋〃鍖归厤 + public static bool MatchingMeter(HydroMeterMatchingViewModel input, List<Vmo.AssetsMeterMainVmo> MeterMainVmos) + { + Vmo.AssetsMeterMainVmo vmo = null; + if (MeterMainVmos == null) + { + return true; + } + var nameMatching = MeterMainVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� + .OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + if (nameMatching.Count > 1) + { + var defaultList = nameMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = MeterMainVmos.First(); + } + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + vmo = MeterMainVmos.First(); + + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //娴侀噺璁″尮閰� + public static bool MatchingFlowmeter(HydroFlowmeterMatchingViewModel input, List<Vmo.AssetsFlowmeterMainVmo> FlowmeterMainVmos) + { + if (FlowmeterMainVmos == null) + { + return true; + } + Vmo.AssetsFlowmeterMainVmo vmo = null; + var nameMatching = FlowmeterMainVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var defaultList = nameMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = FlowmeterMainVmos.First(); + } + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + vmo = FlowmeterMainVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //娑堢伀鏍撳尮閰� + public static bool MatchingHydrant(HydroHydrantMatchingViewModel input, List<Vmo.AssetsHydrantMainVmo> hydrantVmos) + { + if (hydrantVmos == null) + { + return true; + } + Vmo.AssetsHydrantMainVmo vmo = null; + var nameMatching = hydrantVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = hydrantVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = hydrantVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = hydrantVmos.Where(i => + ((i.Caliber == null || input.Caliber == null) || Math.Abs(Convert.ToInt64(i.Caliber) - Convert.ToInt64(input.Caliber)) <= _caliberTolerance) && //鐩村緞绾︽潫 + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = hydrantVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = hydrantVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //鍘嬪姏琛ㄥ尮閰� + public static bool MatchingPressmeter(HydroPressmeterMatchingViewModel input, List<Vmo.AssetsPressmeterMainVmo> pressmeterVmos) + { + if (pressmeterVmos == null) + { + return true; + } + Vmo.AssetsPressmeterMainVmo vmo = null; + var nameMatching = pressmeterVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var defaultList = nameMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = pressmeterVmos.First(); + } + else if (defaultList.Count < 0) + { + vmo = pressmeterVmos.First(); + } + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + vmo = pressmeterVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + + //杩囨浮浠跺尮閰� + public static bool MatchingTranslation(HydroTranslationMatchingViewModel input, List<Vmo.AssetsTranslationMainVmo> translationVmos) + { + if (translationVmos == null) + { + return true; + } + Vmo.AssetsTranslationMainVmo vmo = null; + var nameMatching = translationVmos.Where(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� +.OrderByDescending(x => + (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + + if (nameMatching.Count > 1) + { + var absoluteMatching = nameMatching.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = translationVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = translationVmos.First(); + } + else if (nameMatching.Count == 1) + { + vmo = nameMatching.First(); + } + else + { + var absoluteMatching = translationVmos.Where(i => + i.Material == input.Material //鏉愭枡绾︽潫 + ).ToList(); + if (absoluteMatching.Count > 1) + { + var defaultList = absoluteMatching.Where(x => x.Flags.Contains("榛樿鍊�")).ToList(); + //鍙栭粯璁� + if (defaultList.Count > 0) + { + vmo = defaultList.First(); + } + else if (defaultList.Count < 0) + { + vmo = translationVmos.First(); + } + } + else if (absoluteMatching.Count == 1) + { + vmo = absoluteMatching.First(); + } + else + vmo = translationVmos.First(); + } + if (vmo != null) + { + input.MatchingMinorLoss = vmo.MinorLoss; + input.MatchingDbId = vmo.ID.ToString(); + input.MatchingMaterial = vmo.Material; + input.MatchingModelType = vmo.Name; + return true; + } + return false; + } + /// <summary> /// 鑾峰彇涓や釜瀛楃涓茬殑鎵�鏈変氦闆� /// </summary> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs index 3e54c6c..645d6ba 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveChartShowDlg.cs @@ -63,5 +63,13 @@ this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); } } + + //鍒濆鍖栧浘琛ㄦ暟鎹� + public void InitChart(string curveStr) + { + this.xtrPerform2dchart1.SetBindingData(curveStr, null); + + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); + } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingForm.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingForm.cs index c765f4e..f269a17 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingForm.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingForm.cs @@ -32,7 +32,7 @@ private BLL.AssetsValveMain _valveBll = null; private List<PhartViewModel> _allPhartList = null; - private readonly Lazy<BLL.XhsValveMainPhartMappingExtensions> _bll_ex = new(); + private readonly Lazy<BLL.AssetsValveCoefficient> _bll_ex = new(); private HydroValveMatchingViewModel _pumpMatchingViewModel; @@ -88,12 +88,12 @@ _pumpMatchingViewModel.MatchingMaterial = vm.Material; _pumpMatchingViewModel.MatchingValveType = (eValveType?)vm.SeriesType; _pumpMatchingViewModel.MatchingValveSetting = vm.ValveSetting; - var list = await _bll_ex.Value.GetByValveMainID(vm.ID); + var list = await _bll_ex.Value.GetByMainID(vm.ID); if (list != null && list.Any()) { foreach (var item in list) { - _allPhartList.Add(new PhartViewModel { ID = item.ID, OtherName = item.OtherName, Importance = item.Importance, SortCode = item.SortCode }); + _allPhartList.Add(new PhartViewModel { ID = item.ID }); } } } @@ -122,7 +122,7 @@ if (vmo != null) { var dlg = new ValveChartShowDlg(); - dlg.InitChart(vmo); + dlg.InitChart(vmo.OpenLossCurve); dlg.ShowDialog(); } return; @@ -139,26 +139,8 @@ if (vmo != null) { _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); - var graph_ql = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveQL); - var graph_ol = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ValveOL); - if (graph_ql != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveQL = _currentCurvePoint; - } - if (graph_ol != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveOL = _currentCurvePoint; - } + + _pumpMatchingViewModel.MatchingCurveQL = _currentCurvePoint; } } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.Designer.cs index ad937de..5d2e61d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.Designer.cs @@ -42,13 +42,13 @@ xtrPerform2dchart1.Size = new Size(686, 459); xtrPerform2dchart1.TabIndex = 0; // - // ValveChartShowDlg + // TankChartShowDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(686, 459); Controls.Add(xtrPerform2dchart1); - Name = "ValveChartShowDlg"; + Name = "TankChartShowDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "灞曠ず鏇茬嚎"; ResumeLayout(false); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.cs index 1c4638e..68257c5 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankChartShowDlg.cs @@ -10,58 +10,66 @@ this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } + /* //鍒濆鍖栧浘琛ㄦ暟鎹� + public void InitChart(Vmo.XhsTankMainPhartMappingExtensions dto) + { + if (dto == null) + { + return; + } + var diagram = dto.Diagram; + if (diagram == null) + { + return; + } + var graph_list = diagram.GraphList; + if (graph_list == null || !graph_list.Any()) + { + return; + } + + var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankQL); + var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankOL); + if (graph_ql == null && graph_ol == null) + { + return; + } + + List<Yw.Geometry.Point2d> points_ql = null; + if (graph_ql != null) + points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); + + List<Yw.Geometry.Point2d> points_ol = null; + if (graph_ol != null) + points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); + Yw.Geometry.CubicSpline2d cubic_spline = null; + if (points_ql != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); + } + if (points_ol != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); + } + var disp_paras = diagram.DispParas; + var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); + this.xtrPerform2dchart1.SetBindingData(cubic_spline.ToDbString(), disp_paras, is_calc_disp_paras); + if (graph_ol != null) + { + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); + } + else + { + this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); + } + }*/ + //鍒濆鍖栧浘琛ㄦ暟鎹� - public void InitChart(/*Vmo.XhsTankMainPhartMappingExtensions dto*/) + public void InitChart(string curveStr) { - /* if (dto == null) - { - return; - } - var diagram = dto.Diagram; - if (diagram == null) - { - return; - } - var graph_list = diagram.GraphList; - if (graph_list == null || !graph_list.Any()) - { - return; - } + this.xtrPerform2dchart1.SetBindingData(curveStr, null); - var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankQL); - var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankOL); - if (graph_ql == null && graph_ol == null) - { - return; - } - - List<Yw.Geometry.Point2d> points_ql = null; - if (graph_ql != null) - points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); - - List<Yw.Geometry.Point2d> points_ol = null; - if (graph_ol != null) - points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); - Yw.Geometry.CubicSpline2d cubic_spline = null; - if (points_ql != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); - } - if (points_ol != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); - } - var disp_paras = diagram.DispParas; - var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); - this.xtrPerform2dchart1.SetBindingData(cubic_spline, disp_paras, is_calc_disp_paras); - if (graph_ol != null) - { - this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); - } - else - { - this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); - }*/ + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingCtrl.cs index c23198f..dd857ef 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingCtrl.cs @@ -24,7 +24,7 @@ { public long? Dbid { get; set; } public long? Curveid { get; set; } - // public Vmo.XhsTankMainPhartMappingExtensions Curveinfo { get; set; } + // public Vmo.XhsTankMainPhartMappingExtensions Curveinfo { get; set; } } private List<TankSingleMatchingViewModel> _allBindingList = null; @@ -32,7 +32,7 @@ private BLL.AssetsTankMain _TankBll = null; private List<PhartViewModel> _allPhartList = null; - // private readonly Lazy<BLL.XhsTankMainPhartMappingExtensions> _bll_ex = new(); + private readonly Lazy<BLL.AssetsTankCoefficient> _bll_ex = new(); private HydroTankMatchingViewModel _pumpMatchingViewModel; @@ -66,27 +66,22 @@ //闃�闂ㄥ瀷鍙峰垪琛ㄩ�夋嫨椤瑰垏鎹簨浠� private async void gridView2_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { - /*_allPhartList = new List<PhartViewModel>(); + _allPhartList = new List<PhartViewModel>(); var vm = this.gridView3.GetCurrentViewModel(_allBindingList); if (vm != null) { - if (vm.SeriesType == HStation.Assets.eTankType.GPV || vm.SeriesType == HStation.Assets.eTankType.TCV) - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - } - else - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - } _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); - - var list = await _bll_ex.Value.GetByTankMainID(vm.ID); + /* _pumpMatchingViewModel.MatchingMinorLoss = vm.Coefficient; + _pumpMatchingViewModel.MatchingMaterial = vm.Material; + _pumpMatchingViewModel.MatchingTankType = (eTankType?)vm.SeriesType; + _pumpMatchingViewModel.MatchingTankSetting = vm.TankSetting;*/ + var list = await _bll_ex.Value.GetByMainID(vm.ID); if (list != null && list.Any()) { foreach (var item in list) { - _allPhartList.Add(new PhartViewModel { ID = item.ID, OtherName = item.OtherName, Importance = item.Importance, SortCode = item.SortCode }); + _allPhartList.Add(new PhartViewModel { ID = item.ID }); } } } @@ -101,58 +96,38 @@ } } this.gridControl1.DataSource = _allPhartList; - this.gridView1.FocusInvalidRow();*/ + this.gridView1.FocusInvalidRow(); } //鏌ョ湅鏇茬嚎 private async void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { - /* if (e.Column == this.ColShowChart) - { - var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + if (e.Column == this.ColShowChart) + { + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - var dlg = new TankChartShowDlg(); - dlg.InitChart(vmo); - dlg.ShowDialog(); - } - return; - }*/ + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + var dlg = new TankChartShowDlg(); + dlg.InitChart(vmo.VolCurve); + dlg.ShowDialog(); + } + return; + } } private async void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { - /* var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - _currentCurvePoint.Clear(); - if (vm == null) - return; - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); - var graph_ql = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankQL); - var graph_ol = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.TankOL); - if (graph_ql != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveQL = _currentCurvePoint; - } - if (graph_ol != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveOL = _currentCurvePoint; - } - }*/ + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + _currentCurvePoint.Clear(); + if (vm == null) + return; + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); + } } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingDlg.cs index 3b2f2c9..e3cf5d2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingDlg.cs @@ -21,26 +21,23 @@ //纭畾 private void btnComplete_Click(object sender, EventArgs e) { - /* if (_TankMatchingView.MatchingDbId == null || _TankMatchingView.MatchingDbId == string.Empty) + if (_TankMatchingView.MatchingDbId == null || _TankMatchingView.MatchingDbId == string.Empty) { TipFormHelper.ShowError("闃�闂ㄥ瀷鍙烽�夋嫨閿欒"); return; } - if ((int)_TankMatchingView.MatchingTankType == (int)HStation.Assets.eTankType.TCV || (int)_TankMatchingView.MatchingTankType == (int)HStation.Assets.eTankType.GPV) + + if (_TankMatchingView.MatchingCurveDbId == null || _TankMatchingView.MatchingCurveDbId == string.Empty) { - if (_TankMatchingView.MatchingCurveDbId == null || _TankMatchingView.MatchingCurveDbId == string.Empty) - { - TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); - return; - } + TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); + return; } else { - _TankMatchingView.MatchingCurveOL = null; - _TankMatchingView.MatchingCurveQL = null; + _TankMatchingView.MatchingVolCurve = null; } ReloadDataEvent.Invoke(_TankMatchingView); - this.Close();*/ + this.Close(); } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingViewModel.cs index ffe9bc7..762c0af 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/09-Tank/TankSingleMatchingViewModel.cs @@ -56,13 +56,6 @@ public string Description { get; set; } /// <summary> - /// 闃�闂ㄥ紑搴� - /// </summary> - [DisplayName("闃�闂ㄥ紑搴�")] - [Browsable(true)] - public int? TankLift { get; set; } - - /// <summary> /// 鎺掑簭鐮� /// </summary> [DisplayName("鎺掑簭鐮�")] @@ -96,5 +89,12 @@ [DisplayName("鍏抽敭瀛�")] [Browsable(true)] public string KeyWord { get; set; } + + /// <summary> + /// 闃�闂ㄨ缃� + /// </summary> + [DisplayName("闃�闂ㄨ缃�")] + [Browsable(true)] + public string TankSetting { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.Designer.cs index d243d44..2bedf89 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.Designer.cs @@ -42,13 +42,13 @@ xtrPerform2dchart1.Size = new Size(686, 459); xtrPerform2dchart1.TabIndex = 0; // - // ValveChartShowDlg + // TankChartShowDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(686, 459); Controls.Add(xtrPerform2dchart1); - Name = "ValveChartShowDlg"; + Name = "TankChartShowDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "灞曠ず鏇茬嚎"; ResumeLayout(false); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.cs index edf8d9c..588d7bb 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorChartShowDlg.cs @@ -10,58 +10,66 @@ this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } + /* //鍒濆鍖栧浘琛ㄦ暟鎹� + public void InitChart(Vmo.XhsCompressorMainPhartMappingExtensions dto) + { + if (dto == null) + { + return; + } + var diagram = dto.Diagram; + if (diagram == null) + { + return; + } + var graph_list = diagram.GraphList; + if (graph_list == null || !graph_list.Any()) + { + return; + } + + var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorQL); + var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorOL); + if (graph_ql == null && graph_ol == null) + { + return; + } + + List<Yw.Geometry.Point2d> points_ql = null; + if (graph_ql != null) + points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); + + List<Yw.Geometry.Point2d> points_ol = null; + if (graph_ol != null) + points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); + Yw.Geometry.CubicSpline2d cubic_spline = null; + if (points_ql != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); + } + if (points_ol != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); + } + var disp_paras = diagram.DispParas; + var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); + this.xtrPerform2dchart1.SetBindingData(cubic_spline.ToDbString(), disp_paras, is_calc_disp_paras); + if (graph_ol != null) + { + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); + } + else + { + this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); + } + }*/ + //鍒濆鍖栧浘琛ㄦ暟鎹� - public void InitChart(/*Vmo.XhsCompressorMainPhartMappingExtensions dto*/) + public void InitChart(string curveStr) { - /* if (dto == null) - { - return; - } - var diagram = dto.Diagram; - if (diagram == null) - { - return; - } - var graph_list = diagram.GraphList; - if (graph_list == null || !graph_list.Any()) - { - return; - } + this.xtrPerform2dchart1.SetBindingData(curveStr, null); - var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorQL); - var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorOL); - if (graph_ql == null && graph_ol == null) - { - return; - } - - List<Yw.Geometry.Point2d> points_ql = null; - if (graph_ql != null) - points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); - - List<Yw.Geometry.Point2d> points_ol = null; - if (graph_ol != null) - points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); - Yw.Geometry.CubicSpline2d cubic_spline = null; - if (points_ql != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); - } - if (points_ol != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); - } - var disp_paras = diagram.DispParas; - var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); - this.xtrPerform2dchart1.SetBindingData(cubic_spline, disp_paras, is_calc_disp_paras); - if (graph_ol != null) - { - this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); - } - else - { - this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); - }*/ + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingCtrl.cs index b2625c0..c6ead10 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingCtrl.cs @@ -24,7 +24,7 @@ { public long? Dbid { get; set; } public long? Curveid { get; set; } - // public Vmo.XhsCompressorMainPhartMappingExtensions Curveinfo { get; set; } + // public Vmo.XhsCompressorMainPhartMappingExtensions Curveinfo { get; set; } } private List<CompressorSingleMatchingViewModel> _allBindingList = null; @@ -32,7 +32,7 @@ private BLL.AssetsCompressorMain _CompressorBll = null; private List<PhartViewModel> _allPhartList = null; - //private readonly Lazy<BLL.XhsCompressorMainPhartMappingExtensions> _bll_ex = new(); + private readonly Lazy<BLL.AssetsCompressorCoefficient> _bll_ex = new(); private HydroCompressorMatchingViewModel _pumpMatchingViewModel; @@ -66,93 +66,68 @@ //闃�闂ㄥ瀷鍙峰垪琛ㄩ�夋嫨椤瑰垏鎹簨浠� private async void gridView2_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { - /* _allPhartList = new List<PhartViewModel>(); - var vm = this.gridView3.GetCurrentViewModel(_allBindingList); - if (vm != null) - { - if (vm.SeriesType == HStation.Assets.eCompressorType.GPV || vm.SeriesType == HStation.Assets.eCompressorType.TCV) - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - } - else - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - } - _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); - _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); - - var list = await _bll_ex.Value.GetByCompressorMainID(vm.ID); - if (list != null && list.Any()) - { - foreach (var item in list) - { - _allPhartList.Add(new PhartViewModel { ID = item.ID, OtherName = item.OtherName, Importance = item.Importance, SortCode = item.SortCode }); - } - } - } - if (_pumpMatchingViewModel.MatchingCurveDbId != null) - { - for (int i = 0; i < _allPhartList.Count; i++) - { - if (_allBindingList[i].ID.ToString() == _pumpMatchingViewModel.MatchingCurveDbId) - { - gridView1.FocusedRowHandle = i; - } - } - } - this.gridControl1.DataSource = _allPhartList; - this.gridView1.FocusInvalidRow();*/ + _allPhartList = new List<PhartViewModel>(); + var vm = this.gridView3.GetCurrentViewModel(_allBindingList); + if (vm != null) + { + _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); + _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); + /* _pumpMatchingViewModel.MatchingMinorLoss = vm.Coefficient; + _pumpMatchingViewModel.MatchingMaterial = vm.Material; + _pumpMatchingViewModel.MatchingCompressorType = (eCompressorType?)vm.SeriesType; + _pumpMatchingViewModel.MatchingCompressorSetting = vm.CompressorSetting;*/ + var list = await _bll_ex.Value.GetByMainID(vm.ID); + if (list != null && list.Any()) + { + foreach (var item in list) + { + _allPhartList.Add(new PhartViewModel { ID = item.ID }); + } + } + } + if (_pumpMatchingViewModel.MatchingCurveDbId != null) + { + for (int i = 0; i < _allPhartList.Count; i++) + { + if (_allBindingList[i].ID.ToString() == _pumpMatchingViewModel.MatchingCurveDbId) + { + gridView1.FocusedRowHandle = i; + } + } + } + this.gridControl1.DataSource = _allPhartList; + this.gridView1.FocusInvalidRow(); } //鏌ョ湅鏇茬嚎 private async void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { - /* if (e.Column == this.ColShowChart) - { - var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + if (e.Column == this.ColShowChart) + { + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - var dlg = new CompressorChartShowDlg(); - dlg.InitChart(vmo); - dlg.ShowDialog(); - } - return; - }*/ + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + var dlg = new CompressorChartShowDlg(); + dlg.InitChart(vmo.MinorLossCurve); + dlg.ShowDialog(); + } + return; + } } private async void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { - /* var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - _currentCurvePoint.Clear(); - if (vm == null) - return; - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); - var graph_ql = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorQL); - var graph_ol = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.CompressorOL); - if (graph_ql != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveQL = _currentCurvePoint; - } - if (graph_ol != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveOL = _currentCurvePoint; - } - }*/ + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + _currentCurvePoint.Clear(); + if (vm == null) + return; + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); + } } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.cs deleted file mode 100644 index 89d1533..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.cs +++ /dev/null @@ -1,46 +0,0 @@ -锘縩amespace HStation.WinFrmUI -{ - public partial class CompressorSingleMatchingDlg : DevExpress.XtraEditors.XtraForm - { - public CompressorSingleMatchingDlg() - { - InitializeComponent(); - this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - } - - public event Action<HydroCompressorMatchingViewModel> ReloadDataEvent; - - private HydroCompressorMatchingViewModel _CompressorMatchingView = null; - - public void SetBindingData(HydroCompressorMatchingViewModel CompressorMatchingViewModel) - { - this.xtraUserControl11.SetBindingData(CompressorMatchingViewModel); - _CompressorMatchingView = CompressorMatchingViewModel; - } - - //纭畾 - private void btnComplete_Click(object sender, EventArgs e) - { - /* if (_CompressorMatchingView.MatchingDbId == null || _CompressorMatchingView.MatchingDbId == string.Empty) - { - TipFormHelper.ShowError("闃�闂ㄥ瀷鍙烽�夋嫨閿欒"); - return; - } - if ((int)_CompressorMatchingView.MatchingCompressorType == (int)HStation.Assets.eCompressorType.TCV || (int)_CompressorMatchingView.MatchingCompressorType == (int)HStation.Assets.eCompressorType.GPV) - { - if (_CompressorMatchingView.MatchingCurveDbId == null || _CompressorMatchingView.MatchingCurveDbId == string.Empty) - { - TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); - return; - } - } - else - { - _CompressorMatchingView.MatchingCurveOL = null; - _CompressorMatchingView.MatchingCurveQL = null; - } - ReloadDataEvent.Invoke(_CompressorMatchingView); - this.Close();*/ - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.cs new file mode 100644 index 0000000..93e249d --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.cs @@ -0,0 +1,43 @@ +锘縩amespace HStation.WinFrmUI +{ + public partial class CompressorSingleMatchingDlg : DevExpress.XtraEditors.XtraForm + { + public CompressorSingleMatchingDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + public event Action<HydroCompressorMatchingViewModel> ReloadDataEvent; + + private HydroCompressorMatchingViewModel _CompressorMatchingView = null; + + public void SetBindingData(HydroCompressorMatchingViewModel CompressorMatchingViewModel) + { + this.xtraUserControl11.SetBindingData(CompressorMatchingViewModel); + _CompressorMatchingView = CompressorMatchingViewModel; + } + + //纭畾 + private void btnComplete_Click(object sender, EventArgs e) + { + if (_CompressorMatchingView.MatchingDbId == null || _CompressorMatchingView.MatchingDbId == string.Empty) + { + TipFormHelper.ShowError("闃�闂ㄥ瀷鍙烽�夋嫨閿欒"); + return; + } + + if (_CompressorMatchingView.MatchingCurveDbId == null || _CompressorMatchingView.MatchingCurveDbId == string.Empty) + { + TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); + return; + } + else + { + _CompressorMatchingView.MatchingCurveQL = null; + } + ReloadDataEvent.Invoke(_CompressorMatchingView); + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingViewModel.cs similarity index 95% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingViewModel.cs index 21ebfb4..9748010 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/CompressorSingleMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/17-compressor/TankSingleMatchingViewModel.cs @@ -56,13 +56,6 @@ public string Description { get; set; } /// <summary> - /// 闃�闂ㄥ紑搴� - /// </summary> - [DisplayName("闃�闂ㄥ紑搴�")] - [Browsable(true)] - public int? CompressorLift { get; set; } - - /// <summary> /// 鎺掑簭鐮� /// </summary> [DisplayName("鎺掑簭鐮�")] @@ -96,5 +89,12 @@ [DisplayName("鍏抽敭瀛�")] [Browsable(true)] public string KeyWord { get; set; } + + /// <summary> + /// 闃�闂ㄨ缃� + /// </summary> + [DisplayName("闃�闂ㄨ缃�")] + [Browsable(true)] + public string CompressorSetting { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.Designer.cs similarity index 96% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.Designer.cs index 5c92feb..ddc2283 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.Designer.cs @@ -42,13 +42,13 @@ xtrPerform2dchart1.Size = new Size(686, 459); xtrPerform2dchart1.TabIndex = 0; // - // ValveChartShowDlg + // TankChartShowDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(686, 459); Controls.Add(xtrPerform2dchart1); - Name = "ValveChartShowDlg"; + Name = "TankChartShowDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "灞曠ず鏇茬嚎"; ResumeLayout(false); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.cs new file mode 100644 index 0000000..38f7912 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.cs @@ -0,0 +1,75 @@ +锘縰sing HStation.WinFrmUI.PhartRelation; + +namespace HStation.WinFrmUI.Xhs +{ + public partial class ExchangerChartShowDlg : DevExpress.XtraEditors.XtraForm + { + public ExchangerChartShowDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + /* //鍒濆鍖栧浘琛ㄦ暟鎹� + public void InitChart(Vmo.XhsExchangerMainPhartMappingExtensions dto) + { + if (dto == null) + { + return; + } + var diagram = dto.Diagram; + if (diagram == null) + { + return; + } + var graph_list = diagram.GraphList; + if (graph_list == null || !graph_list.Any()) + { + return; + } + + var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerQL); + var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerOL); + if (graph_ql == null && graph_ol == null) + { + return; + } + + List<Yw.Geometry.Point2d> points_ql = null; + if (graph_ql != null) + points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); + + List<Yw.Geometry.Point2d> points_ol = null; + if (graph_ol != null) + points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); + Yw.Geometry.CubicSpline2d cubic_spline = null; + if (points_ql != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); + } + if (points_ol != null) + { + cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); + } + var disp_paras = diagram.DispParas; + var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); + this.xtrPerform2dchart1.SetBindingData(cubic_spline.ToDbString(), disp_paras, is_calc_disp_paras); + if (graph_ol != null) + { + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); + } + else + { + this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); + } + }*/ + + //鍒濆鍖栧浘琛ㄦ暟鎹� + public void InitChart(string curveStr) + { + this.xtrPerform2dchart1.SetBindingData(curveStr, null); + + this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorChartShowDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.cs new file mode 100644 index 0000000..c0b86fe --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.cs @@ -0,0 +1,133 @@ +锘縰sing HStation.WinFrmUI.PhartRelation; +using HStation.WinFrmUI.Xhs; + +namespace HStation.WinFrmUI +{ + public partial class ExchangerSingleMatchingCtrl : DevExpress.XtraEditors.XtraUserControl + { + public ExchangerSingleMatchingCtrl() + { + InitializeComponent(); + this.gridView1.SetNormalView(); + this.gridView3.SetNormalView(); + } + + public class PhartViewModel + { + public long ID { get; set; } + public string OtherName { get; set; } + public int Importance { get; set; } + public int SortCode { get; set; } + } + + public class CurvieInfo + { + public long? Dbid { get; set; } + public long? Curveid { get; set; } + // public Vmo.XhsExchangerMainPhartMappingExtensions Curveinfo { get; set; } + } + + private List<ExchangerSingleMatchingViewModel> _allBindingList = null; + + private BLL.AssetsExchangerMain _ExchangerBll = null; + + private List<PhartViewModel> _allPhartList = null; + private readonly Lazy<BLL.AssetsExchangerCoefficient> _bll_ex = new(); + + private HydroExchangerMatchingViewModel _pumpMatchingViewModel; + + private List<HydroCurvePointViewModel> _currentCurvePoint; + + public async void SetBindingData(HydroExchangerMatchingViewModel ExchangerMatchingViewModel) + { + _pumpMatchingViewModel = ExchangerMatchingViewModel; + _allBindingList = new List<ExchangerSingleMatchingViewModel>(); + _ExchangerBll = new BLL.AssetsExchangerMain(); + var allAssetsPumpMain = await _ExchangerBll.GetAll(); + foreach (var Main in allAssetsPumpMain) + { + _allBindingList.Add(new ExchangerSingleMatchingViewModel(Main)); + } + this.ExchangerSingleMatchingViewModelBindingSource.DataSource = _allBindingList; + this.searchControl1.Text = _pumpMatchingViewModel.ModelType; + for (int i = 0; i < _allBindingList.Count; i++) + { + if (long.TryParse(ExchangerMatchingViewModel.DbId, out long dbID)) + { + if (_allBindingList[i].ID == dbID) + { + this.gridView3.FocusedRowHandle = i; + } + } + } + _currentCurvePoint = new List<HydroCurvePointViewModel>(); + } + + //闃�闂ㄥ瀷鍙峰垪琛ㄩ�夋嫨椤瑰垏鎹簨浠� + private async void gridView2_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + _allPhartList = new List<PhartViewModel>(); + var vm = this.gridView3.GetCurrentViewModel(_allBindingList); + if (vm != null) + { + _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); + _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); + /* _pumpMatchingViewModel.MatchingMinorLoss = vm.Coefficient; + _pumpMatchingViewModel.MatchingMaterial = vm.Material; + _pumpMatchingViewModel.MatchingExchangerType = (eExchangerType?)vm.SeriesType; + _pumpMatchingViewModel.MatchingExchangerSetting = vm.ExchangerSetting;*/ + var list = await _bll_ex.Value.GetByMainID(vm.ID); + if (list != null && list.Any()) + { + foreach (var item in list) + { + _allPhartList.Add(new PhartViewModel { ID = item.ID }); + } + } + } + if (_pumpMatchingViewModel.MatchingCurveDbId != null) + { + for (int i = 0; i < _allPhartList.Count; i++) + { + if (_allBindingList[i].ID.ToString() == _pumpMatchingViewModel.MatchingCurveDbId) + { + gridView1.FocusedRowHandle = i; + } + } + } + this.gridControl1.DataSource = _allPhartList; + this.gridView1.FocusInvalidRow(); + } + + //鏌ョ湅鏇茬嚎 + private async void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) + { + if (e.Column == this.ColShowChart) + { + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + var dlg = new ExchangerChartShowDlg(); + dlg.InitChart(vmo.MinorLossCurve); + dlg.ShowDialog(); + } + return; + } + } + + private async void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allPhartList); + _currentCurvePoint.Clear(); + if (vm == null) + return; + var vmo = await _bll_ex.Value.GetByID(vm.ID); + if (vmo != null) + { + _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); + } + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.resx rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/CompressorSingleMatchingCtrl.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.cs deleted file mode 100644 index 3150252..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerChartShowDlg.cs +++ /dev/null @@ -1,67 +0,0 @@ -锘縰sing HStation.WinFrmUI.PhartRelation; - -namespace HStation.WinFrmUI.Xhs -{ - public partial class ExchangerChartShowDlg : DevExpress.XtraEditors.XtraForm - { - public ExchangerChartShowDlg() - { - InitializeComponent(); - this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - } - - //鍒濆鍖栧浘琛ㄦ暟鎹� - public void InitChart(/*Vmo.XhsExchangerMainPhartMappingExtensions dto*/) - { - /* if (dto == null) - { - return; - } - var diagram = dto.Diagram; - if (diagram == null) - { - return; - } - var graph_list = diagram.GraphList; - if (graph_list == null || !graph_list.Any()) - { - return; - } - - var graph_ql = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerQL); - var graph_ol = graph_list.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerOL); - if (graph_ql == null && graph_ol == null) - { - return; - } - - List<Yw.Geometry.Point2d> points_ql = null; - if (graph_ql != null) - points_ql = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 12, null); - - List<Yw.Geometry.Point2d> points_ol = null; - if (graph_ol != null) - points_ol = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 12, null); - Yw.Geometry.CubicSpline2d cubic_spline = null; - if (points_ql != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ql); - } - if (points_ol != null) - { - cubic_spline = new Yw.Geometry.CubicSpline2d(points_ol); - } - var disp_paras = diagram.DispParas; - var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); - this.xtrPerform2dchart1.SetBindingData(cubic_spline, disp_paras, is_calc_disp_paras); - if (graph_ol != null) - { - this.xtrPerform2dchart1.SetAxisTitle("闃�闂ㄥ紑搴�", "鎹熷け绯绘暟"); - } - else - { - this.xtrPerform2dchart1.SetAxisTitle("娴侀噺(m鲁/h)", "姘存崯/m"); - }*/ - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.cs deleted file mode 100644 index 483d7d4..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingCtrl.cs +++ /dev/null @@ -1,158 +0,0 @@ -锘縰sing HStation.WinFrmUI.PhartRelation; -using HStation.WinFrmUI.Xhs; - -namespace HStation.WinFrmUI -{ - public partial class ExchangerSingleMatchingCtrl : DevExpress.XtraEditors.XtraUserControl - { - public ExchangerSingleMatchingCtrl() - { - InitializeComponent(); - this.gridView1.SetNormalView(); - this.gridView3.SetNormalView(); - } - - public class PhartViewModel - { - public long ID { get; set; } - public string OtherName { get; set; } - public int Importance { get; set; } - public int SortCode { get; set; } - } - - public class CurvieInfo - { - public long? Dbid { get; set; } - public long? Curveid { get; set; } - // public Vmo.XhsExchangerMainPhartMappingExtensions Curveinfo { get; set; } - } - - private List<ExchangerSingleMatchingViewModel> _allBindingList = null; - - private BLL.AssetsExchangerMain _ExchangerBll = null; - - private List<PhartViewModel> _allPhartList = null; - // private readonly Lazy<BLL.XhsExchangerMainPhartMappingExtensions> _bll_ex = new(); - - private HydroExchangerMatchingViewModel _pumpMatchingViewModel; - - private List<HydroCurvePointViewModel> _currentCurvePoint; - - public async void SetBindingData(HydroExchangerMatchingViewModel ExchangerMatchingViewModel) - { - _pumpMatchingViewModel = ExchangerMatchingViewModel; - _allBindingList = new List<ExchangerSingleMatchingViewModel>(); - _ExchangerBll = new BLL.AssetsExchangerMain(); - var allAssetsPumpMain = await _ExchangerBll.GetAll(); - foreach (var Main in allAssetsPumpMain) - { - _allBindingList.Add(new ExchangerSingleMatchingViewModel(Main)); - } - this.ExchangerSingleMatchingViewModelBindingSource.DataSource = _allBindingList; - this.searchControl1.Text = _pumpMatchingViewModel.ModelType; - for (int i = 0; i < _allBindingList.Count; i++) - { - if (long.TryParse(ExchangerMatchingViewModel.DbId, out long dbID)) - { - if (_allBindingList[i].ID == dbID) - { - this.gridView3.FocusedRowHandle = i; - } - } - } - _currentCurvePoint = new List<HydroCurvePointViewModel>(); - } - - //闃�闂ㄥ瀷鍙峰垪琛ㄩ�夋嫨椤瑰垏鎹簨浠� - private async void gridView2_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) - { - /*_allPhartList = new List<PhartViewModel>(); - var vm = this.gridView3.GetCurrentViewModel(_allBindingList); - if (vm != null) - { - if (vm.SeriesType == HStation.Assets.eExchangerType.GPV || vm.SeriesType == HStation.Assets.eExchangerType.TCV) - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - } - else - { - layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - } - _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); - _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); - - var list = await _bll_ex.Value.GetByExchangerMainID(vm.ID); - if (list != null && list.Any()) - { - foreach (var item in list) - { - _allPhartList.Add(new PhartViewModel { ID = item.ID, OtherName = item.OtherName, Importance = item.Importance, SortCode = item.SortCode }); - } - } - } - if (_pumpMatchingViewModel.MatchingCurveDbId != null) - { - for (int i = 0; i < _allPhartList.Count; i++) - { - if (_allBindingList[i].ID.ToString() == _pumpMatchingViewModel.MatchingCurveDbId) - { - gridView1.FocusedRowHandle = i; - } - } - } - this.gridControl1.DataSource = _allPhartList; - this.gridView1.FocusInvalidRow();*/ - } - - //鏌ョ湅鏇茬嚎 - private async void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) - { - /* if (e.Column == this.ColShowChart) - { - var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - var dlg = new ExchangerChartShowDlg(); - dlg.InitChart(vmo); - dlg.ShowDialog(); - } - return; - }*/ - } - - private async void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) - { - /* var vm = this.gridView1.GetCurrentViewModel(_allPhartList); - _currentCurvePoint.Clear(); - if (vm == null) - return; - var vmo = await _bll_ex.Value.GetByID(vm.ID); - if (vmo != null) - { - _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); - var graph_ql = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerQL); - var graph_ol = vmo.Diagram.GraphList.Find(x => x.GraphType == HStation.PhartRelation.eGraphType.ExchangerOL); - if (graph_ql != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ql.GraphType, graph_ql.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveQL = _currentCurvePoint; - } - if (graph_ol != null) - { - var points_qh = PhartPerformCurveHelper.GetFeatPointList(graph_ol.GraphType, graph_ol.GeometryInfo, 100, null); - foreach (var item in points_qh) - { - _currentCurvePoint.Add(new HydroCurvePointViewModel(item.X, item.Y)); - } - _pumpMatchingViewModel.MatchingCurveOL = _currentCurvePoint; - } - }*/ - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.cs deleted file mode 100644 index c859ca3..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.cs +++ /dev/null @@ -1,46 +0,0 @@ -锘縩amespace HStation.WinFrmUI -{ - public partial class ExchangerSingleMatchingDlg : DevExpress.XtraEditors.XtraForm - { - public ExchangerSingleMatchingDlg() - { - InitializeComponent(); - this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - } - - public event Action<HydroExchangerMatchingViewModel> ReloadDataEvent; - - private HydroExchangerMatchingViewModel _ExchangerMatchingView = null; - - public void SetBindingData(HydroExchangerMatchingViewModel ExchangerMatchingViewModel) - { - this.xtraUserControl11.SetBindingData(ExchangerMatchingViewModel); - _ExchangerMatchingView = ExchangerMatchingViewModel; - } - - //纭畾 - private void btnComplete_Click(object sender, EventArgs e) - { - /* if (_ExchangerMatchingView.MatchingDbId == null || _ExchangerMatchingView.MatchingDbId == string.Empty) - { - TipFormHelper.ShowError("闃�闂ㄥ瀷鍙烽�夋嫨閿欒"); - return; - } - if ((int)_ExchangerMatchingView.MatchingExchangerType == (int)HStation.Assets.eExchangerType.TCV || (int)_ExchangerMatchingView.MatchingExchangerType == (int)HStation.Assets.eExchangerType.GPV) - { - if (_ExchangerMatchingView.MatchingCurveDbId == null || _ExchangerMatchingView.MatchingCurveDbId == string.Empty) - { - TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); - return; - } - } - else - { - _ExchangerMatchingView.MatchingCurveOL = null; - _ExchangerMatchingView.MatchingCurveQL = null; - } - ReloadDataEvent.Invoke(_ExchangerMatchingView); - this.Close();*/ - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.cs new file mode 100644 index 0000000..ff381fc --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.cs @@ -0,0 +1,43 @@ +锘縩amespace HStation.WinFrmUI +{ + public partial class ExchangerSingleMatchingDlg : DevExpress.XtraEditors.XtraForm + { + public ExchangerSingleMatchingDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + public event Action<HydroExchangerMatchingViewModel> ReloadDataEvent; + + private HydroExchangerMatchingViewModel _ExchangerMatchingView = null; + + public void SetBindingData(HydroExchangerMatchingViewModel ExchangerMatchingViewModel) + { + this.xtraUserControl11.SetBindingData(ExchangerMatchingViewModel); + _ExchangerMatchingView = ExchangerMatchingViewModel; + } + + //纭畾 + private void btnComplete_Click(object sender, EventArgs e) + { + if (_ExchangerMatchingView.MatchingDbId == null || _ExchangerMatchingView.MatchingDbId == string.Empty) + { + TipFormHelper.ShowError("闃�闂ㄥ瀷鍙烽�夋嫨閿欒"); + return; + } + + if (_ExchangerMatchingView.MatchingCurveDbId == null || _ExchangerMatchingView.MatchingCurveDbId == string.Empty) + { + TipFormHelper.ShowError("鏇茬嚎閫夋嫨閿欒"); + return; + } + else + { + _ExchangerMatchingView.MatchingCurveQL = null; + } + ReloadDataEvent.Invoke(_ExchangerMatchingView); + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingViewModel.cs similarity index 95% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingViewModel.cs index 0461942..7d637c9 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/ExchangerSingleMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/18-exchanger/TankSingleMatchingViewModel.cs @@ -56,13 +56,6 @@ public string Description { get; set; } /// <summary> - /// 闃�闂ㄥ紑搴� - /// </summary> - [DisplayName("闃�闂ㄥ紑搴�")] - [Browsable(true)] - public int? ExchangerLift { get; set; } - - /// <summary> /// 鎺掑簭鐮� /// </summary> [DisplayName("鎺掑簭鐮�")] @@ -96,5 +89,12 @@ [DisplayName("鍏抽敭瀛�")] [Browsable(true)] public string KeyWord { get; set; } + + /// <summary> + /// 闃�闂ㄨ缃� + /// </summary> + [DisplayName("闃�闂ㄨ缃�")] + [Browsable(true)] + public string ExchangerSetting { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj index 22c0f71..1284980 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj @@ -10,7 +10,6 @@ <ItemGroup> <Compile Remove="02-project\01-import\01-ModelFile\**" /> <Compile Remove="02-project\01-import\04-completed\**" /> - <Compile Remove="03-simulation\06-simulation\01-matching\06-threelink\01-threelinksinglematching\**" /> <Compile Remove="03-ViewModel\**" /> <Compile Remove="04-HomePageMainPanel\**" /> <Compile Remove="04-pump\02-analy\**" /> @@ -18,7 +17,6 @@ <Compile Remove="Resources\**" /> <EmbeddedResource Remove="02-project\01-import\01-ModelFile\**" /> <EmbeddedResource Remove="02-project\01-import\04-completed\**" /> - <EmbeddedResource Remove="03-simulation\06-simulation\01-matching\06-threelink\01-threelinksinglematching\**" /> <EmbeddedResource Remove="03-ViewModel\**" /> <EmbeddedResource Remove="04-HomePageMainPanel\**" /> <EmbeddedResource Remove="04-pump\02-analy\**" /> @@ -26,7 +24,6 @@ <EmbeddedResource Remove="Resources\**" /> <None Remove="02-project\01-import\01-ModelFile\**" /> <None Remove="02-project\01-import\04-completed\**" /> - <None Remove="03-simulation\06-simulation\01-matching\06-threelink\01-threelinksinglematching\**" /> <None Remove="03-ViewModel\**" /> <None Remove="04-HomePageMainPanel\**" /> <None Remove="04-pump\02-analy\**" /> @@ -34,7 +31,6 @@ <None Remove="Resources\**" /> <Page Remove="02-project\01-import\01-ModelFile\**" /> <Page Remove="02-project\01-import\04-completed\**" /> - <Page Remove="03-simulation\06-simulation\01-matching\06-threelink\01-threelinksinglematching\**" /> <Page Remove="03-ViewModel\**" /> <Page Remove="04-HomePageMainPanel\**" /> <Page Remove="04-pump\02-analy\**" /> @@ -150,7 +146,6 @@ <ItemGroup> <Folder Include="03-simulation\06-simulation\01-matching\00-core\" /> - <Folder Include="03-simulation\06-simulation\01-matching\06-threelink\" /> <Folder Include="map\gaode\css\" /> </ItemGroup> @@ -196,15 +191,6 @@ </Compile> <Compile Update="03-simulation\06-simulation\01-matching\09-Tank\TankSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> - </Compile> - <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\CompressorChartShowDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\CompressorSingleMatchingCtrl.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\CompressorSingleMatchingDlg.cs"> - <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\06-simulation\01-matching\16-sprinkler\SprinklerSingleMatchingForm.cs"> <SubType>UserControl</SubType> @@ -262,13 +248,22 @@ <Compile Update="03-simulation\06-simulation\01-matching\05-elbows\01-elbowsinglematching\ElbowSingMatchingDlg.cs" /> <Compile Update="03-simulation\06-simulation\01-matching\07-fourlink\01-fourlinksinglematching\FourLinkSingleMatchingForm.cs" /> <Compile Update="03-simulation\06-simulation\01-matching\07-fourlink\01-fourlinksinglematching\FourLinkSingMatchingDlg.cs" /> - <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\ExchangerChartShowDlg.cs"> + <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\CompressorChartShowDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\ExchangerSingleMatchingCtrl.cs"> + <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\CompressorSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\ExchangerSingleMatchingDlg.cs"> + <Compile Update="03-simulation\06-simulation\01-matching\17-compressor\TankSingleMatchingDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\CompressorChartShowDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\CompressorSingleMatchingCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="03-simulation\06-simulation\01-matching\18-exchanger\TankSingleMatchingDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\06-simulation\XhsProjectSimulationCorePage.cs" /> -- Gitblit v1.9.3