forked from free-lancers/electricity_bill_calc_service
fix(enduser):修正抄表时,平段部分的计算。
This commit is contained in:
@@ -210,6 +210,10 @@ func (es _EndUserService) BatchImportNonPVRegister(reportId string, file io.Read
|
||||
}); has {
|
||||
if appears.Appears <= 1 {
|
||||
elem.LastPeriodOverall = im.LastPeriodOverall
|
||||
elem.LastPeriodCritical = decimal.Zero
|
||||
elem.LastPeriodPeak = decimal.Zero
|
||||
elem.LastPeriodValley = decimal.Zero
|
||||
elem.LastPeriodFlat = elem.LastPeriodOverall.Sub(elem.LastPeriodCritical).Sub(elem.LastPeriodPeak).Sub(elem.LastPeriodValley)
|
||||
elem.Initialize = true
|
||||
}
|
||||
}
|
||||
@@ -303,6 +307,7 @@ func (es _EndUserService) BatchImportPVRegister(reportId string, file io.Reader)
|
||||
elem.LastPeriodCritical = im.LastPeriodCritical.Decimal
|
||||
elem.LastPeriodPeak = im.LastPeriodPeak.Decimal
|
||||
elem.LastPeriodValley = im.LastPeriodValley.Decimal
|
||||
elem.LastPeriodFlat = elem.LastPeriodOverall.Sub(elem.LastPeriodCritical).Sub(elem.LastPeriodPeak).Sub(elem.LastPeriodValley)
|
||||
elem.Initialize = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user