lixiaojun
2022-08-09 c7c696753fbe0b8ebf56eb6cfe584601a36c5fb2
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
92
93
94
95
96
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Calculation.DispatchAna.Model
{
    /// <summary>
    /// 复杂
    /// </summary>
    public class RequestParasSimple
    {
        /// <summary>
        /// 
        /// </summary>
        public RequestParasSimple() { }
 
        /// <summary>
        /// 公司标识
        /// </summary>
        public long CorpID { get; set; }
 
        /// <summary>
        /// 泵站标识
        /// </summary>
        public long StationID { get; set; }
 
        /// <summary>
        /// 方案数量
        /// </summary>
        public int SchemeNumber { get; set; } = 0;
 
        /// <summary>
        /// 方案排序
        /// </summary>
        public IStation.Calculation.DispatchAna.Model.eAnaSchemeSortType SchemeSortType { get; set; }
 
        /// <summary>
        /// 
        /// </summary>
        public string TargetFlow { get; set; }
 
        /// <summary>
        /// 
        /// </summary>
        public string TargetOutletPress { get; set; }
 
        /// <summary>
        /// 
        /// </summary>
        public string WaterLevel { get; set; }
 
        /// <summary>
        /// 流量浮动变量
        /// </summary>
        public string TargetFlowRangeMin { get; set; }
 
        /// <summary>
        /// 流量浮动变量
        /// </summary>
        public string TargetFlowRangeMax { get; set; }
 
        /// <summary>
        /// 获取默认值
        /// </summary>
        /// <param name="str"></param>
        /// <param name="doubleValue"></param>
        /// <returns></returns>
        public static  bool GetDefaultValue(string str,out double doubleValue)
        {
            doubleValue = 0;
            if (string.IsNullOrEmpty(str))
            {
                return false;
            }
            if (str.Contains(","))
            {
                var sss = str.Split(",");
                if(!double.TryParse(sss[0], out doubleValue))
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            if (!double.TryParse(str, out doubleValue))
            {
                return false;
            }
            return true;
        }
    }
}