tx
2025-04-10 2538101febc78f525945da72c7cdcb2589f9e6ea
TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/MainPageÐÔÄܲâÊÔ/FeatTestIngMainPage_Setting.cs
@@ -35,39 +35,29 @@
                MessageBox.Show("还未设置item参数");
                return;
            } 
            if (pump == null)
            {
                MessageBox.Show("还未设置pump参数");
                return;
            }
            if (part == null)
            {
                MessageBox.Show("还未设置part参数");
                return;
            }
            if (string.IsNullOrEmpty(pump.RatedParas))
            {
                MessageBox.Show("还未设置泵的额定参数");
                return;
            }
            this._workBenchInfo = workBench;
            this._testItem = item;
            this._currentPump = pump;
            this._currentPart = part;
            this._ratedParas = TProduct.Model.RatedParas4Pump.ToModel(pump.RatedParas);
            if (_currentPump.MotorMainID.HasValue && _currentPump.MotorMainID > 0)
            if (_currentPump != null)
            {
                _currentMotor = new BLL.ProductMotor().GetExByProductID((long)_currentPump.MotorMainID);
                this._ratedParas = TProduct.Model.RatedParas4Pump.ToModel(pump.RatedParas);
                if (_currentPump.MotorMainID.HasValue && _currentPump.MotorMainID > 0)
                {
                    _currentMotor = new BLL.ProductMotor().GetExByProductID((long)_currentPump.MotorMainID);
                }
                this._currentPumpSeries = new BLL.ProductSeries().GetByID(this._currentPump.SeriesID);
                if (this._currentPumpSeries == null)
                {
                    MessageBox.Show("当前泵对应系列未找到");
                    return;
                }
            }
            this._currentPumpSeries = new BLL.ProductSeries().GetByID(this._currentPump.SeriesID);
            if (this._currentPumpSeries == null)
            {
                MessageBox.Show("当前泵对应系列未找到");
                return;
            }
            if (TProduct.CorpSetting.PumpTest.IsRefreshAdditionInfo)
            {
@@ -82,10 +72,14 @@
            ribbonPageGroup开停机.Visible = false;
            bsiOperateInfo.Caption = "";
            this._isInnerMotor = _currentPumpSeries.IsInnerMotor == 1 ? true : false;
            if(_currentPumpSeries != null)
            {
                this._isInnerMotor = _currentPumpSeries.IsInnerMotor == 1 ? true : false;
            //初始化操作提示
            InitialNoticeList();
                //初始化操作提示
                InitialNoticeList();
            }
@@ -112,9 +106,9 @@
            _monitorValveIngRecordHelper = new MonitorValveIngRecordHelper();
            _monitorValveIngRecordHelper.Initial(
                TProduct.Model.eProductType.Pump,
                this._currentPumpSeries.ID,
                this._currentPump.ID,
                this._currentPart.ID,
                this._currentPumpSeries == null ? 0 : this._currentPumpSeries.ID,
                this._currentPump == null ? 0 : this._currentPump.ID,
                this._currentPart == null ? 0 : this._currentPart.ID,
                this._testItem, 
                this._workBenchInfo,
                this._allMonitorPointList);
@@ -167,8 +161,17 @@
            //通讯日志(放在最后)
            InitialLinkLogCtrl();
            bbiPumpName.Caption = string.Format("æ³µID:{0},型号:{1}", pump.ID, pump.Name);
            TProduct.LogHelper.Test(string.Format("开始进行性能测试,泵型号:{0}", pump.Name));
            if(pump == null)
            {
                bbiPumpName.Caption = string.Format("æ³µID:{0},型号:{1}", 0, "未知");
                TProduct.LogHelper.Test(string.Format("开始进行性能测试,泵型号:{0}", "未知"));
            }
            else
            {
                bbiPumpName.Caption = string.Format("æ³µID:{0},型号:{1}", pump.ID, pump.Name);
                TProduct.LogHelper.Test(string.Format("开始进行性能测试,泵型号:{0}", pump.Name));
            }
        }
        /// <summary>
@@ -178,6 +181,7 @@
        private void InitialNoticeList()
        {
            bbi注意事项.Enabled = false;
            if (this._currentPumpSeries == null) { return; }
            var productStyle = new BLL.ProductStyle().GetByID(this._currentPumpSeries.ProductStyleID);
            if (productStyle == null)
                return;