doc(calculate): 优化代码格式,删除部分无用打印语句

This commit is contained in:
ZiHangQin 2023-08-15 15:20:59 +08:00
parent 59a604bab0
commit 0f91b8a332
3 changed files with 5 additions and 7 deletions

View File

@ -100,7 +100,6 @@ func initNewReportCalculateTask(c *fiber.Ctx) error {
return err
}
ok, err := service.ReportService.CreateNewReport(&form)
log.Println("??????????????????????kkkkkkkkkkkkkkkkkkkkkkkkk", ok)
if err != nil {
reportLog.Error("无法创建核算报表", zap.Error(err))
return result.Error(fiber.StatusInternalServerError, "无法创建核算报表。")

View File

@ -13,7 +13,6 @@ import (
"github.com/jackc/pgx/v5"
"github.com/shopspring/decimal"
"golang.org/x/sync/errgroup"
"log"
"time"
"github.com/doug-martin/goqu/v9"
@ -40,7 +39,7 @@ func (cr _CalculateRepository) UpdateReportCalculateStatus(rid string, status st
var atio int
var err error
log.Println("11111111111", status)
currentTime := time.Now()
if status == "success" {
atio = 1 //创建报表成功

View File

@ -217,7 +217,7 @@ func (rs _ReportService) CreateNewReport(createFrom *vo.ReportCreationForm) (boo
rs.log.Error("创建核算报表错误", zap.Error(err))
return false, err
}
log.Println("创建成功successsssssssssssssssssssssssssssssssssssssssssssssssssssss")
if !state {
status, err := repository.CalculateRepository.UpdateReportCalculateStatus(report, "InsufficientData",
@ -228,13 +228,13 @@ func (rs _ReportService) CreateNewReport(createFrom *vo.ReportCreationForm) (boo
}
return status, nil
}
log.Println("更新成功succssssssssssssssss")
err = rs.CalculateReport(report)
if err != nil {
rs.log.Error("计算时出错", zap.Error(err))
return false, err
}
log.Println("返回truettttttttttttttttttt")
return true, nil
}
@ -270,7 +270,7 @@ func (rs _ReportService) CalculateReport(rid string) error {
//defer semaphore.Unlock()
errs := calculate.MainCalculateProcess(rid)
log.Println("开始计算555555555555555555555555555")
if errs == nil {
_, err := repository.CalculateRepository.UpdateReportCalculateStatus(rid, "success", "")
if err != nil {