[Webapi]修改部分語法Bug

This commit is contained in:
張家睿 2024-02-27 11:01:32 +08:00
parent 9d24a97e3e
commit 788989a0e2

View File

@ -269,7 +269,7 @@ namespace FrontendWebApi.ApiControllers
// 找出資料庫存在的水電月份表
string checkTabelSql = $@"SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'ibms_dome_dome' and TABLE_NAME like 'archive_electric_water_meter_day_%'";
WHERE TABLE_SCHEMA like 'ibms_dome_%' and TABLE_NAME like 'archive_electric_water_meter_day_%'";
var existTable = await backendRepository.GetAllAsync<string>(checkTabelSql);
for (var i = 0; i <= monthsApart; i++)
@ -477,7 +477,8 @@ namespace FrontendWebApi.ApiControllers
FROM archive_electric_meter_tenant_bill a
JOIN archive_electric_meter_tenant_list b ON a.tenant_guid = b.tenant_guid
join device c on a.device_number = c.device_number
where {building_tag} ";
where {building_tag}
GROUP BY a.tenant_name;";
outputBill = await backendRepository.GetAllAsync<OutputBill>(sqlString);
string filePath = CreateOutputForm(outputBill);