Merge branch 'new' into 'master'

update 风险相关

See merge request root/tfse_rating!31
This commit is contained in:
王思川 2022-02-09 08:38:12 +00:00
commit 8abe7f1d21
1 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,8 @@ def management_risk(param):
score['股权出质'] = 5 if param['股权出质'] >= 10 else round(param['股权出质'] * 0.5, 2) score['股权出质'] = 5 if param['股权出质'] >= 10 else round(param['股权出质'] * 0.5, 2)
score['法人变更'] = 1.5 if param['法人变更'] >= 10 else round(param['法人变更'] * 0.15, 2) score['法人变更'] = 1.5 if param['法人变更'] >= 10 else round(param['法人变更'] * 0.15, 2)
score['主要成员变更'] = 1.5 if param['主要成员变更'] >= 10 else round(param['主要成员变更'] * 0.15, 2) score['主要成员变更'] = 1.5 if param['主要成员变更'] >= 10 else round(param['主要成员变更'] * 0.15, 2)
score['合计'] = round(sum(score.values()), 2) total_score = round(sum(score.values()), 2)
score['合计'] = 10 if total_score > 10 else total_score
return score return score
@ -45,6 +46,7 @@ def peripheral_risk(param):
score['周边风险']['高风险'] = 5 if param['周边风险']['高风险'] >= 25 else round(param['周边风险']['高风险'] * 0.2, 2) score['周边风险']['高风险'] = 5 if param['周边风险']['高风险'] >= 25 else round(param['周边风险']['高风险'] * 0.2, 2)
score['周边风险']['警示'] = 5 if param['周边风险']['警示'] >= 50 else round(param['周边风险']['警示'] * 0.1, 2) score['周边风险']['警示'] = 5 if param['周边风险']['警示'] >= 50 else round(param['周边风险']['警示'] * 0.1, 2)
score['周边风险']['合计'] = sum(score['周边风险'].values()) score['周边风险']['合计'] = sum(score['周边风险'].values())
score['合计'] = score['周边风险']['合计'] total_score = sum(score['周边风险'].values())
score['合计'] = 10 if total_score > 10 else total_score
return score return score