[後端] 修改前台 class building_tag問題

This commit is contained in:
dev02 2023-05-19 14:22:05 +08:00
parent 606826eb66
commit c1a05f2207
3 changed files with 11 additions and 11 deletions

View File

@ -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<building_floor>(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<FloorForB>()
};
@ -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<GroupBuildings>()
};
var buds = diss.GroupBy(a => a.device_building_guid);
var buds = diss.GroupBy(a => a.device_building_tag);
getDeviceGroup1.groupBuildings = new List<GroupBuildings>();
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<GroupFloor>()

View File

@ -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<GroupFloor> 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<FloorForB> 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; }

View File

@ -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; }