lixiaojun
2024-09-15 5c4bc78d4b5e50391e25d672654589c381be21e6
水力组件升级
已修改22个文件
已添加1个文件
432 ■■■■■ 文件已修改
Hydro/HStation.Hydro.Core/TransferHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.Hydro.Core/ParseHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Hydro.Core/01-model/HydroModelMgrPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/00-core/ImportXhsProjectFileHelper.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroCurve.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.Designer.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrPage.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrViewModel.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrPage.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrViewModel.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterInfoUpdateExtensions.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterPropertyViewModel.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroConnectPropertyViewModel.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroElbowPropertyViewModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroFourlinkPropertyViewModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroThreelinkPropertyViewModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/02-pump/HydroPumpPropertyViewModel.cs 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-q3d/HydroQ3dViewPage.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/GlobalUsings.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/HStation.Hydro.Core/TransferHelper.cs
@@ -409,7 +409,7 @@
                    pump.StartCode = revitPump.StartCode;
                    pump.EndCode = revitPump.EndCode;
                    pump.LinkStatus = revitPump.LinkStatus;
                    pump.RatedPower = revitPump.RatedPower;
                    pump.RatedP = revitPump.RatedPower;
                    pump.CurveQH = revitPump.CurveQH;
                    pump.Price = revitPump.Price;
                    pump.PricePattern = revitPump.PricePattern;
