feat(report):基本完成园区报表概况的录入,待测。

This commit is contained in:
徐涛
2022-08-21 12:30:57 +08:00
parent 0eb3be025c
commit 6edee68df6
2 changed files with 45 additions and 2 deletions

View File

@@ -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
}