[Webapi]修改部分語法Bug
This commit is contained in:
parent
9d24a97e3e
commit
788989a0e2
@ -269,7 +269,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
// 找出資料庫存在的水電月份表
|
// 找出資料庫存在的水電月份表
|
||||||
string checkTabelSql = $@"SELECT TABLE_NAME
|
string checkTabelSql = $@"SELECT TABLE_NAME
|
||||||
FROM INFORMATION_SCHEMA.TABLES
|
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);
|
var existTable = await backendRepository.GetAllAsync<string>(checkTabelSql);
|
||||||
|
|
||||||
for (var i = 0; i <= monthsApart; i++)
|
for (var i = 0; i <= monthsApart; i++)
|
||||||
@ -477,7 +477,8 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
FROM archive_electric_meter_tenant_bill a
|
FROM archive_electric_meter_tenant_bill a
|
||||||
JOIN archive_electric_meter_tenant_list b ON a.tenant_guid = b.tenant_guid
|
JOIN archive_electric_meter_tenant_list b ON a.tenant_guid = b.tenant_guid
|
||||||
join device c on a.device_number = c.device_number
|
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);
|
outputBill = await backendRepository.GetAllAsync<OutputBill>(sqlString);
|
||||||
string filePath = CreateOutputForm(outputBill);
|
string filePath = CreateOutputForm(outputBill);
|
||||||
|
Loading…
Reference in New Issue
Block a user