Hydro/Yw.Hydro.Core/ParseHelper.cs
@@ -325,7 +325,7 @@
                    pumpModel.StartNode = allNodes.Find(x => x.Id == pump.StartCode);
                    pumpModel.EndNode = allNodes.Find(x => x.Id == pump.EndCode);
                    pumpModel.LinkStatus = pump.LinkStatus;
                    pumpModel.RatedPower = pump.RatedPower;
                    pumpModel.RatedPower = pump.RatedP;
                    pumpModel.CurveQH = pump.CurveQH;
                    if (string.IsNullOrEmpty(pumpModel.CurveQH))
                    {
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj
@@ -7,7 +7,7 @@
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.3.2" />
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.3.6" />
  </ItemGroup>
  <ItemGroup>
WinFrmUI/HStation.WinFrmUI.Hydro.Core/01-model/HydroModelMgrPage.cs
@@ -18,9 +18,9 @@
            InitializeComponent();
        }
        protected override void ViewModel(Yw.Dto.HydroModelDto dto)
        protected override void ViewModel(Yw.Vmo.HydroModelVmo vmo)
        {
            base.ViewModel(dto);
            base.ViewModel(vmo);
            var guid = new PageGuid()
            {
                Modular = "Hydro",
@@ -30,7 +30,7 @@
            if (!IsExistPage(guid, true))
            {
                var page = new HydroQ3dViewPage();
                page.SetBindingData(dto.ID);
                page.SetBindingData(vmo.ID);
                CreatePage(page, guid);
            }
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -206,7 +206,7 @@
            feedBackMsg?.Invoke("正在关联水力结构模型...", Color.Black);
            var hydroRelation = new Yw.Dto.AddHydroModelRelationInput();
            var hydroRelation = new Yw.Vmo.HydroModelRelationVmo();
            hydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite;
            hydroRelation.ObjectID = projectSiteId;
            hydroRelation.ModelID = hydroId;
@@ -214,7 +214,7 @@
            hydroRelation.Content = null;
            hydroRelation.Description = null;
            var bllHydroRelation = new Yw.BLL.HydroModelRelation();
            var bllHydroRelation = BLLFactory<Yw.BLL.HydroModelRelation>.Instance;
            var hydroRelationId = await bllHydroRelation.Insert(hydroRelation);
            if (hydroRelationId < 1)
            {
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/00-core/ImportXhsProjectFileHelper.cs
@@ -117,7 +117,7 @@
            feedBackMsg?.Invoke("正在关联水力结构模型...", Color.Black);
            var hydroRelation = new Yw.Dto.AddHydroModelRelationInput();
            var hydroRelation = new Yw.Vmo.HydroModelRelationVmo();
            hydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite;
            hydroRelation.ObjectID = projectSiteId;
            hydroRelation.ModelID = hydroId;
@@ -125,8 +125,9 @@
            hydroRelation.Content = null;
            hydroRelation.Description = null;
            var bllHydroRelation = new Yw.BLL.HydroModelRelation();
            var hydroRelationId = await bllHydroRelation.Insert(hydroRelation);
            var hydroRelationId = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.Insert(hydroRelation);
            if (hydroRelationId < 1)
            {
                feedBackMsg?.Invoke("关联水力结构模型失败!!!", Color.Red);
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroCurve.cs
@@ -11,6 +11,11 @@
        public const string PumpQH = "PumpQH";
        /// <summary>
        /// æ°´æ³µæµé‡åŠŸçŽ‡æ›²çº¿
        /// </summary>
        public const string PumpQP = "PumpQP";
        /// <summary>
        /// æ°´æ³µæµé‡æ•ˆçŽ‡æ›²çº¿
        /// </summary>
        public const string PumpQE = "PumpQE";
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.Designer.cs
@@ -147,6 +147,8 @@
            // 
            // Root
            // 
            Root.AppearanceItemCaption.Options.UseTextOptions = true;
            Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            Root.GroupBordersVisible = false;
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, emptySpaceItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem4 });
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.cs
@@ -1,4 +1,7 @@
namespace Yw.WinFrmUI
using DevExpress.XtraEditors;
using DevExpress.XtraTabbedMdi;
namespace Yw.WinFrmUI
{
    public partial class AddHydroSceneDlg : DevExpress.XtraEditors.XtraForm
    {
@@ -11,18 +14,20 @@
        /// <summary>
        /// é‡è½½æ•°æ®äº‹ä»¶
        /// </summary>
        public event Action<long> ReloadDataEvent;
        public event Action<Yw.Vmo.HydroSceneVmo> ReloadDataEvent;
        private Lazy<Yw.BLL.SysFlagStd> _bllFlag = new(() => new Yw.BLL.SysFlagStd());//标签bll
        private Lazy<Yw.BLL.HydroScene> _bllScene = new(() => new Yw.BLL.HydroScene());//场景bll
        private Yw.Vmo.HydroSceneVmo _vmo = null;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public async void SetBindingData()
        public async Task SetBindingData()
        {
            var allFlagList = await _bllFlag.Value.GetFlagListBySysType(Yw.Hydro.DataType.HydroScene);
            this.setFlagsEditCtrl1.SetBindingData(allFlagList, null);
            _vmo = new HydroSceneVmo();
            var allFlagList = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(Yw.Hydro.DataType.HydroScene);
            var allFlagNameList = allFlagList?.Select(x => x.Name).Distinct().ToList();
            this.setFlagsEditCtrl1.SetBindingData(allFlagNameList, null);
        }
        //验证
@@ -40,7 +45,7 @@
                this.dxErrorProvider1.SetError(this.txtCode, "必填项");
                return false;
            }
            if (await _bllScene.Value.IsExistCode(code))
            if (await BLLFactory<Yw.BLL.HydroScene>.Instance.IsExistCode(code))
            {
                this.dxErrorProvider1.SetError(this.txtCode, "编码已存在");
                return false;
@@ -48,7 +53,7 @@
            var tagName = this.txtTagName.Text.Trim();
            if (!string.IsNullOrEmpty(tagName))
            {
                if (await _bllScene.Value.IsExistTagName(tagName))
                if (await BLLFactory<Yw.BLL.HydroScene>.Instance.IsExistTagName(tagName))
                {
                    this.dxErrorProvider1.SetError(this.txtTagName, "标志已存在");
                    return false;
@@ -64,21 +69,22 @@
            {
                return;
            }
            var model = new Yw.Dto.AddHydroSceneInput();
            model.Name = this.txtName.Text.Trim();
            model.Code = this.txtCode.Text.Trim();
            model.Flags = this.setFlagsEditCtrl1.SelectedFlagList;
            model.TagName = this.txtTagName.Text.Trim();
            model.Description = this.txtDescription.Text.Trim();
            _vmo.Name = this.txtName.Text.Trim();
            _vmo.Code = this.txtCode.Text.Trim();
            _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList;
            _vmo.TagName = this.txtTagName.Text.Trim();
            _vmo.Description = this.txtDescription.Text.Trim();
            var id = await _bllScene.Value.Insert(model);
            var id = await BLLFactory<Yw.BLL.HydroScene>.Instance.Insert(_vmo);
            if (id < 1)
            {
                MessageBoxHelper.ShowWarning("添加失败!");
                XtraMessageBox.Show("添加失败!");
                return;
            }
            var vmo = await BLLFactory<Yw.BLL.HydroScene>.Instance.GetByID(id);
            this.ReloadDataEvent?.Invoke(vmo);
            this.ReloadDataEvent?.Invoke(id);
            TipFormHelper.ShowSucceed("添加成功");
            this.DialogResult = DialogResult.OK;
            this.Close();
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrPage.cs
@@ -60,7 +60,7 @@
        }
        //添加
        private void Add()
        private async void Add()
        {
            if (_allBindingList == null)
            {
@@ -73,14 +73,12 @@
            {
                WaitFormHelper.HideWaitForm();
            };
            dlg.SetBindingData();
            dlg.ReloadDataEvent += async (id) =>
            await dlg.SetBindingData();
            dlg.ReloadDataEvent += async (vmo) =>
            {
                var model = await _bll.Value.GetByID(id);
                var vm = new HydroSceneMgrViewModel(model);
                var vm = new HydroSceneMgrViewModel(vmo);
                _allBindingList.Add(vm);
                this.hydroSceneMgrViewModelBindingSource.ResetBindings(false);
                TipFormHelper.ShowSucceed("添加成功!");
            };
            dlg.ShowDialog();
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrViewModel.cs
@@ -13,7 +13,7 @@
        /// <summary>
        /// 
        /// </summary>
        public HydroSceneMgrViewModel(Yw.Dto.HydroSceneDto rhs)
        public HydroSceneMgrViewModel(Yw.Vmo.HydroSceneVmo rhs)
        {
            this.ID = rhs.ID;
            this.Name = rhs.Name;
@@ -22,7 +22,7 @@
            this.TagName = rhs.TagName;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Dto = rhs;
            this.Vmo = rhs;
        }
        /// <summary>
@@ -68,9 +68,9 @@
        public string Description { get; set; }
        /// <summary>
        /// Dto
        /// Vmo
        /// </summary>
        [Display(Name = "Dto")]
        public Yw.Dto.HydroSceneDto Dto { get; set; }
        [Display(Name = "Vmo")]
        public Yw.Vmo.HydroSceneVmo Vmo { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrPage.cs
@@ -1,6 +1,4 @@
using DevExpress.CodeParser;
using DevExpress.Utils.About;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors;
using Yw.EPAnet;
using Yw.WinFrmUI.Page;
@@ -25,29 +23,25 @@
        /// <summary>
        /// æŸ¥çœ‹æ¨¡åž‹äº‹ä»¶
        /// </summary>
        public event Action<Yw.Dto.HydroModelDto> ViewModelEvent;
        public event Action<HydroModelVmo> ViewModelEvent;
        /// <summary>
        /// è®¡ç®—模型事件
        /// </summary>
        public event Action<Yw.Dto.HydroModelDto> CalcuModelEvent;
        public event Action<HydroModelVmo> CalcuModelEvent;
        /// <summary>
        /// æ ¡éªŒæ¨¡åž‹äº‹ä»¶
        /// </summary>
        public event Action<Yw.Dto.HydroModelDto> ValidModelEvent;
        public event Action<HydroModelVmo> ValidModelEvent;
        private List<HydroModelMgrViewModel> _allBindingList = null;
        private Lazy<Yw.BLL.HydroModel> _bll = new(() => new Yw.BLL.HydroModel());
        private Lazy<Yw.BLL.HydroModelRelation> _bllRelation = new(() => new Yw.BLL.HydroModelRelation());
        //加载数据
        private async Task LoadData()
        {
            var allBindingList = await _bll.Value.GetAll();
            var allBindingRelationList = await _bllRelation.Value.GetAll();
            var allBindingList = await BLLFactory<Yw.BLL.HydroModel>.Instance.GetAll();
            var allBindingRelationList = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.GetAll();
            _allBindingList = new List<HydroModelMgrViewModel>();
            if (allBindingList != null && allBindingList.Count > 0)
            {
@@ -83,9 +77,9 @@
        /// <summary>
        /// æŸ¥çœ‹æ¨¡åž‹
        /// </summary>
        protected virtual async void ViewModel(Yw.Dto.HydroModelDto dto)
        protected virtual async void ViewModel(HydroModelVmo vmo)
        {
            var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID);
            var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID);
            var guid = new PageGuid()
            {
                Modular = "Hydro",
@@ -104,9 +98,9 @@
        /// <summary>
        /// è®¡ç®—模型
        /// </summary>
        protected virtual async void CalcuModel(Yw.Dto.HydroModelDto dto)
        protected virtual async void CalcuModel(HydroModelVmo vmo)
        {
            var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID);
            var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID);
            var netWork = Yw.Hydro.ParseHelper.ToNetwork(info);
            var list = netWork.Calcu();
            XtraMessageBox.Show(JsonHelper.Object2FormatJson(list));
@@ -115,9 +109,9 @@
        /// <summary>
        /// æ ¡éªŒæ¨¡åž‹
        /// </summary>
        protected virtual async void ValidModel(Yw.Dto.HydroModelDto dto)
        protected virtual async void ValidModel(HydroModelVmo vmo)
        {
            var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID);
            var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID);
            var netWork = Yw.Hydro.ParseHelper.ToNetwork(info);
            var result = netWork.Check();
            XtraMessageBox.Show(JsonHelper.Object2FormatJson(result));
@@ -184,8 +178,8 @@
            {
                return;
            }
            ViewModel(vm.Dto);
            this.ViewModelEvent?.Invoke(vm.Dto);
            ViewModel(vm.Vmo);
            this.ViewModelEvent?.Invoke(vm.Vmo);
        }
        //模型计算
@@ -196,8 +190,8 @@
            {
                return;
            }
            CalcuModel(vm.Dto);
            this.CalcuModelEvent?.Invoke(vm.Dto);
            CalcuModel(vm.Vmo);
            this.CalcuModelEvent?.Invoke(vm.Vmo);
        }
@@ -209,8 +203,8 @@
            {
                return;
            }
            ValidModel(vm.Dto);
            this.ValidModelEvent?.Invoke(vm.Dto);
            ValidModel(vm.Vmo);
            this.ValidModelEvent?.Invoke(vm.Vmo);
        }
        //导出inp
WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrViewModel.cs
@@ -13,32 +13,34 @@
        /// <summary>
        /// 
        /// </summary>
        public HydroModelMgrViewModel(Yw.Dto.HydroModelDto rhs, bool hasRelation)
        public HydroModelMgrViewModel(HydroModelVmo rhs, bool hasRelation)
        {
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Code = rhs.Code;
            this.Content = rhs.Content;
            this.FlagsString = Yw.Untity.FlagsHelper.ToString(rhs.Flags);
            this.TagName = rhs.TagName;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Dto = rhs;
            this.Vmo = rhs;
            this.HasRelation = hasRelation;
        }
        /// <summary>
        /// 
        /// </summary>
        public void Reset(Yw.Dto.HydroModelDto rhs)
        public void Reset(HydroModelVmo rhs)
        {
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Code = rhs.Code;
            this.Content = rhs.Content;
            this.FlagsString = Yw.Untity.FlagsHelper.ToString(rhs.Flags);
            this.TagName = rhs.TagName;
            this.SortCode = rhs.SortCode;
            this.Description = rhs.Description;
            this.Dto = rhs;
            this.Vmo = rhs;
        }
        /// <summary>
@@ -58,6 +60,12 @@
        /// </summary>
        [Display(Name = "编码")]
        public string Code { get; set; }
        /// <summary>
        /// å†…容
        /// </summary>
        [Display(Name = "内容")]
        public string Content { get; set; }
        /// <summary>
        /// æ ‡ç­¾
@@ -84,10 +92,10 @@
        public string Description { get; set; }
        /// <summary>
        /// Dto
        /// Vmo
        /// </summary>
        [Display(Name = "Dto")]
        public Yw.Dto.HydroModelDto Dto { get; set; }
        [Display(Name = "Vmo")]
        public HydroModelVmo Vmo { get; set; }
        /// <summary>
        /// 
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterInfoUpdateExtensions.cs
@@ -1,4 +1,6 @@
namespace Yw.WinFrmUI
using DevExpress.CodeParser;
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 
@@ -26,6 +28,8 @@
            rhs.Name = propertyViewModel.Name;
            rhs.Code = propertyViewModel.Code;
            rhs.ModelType = propertyViewModel.ModelType;
            rhs.DbId = propertyViewModel.DbId;
            rhs.DbLocked = propertyViewModel.DbLocked;
            rhs.Flags = propertyViewModel.Flags?.ToList();
            rhs.Description = propertyViewModel.Description;
@@ -86,6 +90,16 @@
                    hydroJunctionInfo.Elev = hydroJunctionPropertyViewModel.Elev;
                    hydroJunctionInfo.Demand = hydroJunctionPropertyViewModel.Demand;
                    hydroJunctionInfo.DemandPattern = hydroJunctionPropertyViewModel.DemandPattern;
                }
            }
            //连接件
            if (rhs is Yw.Model.HydroConnectInfo hydroConnectInfo)
            {
                if (propertyViewModel is HydroConnectPropertyViewModel hydroConnectPropertyViewModel)
                {
                    hydroConnectInfo.Material = hydroConnectPropertyViewModel.Material;
                    hydroConnectInfo.Caliber = hydroConnectPropertyViewModel.Caliber;
                    hydroConnectInfo.MinorLoss = hydroConnectPropertyViewModel.MinorLoss;
                }
            }
            //扩散器
@@ -211,13 +225,18 @@
            {
                if (propertyViewModel is HydroPumpPropertyViewModel hydroPumpPropertyViewModel)
                {
                    hydroPumpInfo.RatedPower = hydroPumpPropertyViewModel.RatedPower;
                    hydroPumpInfo.RatedQ = hydroPumpPropertyViewModel.RatedP;
                    hydroPumpInfo.RatedQ = hydroPumpPropertyViewModel.RatedQ;
                    hydroPumpInfo.RatedH = hydroPumpPropertyViewModel.RatedH;
                    hydroPumpInfo.RatedN = hydroPumpPropertyViewModel.RatedN;
                    hydroPumpInfo.CurveQH = hydroPumpPropertyViewModel.CurveQH;
                    hydroPumpInfo.CurveQP = hydroPumpPropertyViewModel.CurveQP;
                    hydroPumpInfo.CurveQE = hydroPumpPropertyViewModel.CurveQE;
                    hydroPumpInfo.SpeedRatio = hydroPumpPropertyViewModel.SpeedRatio;
                    hydroPumpInfo.SpeedRatioPattern = hydroPumpPropertyViewModel.SpeedRatioPattern;
                    hydroPumpInfo.Price = hydroPumpPropertyViewModel.Price;
                    hydroPumpInfo.PricePattern = hydroPumpPropertyViewModel.PricePattern;
                    hydroPumpInfo.CurveQE = hydroPumpPropertyViewModel.CurveQE;
                }
            }
            //阀门
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterPropertyViewModel.cs
@@ -84,11 +84,20 @@
        public string DbId { get; set; }
        /// <summary>
        /// é”å®š
        /// </summary>
        [Category("基础信息")]
        [DisplayName("锁定")]
        [PropertyOrder(7)]
        [Browsable(true)]
        public bool DbLocked { get; set; }
        /// <summary>
        /// æ ‡ç­¾
        /// </summary>
        [Category("基础信息")]
        [DisplayName("标签")]
        [PropertyOrder(7)]
        [PropertyOrder(8)]
        [Browsable(true)]
        public List<string> Flags { get; set; }
@@ -97,7 +106,7 @@
        /// </summary>
        [Category("基础信息")]
        [DisplayName("说明")]
        [PropertyOrder(8)]
        [PropertyOrder(9)]
        [MultiText]
        [Browsable(true)]
        public string Description { get; set; }
@@ -114,6 +123,8 @@
            this.Name = rhs.Name;
            this.Code = rhs.Code;
            this.ModelType = rhs.ModelType;
            this.DbId = rhs.DbId;
            this.DbLocked = rhs.DbLocked;
            this.Flags = rhs.Flags?.ToList();
            this.Description = rhs.Description;
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroConnectPropertyViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
using Yw.Model;
namespace Yw.WinFrmUI
{
    /// <summary>
    /// è¿žæŽ¥ä»¶å±žæ€§è§†å›¾
    /// </summary>
    public class HydroConnectPropertyViewModel : HydroJunctionPropertyViewModel
    {
        /// <summary>
        ///
        /// </summary>
        public HydroConnectPropertyViewModel() { }
        /// <summary>
        ///
        /// </summary>
        public HydroConnectPropertyViewModel(Yw.Model.HydroConnectInfo rhs) : base(rhs)
        {
            this.Material = rhs.Material;
            this.Caliber = rhs.Caliber;
            this.MinorLoss = rhs.MinorLoss;
        }
        /// <summary>
        /// ææ–™
        /// </summary>
        [Category("数据")]
        [DisplayName("材料")]
        [PropertyOrder(31)]
        [Browsable(true)]
        public string Material { get; set; }
        /// <summary>
        /// å£å¾„
        /// </summary>
        [Category("数据")]
        [DisplayName("口径")]
        [PropertyOrder(32)]
        [Browsable(true)]
        public string Caliber { get; set; }
        /// <summary>
        /// å±€é˜»ç³»æ•°
        /// </summary>
        [Category("数据")]
        [DisplayName("局阻系数")]
        [PropertyOrder(33)]
        [Browsable(true)]
        public double? MinorLoss { get; set; }
        /// <summary>
        /// æ›´æ–°å±žæ€§
        /// </summary>
        /// <param name="rhs"></param>
        /// <param name="allParterList"></param>
        public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList)
        {
            base.UpdateProperty(rhs, allParterList);
            if (rhs is Yw.Model.HydroConnectInfo hydroConnectInfo)
            {
                this.Material = hydroConnectInfo.Material;
                this.Caliber = hydroConnectInfo.Caliber;
                this.MinorLoss = hydroConnectInfo.MinorLoss;
            }
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroElbowPropertyViewModel.cs
@@ -3,7 +3,7 @@
    /// <summary>
    /// å¼¯å¤´å±žæ€§è§†å›¾
    /// </summary>
    public class HydroElbowPropertyViewModel : HydroJunctionPropertyViewModel
    public class HydroElbowPropertyViewModel : HydroConnectPropertyViewModel
    {
        /// <summary>
        /// 
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroFourlinkPropertyViewModel.cs
@@ -3,7 +3,7 @@
    /// <summary>
    /// å››é€šå±žæ€§è§†å›¾
    /// </summary>
    public class HydroFourlinkPropertyViewModel : HydroJunctionPropertyViewModel
    public class HydroFourlinkPropertyViewModel : HydroConnectPropertyViewModel
    {
        /// <summary>
        /// 
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroThreelinkPropertyViewModel.cs
@@ -3,7 +3,7 @@
    /// <summary>
    /// ä¸‰é€šå±žæ€§è§†å›¾
    /// </summary>
    public class HydroThreelinkPropertyViewModel : HydroJunctionPropertyViewModel
    public class HydroThreelinkPropertyViewModel : HydroConnectPropertyViewModel
    {
        /// <summary>
        /// 
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/02-pump/HydroPumpPropertyViewModel.cs
@@ -17,13 +17,17 @@
        /// </summary>
        public HydroPumpPropertyViewModel(Yw.Model.HydroPumpInfo rhs) : base(rhs)
        {
            this.RatedPower = rhs.RatedPower;
            this.RatedP = rhs.RatedP;
            this.RatedQ = rhs.RatedQ;
            this.RatedH = rhs.RatedH;
            this.RatedN = rhs.RatedN;
            this.CurveQH = rhs.CurveQH;
            this.CurveQP = rhs.CurveQP;
            this.CurveQE = rhs.CurveQE;
            this.SpeedRatio = rhs.SpeedRatio;
            this.SpeedRatioPattern = rhs.SpeedRatioPattern;
            this.Price = rhs.Price;
            this.PricePattern = rhs.PricePattern;
            this.CurveQE = rhs.CurveQE;
        }
@@ -43,53 +47,55 @@
        [DisplayName("额定功率")]
        [PropertyOrder(101)]
        [Browsable(true)]
        public double RatedPower { get; set; }
        public double RatedP { get; set; }
        /// <summary>
        /// é¢å®šæµé‡
        /// </summary>
        [Category("数据")]
        [DisplayName("额定流量")]
        [PropertyOrder(102)]
        [Browsable(true)]
        public double? RatedQ { get; set; }
        /// <summary>
        /// é¢å®šæ‰¬ç¨‹
        /// </summary>
        [Category("数据")]
        [DisplayName("额定扬程")]
        [PropertyOrder(103)]
        [Browsable(true)]
        public double? RatedH { get; set; }
        /// <summary>
        /// é¢å®šè½¬é€Ÿ
        /// </summary>
        [Category("数据")]
        [DisplayName("额定转速")]
        [PropertyOrder(104)]
        [Browsable(true)]
        public double? RatedN { get; set; }
        /// <summary>
        /// æµé‡æ‰¬ç¨‹æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("流量扬程曲线")]
        [PropertyOrder(102)]
        [PropertyOrder(105)]
        [IsHydroCurvePro(HydroCurve.PumpQH)]
        [Browsable(true)]
        public string CurveQH { get; set; }
        /// <summary>
        /// è½¬é€Ÿæ¯”
        /// æµé‡åŠŸçŽ‡æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比")]
        [PropertyOrder(103)]
        [Browsable(true)]
        public double? SpeedRatio { get; set; }
        /// <summary>
        /// è½¬é€Ÿæ¯”模式
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比模式")]
        [PropertyOrder(104)]
        [Browsable(true)]
        public string SpeedRatioPattern { get; set; }
        /// <summary>
        /// èƒ½è€—ä»·æ ¼
        /// </summary>
        [Category("数据")]
        [DisplayName("能耗价格")]
        [PropertyOrder(105)]
        [Browsable(true)]
        public double? Price { get; set; }
        /// <summary>
        /// ä»·æ ¼æ¨¡å¼
        /// </summary>
        [Category("数据")]
        [DisplayName("价格模式")]
        [DisplayName("流量功率曲线")]
        [PropertyOrder(106)]
        [IsHydroCurvePro(HydroCurve.PumpQP)]
        [Browsable(true)]
        public string PricePattern { get; set; }
        public string CurveQP { get; set; }
        /// <summary>
        /// æµé‡æ•ˆçŽ‡æ›²çº¿
@@ -102,6 +108,44 @@
        public string CurveQE { get; set; }
        /// <summary>
        /// è½¬é€Ÿæ¯”
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比")]
        [PropertyOrder(108)]
        [Browsable(true)]
        public double? SpeedRatio { get; set; }
        /// <summary>
        /// è½¬é€Ÿæ¯”模式
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比模式")]
        [PropertyOrder(109)]
        [Browsable(true)]
        public string SpeedRatioPattern { get; set; }
        /// <summary>
        /// èƒ½è€—ä»·æ ¼
        /// </summary>
        [Category("数据")]
        [DisplayName("能耗价格")]
        [PropertyOrder(110)]
        [Browsable(true)]
        public double? Price { get; set; }
        /// <summary>
        /// ä»·æ ¼æ¨¡å¼
        /// </summary>
        [Category("数据")]
        [DisplayName("价格模式")]
        [PropertyOrder(111)]
        [Browsable(true)]
        public string PricePattern { get; set; }
        /// <summary>
        /// æ›´æ–°å±žæ€§
        /// </summary>
        /// <param name="rhs"></param>
@@ -111,13 +155,17 @@
            base.UpdateProperty(rhs, allParterList);
            if (rhs is Yw.Model.HydroPumpInfo hydroPumpInfo)
            {
                this.RatedPower = hydroPumpInfo.RatedPower;
                this.RatedP = hydroPumpInfo.RatedP;
                this.RatedQ = hydroPumpInfo.RatedQ;
                this.RatedH = hydroPumpInfo.RatedH;
                this.RatedN = hydroPumpInfo.RatedN;
                this.CurveQH = hydroPumpInfo.CurveQH;
                this.CurveQP = hydroPumpInfo.CurveQP;
                this.CurveQE = hydroPumpInfo.CurveQE;
                this.SpeedRatio = hydroPumpInfo.SpeedRatio;
                this.SpeedRatioPattern = hydroPumpInfo.SpeedRatioPattern;
                this.Price = hydroPumpInfo.Price;
                this.PricePattern = hydroPumpInfo.PricePattern;
                this.CurveQE = hydroPumpInfo.CurveQE;
            }
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-q3d/HydroQ3dViewPage.cs
@@ -1,15 +1,4 @@
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Yw.WinFrmUI
namespace Yw.WinFrmUI
{
    public partial class HydroQ3dViewPage : Yw.WinFrmUI.DocumentPage
    {
@@ -19,21 +8,19 @@
            this.PageTitle.Caption = "水力模型";
        }
        private Yw.Model.HydroModelInfo _hydroInfo = null;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        /// <param name="hydroModelId">水力模型id</param>
        public async void SetBindingData(Yw.Model.HydroModelInfo rhs)
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo)
        {
            this.PageTitle.Caption = $"{rhs.Name}\r\n水力模型";
            if (hydroInfo == null)
            {
                return;
            }
            _hydroInfo = hydroInfo;
            var netWork = HydroQ3dTransferHelper.ToNetworkViewModel(rhs);
            this.drawer1.SetData(netWork);
            //var temp = new Template();
            //temp.network = netWork;
            //mapViewer1.SetData(temp);
        }
        /// <summary>
@@ -42,6 +29,14 @@
        public override void InitialDataSource()
        {
            base.InitialDataSource();
            if (_hydroInfo == null)
            {
                return;
            }
            this.PageTitle.Caption = $"{_hydroInfo.Name}\r\n水力模型";
            var netWork = HydroQ3dTransferHelper.ToNetworkViewModel(_hydroInfo);
            this.drawer1.SetData(netWork);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/GlobalUsings.cs
@@ -4,3 +4,4 @@
global using Yw.WinFrmUI;
global using System.ComponentModel;
global using System.ComponentModel.DataAnnotations;
global using Yw.Vmo;
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -9,8 +9,8 @@
  <ItemGroup>
    <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" />
    <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.6" />
    <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.0" />
    <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.7" />
    <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.1" />
  </ItemGroup>
  <ItemGroup>