| | |
| | | [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" }; |
| | |
| | | [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" }; |
| | |
| | | [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); |
| | | } |
| | | |
| | |
| | | if (sum2 < 0) |
| | | { |
| | | sum2 = await ZyConnectHelper.GetTotalWaterByDay_In(yest2);//.GetAwaiter().GetResult(); |
| | | |
| | | TotalWaterInHelper.Save(yest2, sum2); |
| | | } |
| | | |