Shuxia Ning
2024-07-17 fd681339c81201ed6fb3303647ecab89e3e6c0c1
Test/IStation.Win/ViewModel/ModelValidViewModel.cs
@@ -8,38 +8,38 @@
    public class ModelValidViewModel
    {
        [Display(Name = "时间")]
        public DateTime Time { get; set; }
        [Display(Name = "值类型")]
        public DateTime Time { get; set; }
        [Display(Name = "值类型")]
        public eValueType ValueType { get; set; }
        [Display(Name = "模型标识")]
        [Display(Name = "模型标识")]
        public string ModelId { get; set; }
        [Display(Name = "Scada标识")]
        [Display(Name = "Scada标识")]
        public string ScadaId { get; set; }
        [Display(Name = "模型值")]
        public double? ModeValue { get; set; }
        [Display(Name = "Scada值")]
        [Display(Name = "模型值")]
        public double? ModelValue { get; set; }
        [Display(Name = "Scada值")]
        public double? ScadaValue { get; set; }
        [Display(Name = "差值")]
        [Display(Name = "差值")]
        public double? DifferenceValue { get; set; }
        public void Round()
        {
            if (this.ModeValue.HasValue)
            if (this.ModelValue.HasValue)
                if (this.ValueType == eValueType.Head)
                {
                    this.ModeValue = Math.Round(this.ModeValue.Value, 5);
                    this.ModelValue = Math.Round(this.ModelValue.Value, 5);
                }
                else
                {
                    this.ModeValue = Math.Round(this.ModeValue.Value, 2);
                    this.ModelValue = Math.Round(this.ModelValue.Value, 2);
                }
            if (this.ScadaValue.HasValue)