debug: 前台樓層重複問題(未過濾 deleted)

This commit is contained in:
jiahao 2023-09-09 00:34:44 +08:00
parent d08754f8f6
commit 7650d4b359

View File

@ -330,7 +330,9 @@ namespace FrontendWebApi.ApiControllers
List<Floor> Floors = new List<Floor>(); List<Floor> Floors = new List<Floor>();
var floorsql = await backendRepository.GetAllAsync<Floorsql>($@" 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_tag = '{get.building_tag}' and ssf.main_system_tag = '{get.main_system_tag}' and ssf.sub_system_tag = '{get.sub_system_tag}') 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_tag = '{get.main_system_tag}' and ssf.sub_system_tag = '{get.sub_system_tag}') a
left join floor on floor.full_name = a.floor_tag and a.building_tag = floor.building_tag order by floor.priority"); left join floor on floor.full_name = a.floor_tag and a.building_tag = floor.building_tag
where floor.deleted = 0
order by floor.priority");
Sub_system sub_System = new Sub_system() Sub_system sub_System = new Sub_system()
{ {
sub_system_tag = sub_system.sub_system_tag, sub_system_tag = sub_system.sub_system_tag,