[WebApi]水電報表Bug修正
This commit is contained in:
parent
0fe5ad831c
commit
785dbd0859
@ -314,16 +314,14 @@ namespace FrontendWebApi.ApiControllers
|
||||
string checkDataSql = $@"(SELECT sum(sub_result)
|
||||
FROM ( {month}
|
||||
) combined_result
|
||||
WHERE start_timestamp BETWEEN '{start_timestamp}' and '{end_timestamp}'
|
||||
GROUP BY device_number) ";
|
||||
WHERE start_timestamp BETWEEN '{start_timestamp}' and '{end_timestamp}') ";
|
||||
var existData = await backendRepository.GetAllAsync<string>(checkDataSql);
|
||||
if (existData.Count != 0)
|
||||
{
|
||||
result = $@"(SELECT sum(sub_result)
|
||||
result = $@"(SELECT ROUND(sum(sub_result))
|
||||
FROM ( {month}
|
||||
) combined_result
|
||||
WHERE start_timestamp BETWEEN '{start_timestamp}' and '{end_timestamp}'
|
||||
GROUP BY device_number) ";
|
||||
WHERE start_timestamp BETWEEN '{start_timestamp}' and '{end_timestamp}') ";
|
||||
}
|
||||
sqlString =
|
||||
$@"UPDATE {TenantBilltable}
|
||||
@ -416,6 +414,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
{
|
||||
t.start_timestamp = tb.start_timestamp;
|
||||
t.end_timestamp = tb.end_timestamp;
|
||||
t.tableType = t.device_name_tag == "E4" ? "elec": "water";
|
||||
await UpdateTenantBill(t);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user