[前台] MeterList 後端程序調整

This commit is contained in:
dev01 2023-05-12 14:55:43 +08:00
parent 7dc2e0b5ae
commit 40a3cf68e6

View File

@ -73,7 +73,7 @@ namespace FrontendWebApi.ApiControllers
{sqlWhere}
order by created_at desc;";
var rawData = await backendRepository.GetAllAsync<HydroMeterRawDataOutput>(sql,
new { table = table, starTime = startTime, endtime = endTime, building_tag = input.building_tag, floor_tag = input.floor_tag });
new { startTime = startTime, endtime = endTime, building_tag = input.building_tag, floor_tag = input.floor_tag, dateFormat = dateFormat });
var list = rawData
.GroupBy(x => new { building_tag = x.device_number.Split("_")[0], floor_tag = x.device_number.Split("_")[2], device_serial_tag = x.device_number.Split("_")[4] })
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag })