tx
2025-04-09 fa7510e1ed63df0366787fa4ed1b3db6426d2b46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using System.Collections.Generic;
using TProduct.Model;
 
namespace TProduct.WinFrmUI.TValve
{
    internal class FeatTestHelper
    {
        //
        private List<TProduct.Model.WorkBenchMonitorPoint> _allMonitorList = null;
 
        protected long _testItemID = 0;
        protected TProduct.Model.TestProjectItemView _testItem = null;
        protected TProduct.Model.TestProjectParas _testParas = null;
        protected bool _isTemperatureTrn = false; //是否温度换算
        protected double _atmospherePressure = 101.3;//大气压
        protected double _elevation = 100;//海拔高度
        protected eRecordType _recordType = eRecordType.Instrument;
 
        internal void SetTestInfo(
            TProduct.Model.WorkBenchBase bench,
            TProduct.Model.TestProjectItemView testItem,
            List<TProduct.Model.WorkBenchMonitorPoint> allMonitorList)
        {
            if (bench == null || testItem == null)
                return;
            this._testItemID = testItem.ItemID;
            this._testItem = testItem;
            this._allMonitorList = allMonitorList;
 
 
 
            var bench_setting = new WorkBenchSetting4Pump(bench.TestSetting);
            this._elevation = bench_setting.Elevation;
            this._atmospherePressure = bench_setting.AtmosphericPressure;
        }
 
 
 
 
 
        private double _dia = 10;
        public void SetValveInfo(double dia)
        {
            _dia = dia;
        }
 
        // 
        public Model.ValveFeatTestRecordViewModel NewTestRecord(
            List<TProduct.Model.MonitorPointValuePure> valueList,
            double degree,
            out string error_info)
        {
            error_info = null;
            if (_allMonitorList == null || valueList == null)
            {
                error_info = "请输入测点监控值";
                return null;
            }
 
 
            error_info = "代码正在完善中...";
            return null;
        }
 
        private double? valve阀门开度 = null;
        /// <summary>
        /// 设置阀门开度
        /// </summary>
        /// <param name="prop"></param>
        /// <param name="paras"></param>
        /// <returns></returns>
        public virtual void SetValveDegree(double paras)
        {
 
            valve阀门开度 = paras;
 
        }
 
 
 
 
 
        /// <summary>
        /// Mpa=>m
        /// </summary>
        public static double UnitConvert_MPa2M(double mpa)
        {
            return mpa * 1000 / TProduct.ConstantParas.g;
        }
    }
}