diff --git a/excel/meter_non_pv_template.go b/excel/meter_non_pv_template.go index 752c256..33392fd 100644 --- a/excel/meter_non_pv_template.go +++ b/excel/meter_non_pv_template.go @@ -75,8 +75,8 @@ func (t *MeterNonPVExcelTemplateGenerator) WriteMeterData(meters []model.EndUser meter.MeterId, meter.Ratio, meter.LastPeriodOverall, - "0", - "0", + meter.CurrentPeriodOverall, + meter.AdjustOverall, }, excelize.RowOpts{Height: 15}, ); err != nil { diff --git a/excel/meter_pv_template.go b/excel/meter_pv_template.go index 5c1c18e..0121699 100644 --- a/excel/meter_pv_template.go +++ b/excel/meter_pv_template.go @@ -84,17 +84,17 @@ func (t *MeterPVExcelTemplateGenerator) WriteMeterData(meters []model.EndUserDet meter.MeterId, meter.Ratio, meter.LastPeriodOverall, - "0", + meter.CurrentPeriodOverall, meter.LastPeriodCritical, - "0", + meter.CurrentPeriodCritical, meter.LastPeriodPeak, - "0", + meter.CurrentPeriodPeak, meter.LastPeriodValley, - "0", - "0", - "0", - "0", - "0", + meter.CurrentPeriodValley, + meter.AdjustOverall, + meter.AdjustCritical, + meter.AdjustPeak, + meter.AdjustValley, }, excelize.RowOpts{Height: 15}, ); err != nil { diff --git a/service/end_user.go b/service/end_user.go index a45891d..022e810 100644 --- a/service/end_user.go +++ b/service/end_user.go @@ -78,7 +78,7 @@ func (_EndUserService) AllEndUserRecord(reportId string) ([]model.EndUserDetail, users := make([]model.EndUserDetail, 0) err := global.DBConn. Where(builder.Eq{"report_id": reportId}). - Asc("seq"). + Asc("seq", "meter_04kv_id"). Find(&users) cache.CacheSearch(users, []string{"end_user_detail", "report", "park"}, "end_user_detail", "report", reportId) return users, err