diff --git a/SolarPower/Repository/Implement/PowerStationRepository.cs b/SolarPower/Repository/Implement/PowerStationRepository.cs
index d42fbb6..a9609f1 100644
--- a/SolarPower/Repository/Implement/PowerStationRepository.cs
+++ b/SolarPower/Repository/Implement/PowerStationRepository.cs
@@ -2126,7 +2126,7 @@ namespace SolarPower.Repository.Implement
{
var sql = $"SELECT * FROM {db_name}.{table_name} WHERE {where}";
- result = await conn.QueryFirstOrDefaultAsync(sql);
+ result = await conn.QueryFirstOrDefaultAsync(sql, commandTimeout: 600);
}
catch (Exception exception)
{
@@ -6147,10 +6147,10 @@ namespace SolarPower.Repository.Implement
{
var sql = $@"SELECT * FROM
- (SELECT a.SITEID AS Avg FROM {dbname}.s{code}01_sensoravg a ORDER BY a.ID DESC LIMIT 1) a,
- (SELECT a.SITEID AS Inv_site,a.INVERTERID as Inv_inveter FROM {dbname}.s{code}01_inv a ORDER BY a.ID DESC LIMIT 1) b,
- (SELECT a.SITEID AS Station FROM {dbname}.s{code}01_station a ORDER BY a.ID DESC LIMIT 1) c,
- (SELECT a.SITEID AS Sensor FROM {dbname}.s{code}01_sensor a ORDER BY a.ID DESC LIMIT 1) d
+ (SELECT count(*) ctAvg, a.SITEID AS Avg FROM {dbname}.s{code}01_sensoravg a ORDER BY a.ID DESC LIMIT 1) a,
+ (SELECT count(*) ctInv_site, a.SITEID AS Inv_site,a.INVERTERID as Inv_inveter FROM {dbname}.s{code}01_inv a ORDER BY a.ID DESC LIMIT 1) b,
+ (SELECT count(*) ctStation, a.SITEID AS Station FROM {dbname}.s{code}01_station a ORDER BY a.ID DESC LIMIT 1) c,
+ (SELECT count(*) ctSensor, a.SITEID AS Sensor FROM {dbname}.s{code}01_sensor a ORDER BY a.ID DESC LIMIT 1) d
";
resule = await conn.QueryFirstOrDefaultAsync(sql);