forked from free-lancers/electricity_bill_calc_service
enhance(report):在初始化报表的时候,一并初始化园区电量概要。
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"electricity_bill_calc/model"
|
||||
"electricity_bill_calc/response"
|
||||
"electricity_bill_calc/security"
|
||||
"electricity_bill_calc/service"
|
||||
@@ -64,8 +63,7 @@ func initializeNewReport(c *gin.Context) {
|
||||
result.NotAccept("只能初始化已发布报表下一个月份的新报表。")
|
||||
return
|
||||
}
|
||||
newReport := model.Report{ParkId: requestParkId, Period: reportPeriod}
|
||||
err = service.ReportService.InitializeNewReport(newReport)
|
||||
err = service.ReportService.InitializeNewReport(requestParkId, reportPeriod)
|
||||
if err != nil {
|
||||
result.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user