duheng
2024-06-19 64c0604d9a7d2460f6bf1b6cc7df02d769db3a15
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;
        }
    }
}