forked from free-lancers/electricity_bill_calc_service
feat(report):基本完成园区报表概况的录入,待测。
This commit is contained in:
@@ -146,7 +146,7 @@ func (_ReportService) RetreiveReportIndex(rid string) (*model.Report, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (_ReportService) RetreiveParkSummary(rid string) (*model.ReportSummary, error) {
|
||||
func (_ReportService) RetreiveReportSummary(rid string) (*model.ReportSummary, error) {
|
||||
var summary = new(model.ReportSummary)
|
||||
_, err := global.DBConn.ID(rid).Get(summary)
|
||||
if err != nil {
|
||||
@@ -154,3 +154,8 @@ func (_ReportService) RetreiveParkSummary(rid string) (*model.ReportSummary, err
|
||||
}
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
func (_ReportService) UpdateReportSummary(summary *model.ReportSummary) error {
|
||||
_, err := global.DBConn.ID(summary.ReportId).Cols("overall", "overall_fee", "critical", "critical_fee", "peak", "peak_fee", "valley", "valley_fee", "basic_fee", "adjust_fee").Update(summary)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user