参考临界值

This commit is contained in:
huang 2016-06-24 10:05:49 +08:00
parent e6b263feb5
commit dcd2aa7848
1 changed files with 17 additions and 17 deletions

View File

@ -2,45 +2,45 @@ module QualityAnalysisHelper
def sqale_rating_status val
if val.to_i > 0 && val.to_i < 5
"henhao"
"很好"
elsif val.to_i > 5 && val.to_i < 10
"jiaohao"
"较好"
elsif val.to_i > 10 && val.to_i < 20
"zhongdeng"
"中等"
elsif val.to_i > 20 && val.to_i < 50
"jiaocha"
"较差"
elsif val.to_i > 20
"hencha"
"很差"
end
end
def complexity_status val
if val.to_i < 10
"zhengchang"
"良好"
elsif val.to_i > 10 && val.to_i < 15
"yiban"
"较高"
elsif val.to_i > 15
"cha"
"很高"
end
end
def duplicated_lines_density_status val
if val.to_i < 30
"zhengchang"
"良好"
elsif val.to_i > 30 && val.to_i < 50
"jiaogao"
"较高"
elsif val.to_i > 50
"gao"
"很高"
end
end
def comment_lines_density_status val
if val.to_i < 20
"paindi"
"较低"
elsif val.to_i > 20 && val.to_i < 50
"jiaohao"
"正常"
elsif val.to_i > 50
"hao"
"较高"
end
end
@ -60,11 +60,11 @@ module QualityAnalysisHelper
def lines_scale val
if val.to_i < 5000
"zhongdeng"
"小型"
elsif val.to_i >5000 && val.to_i < 50000
"zhongdneg"
"中型"
else
"da"
"大型"
end
end