作者 陈志颖

合并分支 'dev' 到 'test'

fix:金额激励分红弹窗预算金额精度处理



查看合并请求 !42
@@ -5,6 +5,7 @@ import ( @@ -5,6 +5,7 @@ import (
5 "github.com/linmadan/egglib-go/core/application" 5 "github.com/linmadan/egglib-go/core/application"
6 pgTransaction "github.com/linmadan/egglib-go/transaction/pg" 6 pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
7 "github.com/linmadan/egglib-go/utils/tool_funs" 7 "github.com/linmadan/egglib-go/utils/tool_funs"
  8 + "github.com/shopspring/decimal"
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/command" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/command"
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/dto" 10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/dto"
10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/query" 11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/application/dividendsEstimate/query"
@@ -1143,10 +1144,13 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentives @@ -1143,10 +1144,13 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentives
1143 // 统计生成的预算单数目 1144 // 统计生成的预算单数目
1144 countDividendsEstimate = countDividendsEstimate + 1 1145 countDividendsEstimate = countDividendsEstimate + 1
1145 1146
  1147 + // 分红金额精度处理
  1148 + dividendsAmount, _ := decimal.NewFromFloatWithExponent(dividendsEstimateDetail.DividendsAmount, -2).Float64()
  1149 +
1146 dividendsEstimate := &domain.DividendsEstimate{ 1150 dividendsEstimate := &domain.DividendsEstimate{
1147 DividendsEstimateId: 0, 1151 DividendsEstimateId: 0,
1148 DividendsAccountStatus: domain.TO_BE_ACCOUNT, 1152 DividendsAccountStatus: domain.TO_BE_ACCOUNT,
1149 - DividendsAmount: dividendsEstimateDetail.DividendsAmount, 1153 + DividendsAmount: dividendsAmount,
1150 DividendsEstimateOrderNumber: dividendsEstimateOrderNumber, 1154 DividendsEstimateOrderNumber: dividendsEstimateOrderNumber,
1151 DividendsEstimateTime: time.Now(), 1155 DividendsEstimateTime: time.Now(),
1152 DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType, 1156 DividendsParticipateType: dividendsEstimateDetail.DividendsParticipateType,