Commit 6d9aeb15 by Joneq

增加万元的适配

parent 4749fa99
......@@ -89,6 +89,9 @@ func GetCompanyModelItemsByProjectidWitchString(project_id int64 , stringVal str
}
func GetScore(projectId int64, stringVal string) (fianlscore float64) {
var score float64
ctx := context.Background()
connect := dao.New()
modelTypeInfo,_ := connect.GetCompanyModelByProjectid(ctx,projectId)
......@@ -102,7 +105,14 @@ func GetScore(projectId int64, stringVal string) (fianlscore float64) {
modelInfo = GetCompanyModelItemsByProjectid(projectId,StringTurnFloat64(stringVal))
}
return StringTurnFloat64(modelInfo["score"])
switch modelInfo["unit"] {
case "万元":
score = StringTurnFloat64(modelInfo["score"]) /10000
break
default:
score = StringTurnFloat64(modelInfo["score"]) /1
}
return score
}
//设置分数
......
......@@ -64,7 +64,6 @@ func ChangeslegalInFiveYears() {
//注册资本(2分)
func RegisteredCapital() {
c_currentScore = GetScore(11,companyBasicInfo["registered_capital"])
c_currentScore = c_currentScore / 10000
c_totalScore[3]= SetScore(c_currentScore,11)
SetInsertScoreChanFooter(1,1,11)
}
......
package main
import "strconv"
import (
"strconv"
)
var(
h_currentScore float64
......@@ -71,7 +73,6 @@ func HistoricalOverdueTimes() {
//近3个月的平均交易额(10分)
func AverageMoneyThreeMonths() {
h_currentScore = GetScore(33,basicInfo["recently_three_average_amount"])
h_totalScore[4]= SetScore(h_currentScore,33)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment