[FE API] 更新報表管理,查詢多棟語法
This commit is contained in:
parent
6d921955b4
commit
0f675b4eba
@ -83,9 +83,9 @@ namespace FrontendWebApi.ApiControllers
|
||||
string tag_quantity = await backendRepository.GetOneAsync<string>("select system_value from variable where system_type = 'obixConfig' and system_key = 'tag_quantity' and deleted = 0");
|
||||
|
||||
if (tag_quantity == "5")
|
||||
buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) = @building_tag ";
|
||||
buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) in (@building_tag) ";
|
||||
else
|
||||
buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) = @building_tag ";
|
||||
buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) in (@building_tag) ";
|
||||
|
||||
//if (input.floor_tag.Count > 0)
|
||||
//{
|
||||
@ -256,9 +256,9 @@ namespace FrontendWebApi.ApiControllers
|
||||
string tag_quantity = await backendRepository.GetOneAsync<string>("select system_value from variable where system_type = 'obixConfig' and system_key = 'tag_quantity' and deleted = 0");
|
||||
|
||||
if (tag_quantity == "5")
|
||||
buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) = @building_tag ";
|
||||
buildingSql = " and SUBSTRING_INDEX(device_number, '_', 1) in (@building_tag) ";
|
||||
else
|
||||
buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) = @building_tag ";
|
||||
buildingSql = " and SUBSTRING_INDEX(SUBSTRING_INDEX(device_number, '_', 2), '_', -1) in (@building_tag) ";
|
||||
|
||||
if (input.floor_tag.Count > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user