|
@@ -29,11 +29,11 @@ func (s lightingRateService) getData(method string, tenantId int, req model.Requ
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- flag := 1
|
|
|
- flag2 := 0
|
|
|
+ flag := 1
|
|
|
+ flag2 := 0
|
|
|
if method == "month" {
|
|
|
- flag = 2
|
|
|
- flag2 = 1
|
|
|
+ flag = 2
|
|
|
+ flag2 = 1
|
|
|
}
|
|
|
|
|
|
forLightEnergy := edge_service.ForLightEnergy{}
|
|
@@ -61,9 +61,9 @@ func (s lightingRateService) getData(method string, tenantId int, req model.Requ
|
|
|
|
|
|
var months []string
|
|
|
if method == "month" {
|
|
|
- months = common.GetTimeMonths(req.StartTime, req.EndTime)
|
|
|
+ months = common.GetTimeMonths(req.StartTime, req.EndTime)
|
|
|
} else {
|
|
|
- months = common.GetTimeDays(req.StartTime, req.EndTime)
|
|
|
+ months = common.GetTimeDays(req.StartTime, req.EndTime)
|
|
|
}
|
|
|
|
|
|
for _, month := range months {
|
|
@@ -76,7 +76,7 @@ func (s lightingRateService) getData(method string, tenantId int, req model.Requ
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
var lightingRate float64
|
|
|
var lightControlNum, lightingNum int
|
|
|
for _, rate := range lightRates {
|
|
@@ -90,7 +90,7 @@ func (s lightingRateService) getData(method string, tenantId int, req model.Requ
|
|
|
lightingNum += rate.Number
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
list = append(list, model.ResponseLightingRate{
|
|
|
CountTime: month,
|
|
|
EnergyNum: common.Decimal(monthEnergyNum),
|