Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
c93680eba3
@ -47,7 +47,7 @@ namespace SolarPower.Controllers
|
||||
}
|
||||
|
||||
|
||||
var temp_solarType_where = $@" ps.SolarType = 0";
|
||||
var temp_solarType_where = $@" ps.SolarType != 2";
|
||||
where.Add(temp_solarType_where);
|
||||
|
||||
var powerStations = myPowerStationService.GetMyPowerStations(myUser, 1, null, where, where_entities);
|
||||
|
||||
@ -47,7 +47,7 @@ namespace SolarPower.Controllers
|
||||
where_entities.Add("Filter", filter);
|
||||
}
|
||||
|
||||
var temp_solartype_where = @" ps.SolarType = 0";
|
||||
var temp_solartype_where = @" ps.SolarType != 2";
|
||||
where.Add(temp_solartype_where);
|
||||
|
||||
var powerStations = myPowerStationService.GetMyPowerStations(myUser, 1, null, where, where_entities);
|
||||
|
||||
@ -38,7 +38,7 @@ namespace SolarPower.Repository.Implement
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
SUM(TOTALKWH) AS All_kwh,
|
||||
SUM(TOTALCARBON) AS All_Carbon
|
||||
from (SELECT psm.PowerStationId, max(psm.TIMESTAMP) AS TIMESTAMP FROM power_station_history_month psm WHERE PowerStationId IN (8) GROUP BY PowerStationId) a
|
||||
from (SELECT psm.PowerStationId, max(psm.TIMESTAMP) AS TIMESTAMP FROM power_station_history_month psm WHERE PowerStationId IN @ids GROUP BY PowerStationId) a
|
||||
LEFT JOIN power_station_history_month psm ON a.PowerStationId = psm.PowerStationId AND a.TIMESTAMP = psm.TIMESTAMP
|
||||
)
|
||||
AS m,
|
||||
@ -74,8 +74,8 @@ namespace SolarPower.Repository.Implement
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
SUM(TOTALKWH) AS All_kwh,
|
||||
SUM(TOTALCARBON) AS All_Carbon
|
||||
from power_station_history_month
|
||||
WHERE PowerStationId IN @ids
|
||||
from (SELECT psm.PowerStationId, max(psm.TIMESTAMP) AS TIMESTAMP FROM power_station_history_month psm WHERE PowerStationId IN @ids GROUP BY PowerStationId) a
|
||||
LEFT JOIN power_station_history_month psm ON a.PowerStationId = psm.PowerStationId AND a.TIMESTAMP = psm.TIMESTAMP
|
||||
)
|
||||
AS m,
|
||||
(
|
||||
@ -105,8 +105,8 @@ namespace SolarPower.Repository.Implement
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
SUM(TOTALKWH) AS All_kwh,
|
||||
SUM(TOTALCARBON) AS All_Carbon
|
||||
from power_station_history_month
|
||||
WHERE PowerStationId IN @ids
|
||||
from (SELECT psm.PowerStationId, max(psm.TIMESTAMP) AS TIMESTAMP FROM power_station_history_month psm WHERE PowerStationId IN @ids GROUP BY PowerStationId) a
|
||||
LEFT JOIN power_station_history_month psm ON a.PowerStationId = psm.PowerStationId AND a.TIMESTAMP = psm.TIMESTAMP
|
||||
)
|
||||
AS m,
|
||||
(
|
||||
@ -136,8 +136,8 @@ namespace SolarPower.Repository.Implement
|
||||
SUM(TOTALMONEY) AS All_money,
|
||||
SUM(TOTALKWH) AS All_kwh,
|
||||
SUM(TOTALCARBON) AS All_Carbon
|
||||
from power_station_history_month
|
||||
WHERE PowerStationId IN @ids
|
||||
from (SELECT psm.PowerStationId, max(psm.TIMESTAMP) AS TIMESTAMP FROM power_station_history_month psm WHERE PowerStationId IN @ids GROUP BY PowerStationId) a
|
||||
LEFT JOIN power_station_history_month psm ON a.PowerStationId = psm.PowerStationId AND a.TIMESTAMP = psm.TIMESTAMP
|
||||
)
|
||||
AS m,
|
||||
(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user