diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index b390619..af06e51 100644 --- a/FrontendWebApi/ApiControllers/BuildController.cs +++ b/FrontendWebApi/ApiControllers/BuildController.cs @@ -690,5 +690,37 @@ namespace FrontendWebApi.ApiControllers return Ok(apiResult); } + + [HttpPost] + [Route("api/GetAllfloor")] + public async Task>>> GetAllfloor(string building_tag) + { + ApiResult> apiResult = new ApiResult>(jwt_str); + if (!jwtlife) + { + apiResult.Code = "5000"; + return BadRequest(apiResult); + } + try + { + string sWhere = $@" + SELECT + full_name + FROM floor + where building_guid = @building_tag and deleted = 0"; + var floor = await backendRepository.GetAllAsync(sWhere, new { building_tag = building_tag }); + + apiResult.Data = floor; + apiResult.Code = "0000"; + } + catch (Exception exception) + { + apiResult.Code = "9999"; + Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); + return Ok(apiResult); + } + return Ok(apiResult); + + } } }