diff --git a/FrontendWebApi/ApiControllers/EmergencyDeviceController.cs b/FrontendWebApi/ApiControllers/EmergencyDeviceController.cs index 4dba11c..839648c 100644 --- a/FrontendWebApi/ApiControllers/EmergencyDeviceController.cs +++ b/FrontendWebApi/ApiControllers/EmergencyDeviceController.cs @@ -73,12 +73,12 @@ namespace FrontendWebApi.ApiControllers var sqlString = @$"select f.floor_guid ,f.full_name floorname,b.building_tag,b.full_name buildingname from floor f left join building b on b.building_tag = f.building_tag order by f.building_tag , f.priority"; Building_floor = await backendRepository.GetAllAsync(sqlString); - var builds = Building_floor.GroupBy(a => a.building_guid).ToList(); + var builds = Building_floor.GroupBy(a => a.building_tag).ToList(); foreach (var floor in builds) { BuildingToF buildingToF1 = new BuildingToF() { - building_guid = floor.Select(a => a.building_guid).FirstOrDefault(), + building_tag = floor.Select(a => a.building_tag).FirstOrDefault(), building_name = floor.Select(a => a.buildingname).FirstOrDefault(), floors = new List() }; @@ -194,7 +194,7 @@ namespace FrontendWebApi.ApiControllers { {"@emergency_event_guid",newguid}, {"@disaster",eventpost.disaster}, - {"@building_guid", eventpost.build}, + {"@building_tag", eventpost.build}, {"@device_guid",eventpost.device }, {"@type",eventpost.type} }; @@ -507,13 +507,13 @@ namespace FrontendWebApi.ApiControllers Name = diss.Select(a => a.disater_name).FirstOrDefault().ToString(), groupBuildings = new List() }; - var buds = diss.GroupBy(a => a.device_building_guid); + var buds = diss.GroupBy(a => a.device_building_tag); getDeviceGroup1.groupBuildings = new List(); foreach (var bud in buds) { GroupBuildings groupBuildings = new GroupBuildings() { - guid = bud.Key, + tag = bud.Key, name = bud.Select(a => a.building_name).FirstOrDefault().ToString(), device_amount = 0, groupFloors = new List() diff --git a/FrontendWebApi/Models/EmergencyDevice.cs b/FrontendWebApi/Models/EmergencyDevice.cs index 4e55131..4f8eaec 100644 --- a/FrontendWebApi/Models/EmergencyDevice.cs +++ b/FrontendWebApi/Models/EmergencyDevice.cs @@ -8,7 +8,7 @@ namespace FrontendWebApi.Models public class EmergencyDeviceGroup { public string device_disaster { get; set; } - public string device_building_guid { get; set; } + public string device_building_tag { get; set; } public string device_floor_guid { get; set; } public string device_system_category_layer2 { get; set; } public string device_system_category_layer3 { get; set; } @@ -35,7 +35,7 @@ namespace FrontendWebApi.Models public class GroupBuildings { - public string guid { get; set; } + public string tag { get; set; } public string name { get; set; } public int device_amount { get; set; } public List groupFloors { get; set; } @@ -68,13 +68,13 @@ namespace FrontendWebApi.Models { public string floor_guid { get; set; } public string floorname { get; set; } - public string building_guid { get; set; } + public string building_tag { get; set; } public string buildingname { get; set; } } public class BuildingToF { - public string building_guid { get; set; } + public string building_tag { get; set; } public string building_name { get; set; } public List floors { get; set; } } @@ -89,7 +89,7 @@ namespace FrontendWebApi.Models public string device_guid { get; set; } public string device_number { get; set; } public string device_name { get; set; } - public string building_guid { get; set; } + public string building_tag { get; set; } public string building_name { get; set; } public string ip_address { get; set; } public string layer2 { get; set; } diff --git a/FrontendWebApi/Models/RescueDevice.cs b/FrontendWebApi/Models/RescueDevice.cs index 708273c..f29939a 100644 --- a/FrontendWebApi/Models/RescueDevice.cs +++ b/FrontendWebApi/Models/RescueDevice.cs @@ -37,7 +37,7 @@ namespace FrontendWebApi.Models { public string rescue_device_guid { get; set; } public string rescue_device_id { get; set; } - public string building_guid { get; set; } + public string building_tag { get; set; } public string floor_guid { get; set; } public string floor_name { get; set; } public string location { get; set; }