[後端] 修改水電報表設備tag
This commit is contained in:
parent
9bd6ca4a31
commit
afc2604353
@ -143,7 +143,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
else
|
||||
{
|
||||
list = rawData
|
||||
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[3] })
|
||||
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[7] })
|
||||
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag })
|
||||
.ToList();
|
||||
}
|
||||
@ -160,7 +160,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
else
|
||||
{
|
||||
l.rawData.AddRange(
|
||||
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[3] == l.device_serial_tag)
|
||||
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[7] == l.device_serial_tag)
|
||||
);
|
||||
}
|
||||
l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0",
|
||||
@ -304,7 +304,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
else
|
||||
{
|
||||
list = rawData
|
||||
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[3] })
|
||||
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[7] })
|
||||
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag })
|
||||
.ToList();
|
||||
}
|
||||
@ -321,7 +321,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
else
|
||||
{
|
||||
l.rawData.AddRange(
|
||||
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[3] == l.device_serial_tag)
|
||||
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[7] == l.device_serial_tag)
|
||||
);
|
||||
}
|
||||
l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0",
|
||||
|
Loading…
Reference in New Issue
Block a user