diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index c704768..9ad47f9 100644 --- a/FrontendWebApi/ApiControllers/BuildController.cs +++ b/FrontendWebApi/ApiControllers/BuildController.cs @@ -240,7 +240,7 @@ namespace FrontendWebApi.ApiControllers apiResult.Code = "5000"; return BadRequest(apiResult); } - if (get.building_guid == null || get.main_system_guid == null || get.sub_system_guid == null) + if (get.building_tag == null || get.main_system_tag == null || get.sub_system_tag == null) { apiResult.Code = "9997"; return Ok(apiResult); @@ -248,12 +248,12 @@ namespace FrontendWebApi.ApiControllers try { var sub_system = await backendRepository.GetOneAsync(@$"select ss.full_name subfull_name,me.* from building_menu me - left join sub_system ss on ss.sub_system_guid = me.sub_system_guid - where me.building_guid = '{get.building_guid}' and me.main_system_guid = '{get.main_system_guid}' and me.sub_system_guid = '{get.sub_system_guid}' order by ss.priority"); + left join sub_system ss on ss.sub_system_tag = me.sub_system_tag + where me.building_tag = '{get.building_tag}' and me.main_system_tag = '{get.main_system_tag}' and me.sub_system_tag = '{get.sub_system_tag}' order by ss.priority"); List Floors = new List(); var floorsql = await backendRepository.GetAllAsync($@" - select * from (select * from sub_system_floor ssf where ssf.deleted = 0 and ssf.status = 0 and ssf.building_guid = '{get.building_guid}' and ssf.main_system_guid = '{get.main_system_guid}' and ssf.sub_system_guid = '{get.sub_system_guid}') a + select * from (select * from sub_system_floor ssf where ssf.deleted = 0 and ssf.status = 0 and ssf.building_tag = '{get.building_tag}' and ssf.main_system_guid = '{get.main_system_tag}' and ssf.sub_system_tag = '{get.sub_system_tag}') a left join floor on floor.floor_guid = a.floor_guid order by floor.priority"); Sub_system sub_System = new Sub_system() {