tangxu
2024-06-11 e08f18c84c96ca794407f4fcb737b26fa76c0a1f
WebApi/Controllers/TotalWaterInController.cs
@@ -61,6 +61,8 @@
        [HttpGet]
        public IStation.Dto.ApiResult GetByDayDebug(string day)
        {
            if (isDebug)
                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
            if (day == null)
            {
                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day null" };
@@ -87,6 +89,8 @@
        [HttpGet]
        public async Task<IStation.Dto.ApiResult> GetByDay(string day)
        {
            if (isDebug)
                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
            if (day == null)
            {
                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day null" };
@@ -158,12 +162,13 @@
        [HttpGet]
        public async Task<IStation.Dto.ApiResult> GetLastDay3()
        {
            if (isDebug)
                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
            DateTime yest1 = DateTime.Today.AddDays(-1);
            var sum1 = TotalWaterInHelper.Read(yest1);
            if (sum1 < 0)
            {
                sum1 = await ZyConnectHelper.GetTotalWaterByDay_In(yest1);//.GetAwaiter().GetResult();
                TotalWaterInHelper.Save(yest1, sum1);
            }
@@ -172,7 +177,6 @@
            if (sum2 < 0)
            {
                sum2 = await ZyConnectHelper.GetTotalWaterByDay_In(yest2);//.GetAwaiter().GetResult();
                TotalWaterInHelper.Save(yest2, sum2);
            }