caipin 4 年之前
父节点
当前提交
e79a17aa2a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      services/tree_service.go

+ 2 - 2
services/tree_service.go

@@ -233,7 +233,7 @@ func (s *treeService) GetAllContract(projectId int, account *models.CmProjectAcc
 				ContractsReturned = 0
 				ContractsReturned = 0
 				folder.ContractsIncomeProgress = "0%"
 				folder.ContractsIncomeProgress = "0%"
 			} else {
 			} else {
-				folder.ContractsIncomeProgress = fmt.Sprintf("%.0f", (ContractsReturned/ContractsIncome)*100) + "%"
+				folder.ContractsIncomeProgress = fmt.Sprintf("%.2f", (ContractsReturned/ContractsIncome)*100) + "%"
 			}
 			}
 
 
 			contractsPay, _ := strconv.ParseFloat(data.ContractsPay, 64)
 			contractsPay, _ := strconv.ParseFloat(data.ContractsPay, 64)
@@ -251,7 +251,7 @@ func (s *treeService) GetAllContract(projectId int, account *models.CmProjectAcc
 				ContractsPaid = 0
 				ContractsPaid = 0
 				folder.ContractsPayProgress = "0%"
 				folder.ContractsPayProgress = "0%"
 			} else {
 			} else {
-				folder.ContractsPayProgress = fmt.Sprintf("%.0f", (ContractsPaid/ContractsPay)*100) + "%"
+				folder.ContractsPayProgress = fmt.Sprintf("%.2f", (ContractsPaid/ContractsPay)*100) + "%"
 			}
 			}
 
 
 			// 安全
 			// 安全