tangxu
2024-07-03 871ce0adc5e746833f2a08e3e5f872535eb90516
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
using IStation.Application;
 
namespace IStation.ChEr.WebApi
{
    internal class PredictHelper
    {
        public static bool IsOpenState()
        {
            var result = ConnectHelper.GetByPumpOpenState(DateTime.Now, DateTime.Now.AddDays(1));
            foreach (var item in result)
            {
                if (item.DateTime.Hour == DateTime.Now.Hour)
                {
                    if (item.Total != 0)
                    {
                        LogHelper.Info("开机时间与累计流量不对应");
                        return true;
                    }
                    return false;
                }
            }
            return false;
        }
    }
}