From 2c829f7fd48cd4963f0efdd16ee8ec99217ba565 Mon Sep 17 00:00:00 2001 From: dev01 Date: Wed, 2 Nov 2022 09:15:06 +0800 Subject: [PATCH] =?UTF-8?q?[FrontedWebApi]=20BuildController=20=E9=83=A8?= =?UTF-8?q?=E5=88=86guid=E6=94=B9=E6=88=90tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/BuildController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() {