[FrontedWebApi] BuildController 部分guid改成tag

This commit is contained in:
dev01 2022-11-02 09:15:06 +08:00
parent d8dba7a766
commit 2c829f7fd4

View File

@ -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<BuildMenuSql>(@$"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<Floor> Floors = new List<Floor>();
var floorsql = await backendRepository.GetAllAsync<Floorsql>($@"
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()
{