Browse Source

Merge branch 'cygx_fix_bug_paidian_03-27' of http://8.136.199.33:3000/hongze/hz_crm_api

xingzai 11 months ago
parent
commit
86660993de
1 changed files with 2 additions and 1 deletions
  1. 2 1
      controllers/cygx/contract_allocation.go

+ 2 - 1
controllers/cygx/contract_allocation.go

@@ -13,6 +13,7 @@ import (
 	"hongze/hz_crm_api/models/system"
 	cygxService "hongze/hz_crm_api/services/cygx"
 	"hongze/hz_crm_api/utils"
+	"math"
 	"os"
 	"path/filepath"
 	"strconv"
@@ -519,7 +520,7 @@ func (this *ContractAllocationController) CompanyContracDetail() {
 	for _, p := range hasPermissions {
 		hasMap[p.ChartPermissionId] = p
 		if p.ChartPermissionId == utils.YAN_XUAN_KOU_DIAN_BAO_ID {
-			pointMoney = 0.2 * p.Points
+			pointMoney = math.Round(0.2*p.Points*100) / 100 // 将给定数字舍入到最近的整数,处理精度问题
 		}
 	}