fix(report):修复更新指定的核算任务与初始化一个新的核算任务

This commit is contained in:
2023-08-07 17:33:38 +08:00
parent 27a499b8cc
commit 69357f77dd
3 changed files with 6 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package calculate
import (
"electricity_bill_calc/model"
"fmt"
"github.com/shopspring/decimal"
"sync/atomic"
)
@@ -17,7 +18,7 @@ func CheckMeterArea(report *model.ReportIndex, meters []*model.MeterDetail) (boo
for _, m := range meters {
if (m.MeterType == model.METER_INSTALLATION_TENEMENT || m.MeterType == model.METER_INSTALLATION_POOLING) &&
m.Area == nil {
m.Area.Decimal == decimal.Zero {
atomic.AddInt32(&meterWithoutArea, 1)
}
}