| | |
| | | { |
| | | var PumpTotalElecty = await ZyConnectHelper.GetPumpTotalElectricity(d, d); //获取某段时间的用电量 |
| | | var PumpState = await ZyConnectHelper.GetPumpOpenStatusBySingleDay(d); //获取泵的开机情况 |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByDayTimeRange_In(d, d); //取水量 |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByDayTimeRange_In(d.AddDays(-1), d); //取水量 |
| | | |
| | | /* PumpHistoryDataFileHelper pumpHistoryDataFileHelper=new PumpHistoryDataFileHelper(); |
| | | var TotalWater = pumpHistoryDataFileHelper.GetAllWaterData(); |
| | |
| | | /// <returns></returns> |
| | | [Route("GetPumpHistoryData")] |
| | | [HttpGet] |
| | | public async Task<IStation.Dto.ApiResult> GetPumpHistoryData(string startday, string endday) |
| | | public async Task<IStation.Dto.ApiResult> GetPumpHistoryData(string startday, string endday, string resolution) |
| | | { |
| | | if (startday == null || endday == null) |
| | | { |
| | |
| | | { |
| | | return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day 格式不正确" }; |
| | | } |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByTimeRange_Out(Start, d, "1h"); //取水量 |
| | | var TotalWater = await ZyConnectHelper.GetTotalWaterByTimeRange_Out(Start, d, resolution); //取水量 |
| | | /* var one = TotalWater |
| | | .SelectMany(otdl => otdl.MonitorRecords); |
| | | var two = one.GroupBy(totalDay => totalDay.Time); |