fix(calculate): 修复创建报表时的状态错误

This commit is contained in:
ZiHangQin 2023-08-09 16:24:16 +08:00
parent ed10996a06
commit 7f46f2f36b
3 changed files with 10 additions and 9 deletions

View File

@ -43,9 +43,9 @@ func (cr _CalculateRepository) UpdateReportCalculateStatus(rid string, status st
log.Println("11111111111", status)
currentTime := time.Now()
if status == "success" {
atio = 0
atio = 1 //创建报表成功
} else {
atio = 1
atio = 2 // 数据不足
}
updateResultSql, updateResultArgs, _ := cr.ds.

View File

@ -67,11 +67,12 @@ func MainCalculateProcess(rid string) error {
parkTotal := TotalConsumptionCalculate(tenementReports, summary)
//计算线损以及调整线损
err = LossCalculate(report, parkMetersReports, &parkTotal, &summary)
if err != nil {
fmt.Println("9", err)
return err
}
//err = LossCalculate(report, parkMetersReports, &parkTotal, &summary)
//if err != nil {
// fmt.Println("9", err)
// return err
//}
fmt.Println(parkTotal)
// 计算所有已经启用的商铺面积总和,仅计算所有未迁出的商户的所有表计对应的商铺面积。
_, err = EnabledAreaCalculate(&tenementReports, &summary)

View File

@ -12,9 +12,9 @@ Server:
ReadTimeout: 60
WriteTimeout: 60
Redis:
Host: 192.168.88.129
Host: 127.0.0.1
Port: 6379
Password: 123456
Password:
DB: 1
Service:
MaxSessionLife: 2h