package com.huatek.busi.util;

import com.huatek.busi.entity.TransformerEvaluationResults;

public class TransformerEvaluationDescUtil {
	
	public static String safety1=  "故障对人身和环境有严重影响" ;
	public static String safety2=  "故障对人身和环境有较严重影响" ;
	public static String safety3=  "故障对人身和环境有一定影响" ;
	public static String safety4=  "故障对人身和环境不产生影响" ;
	

	public static String  reliability1 =  "在规定时间内和规定条件下完成规定功能的能力" ;
	public static String  reliability2 =  "操作可靠性低，设备质量稳定性差，故障没有规律性" ;
	public static String  reliability3 =  "操作可靠性和质量稳定性较好，故障具有规律性" ;
	public static String  reliability4 =  "操作可靠性和质量稳定性好，故障具有较强的规律性" ;

	public static String  maintainability1 =  "维修需要特聘专家，备件难以购买、维修所需时间长、维修困难" ;
	public static String  maintainability2 =  "需要返厂维修，备件需要专门购买，维修所需时间较长，维修较困难" ;
	public static String  maintainability3 =  "维修需要技术人员，备件可以通过自制解决，维修所需时间较短，维修较容易" ;
	public static String  maintainability4 =  "维修需要一般操作人员，备件为标准件，维修所需时间短，维修容易" ;

	public static String economy1 =  "变压器的原值很高，维修停电损失费用大，故障维修费用高" ;
	public static String economy2 =  "变压器的原值较高，维修停电损失费用较大，故障维修费用较高" ;
	public static String economy3 =  "变压器的原值一般，维修停电损失费用和故障维修费用一般" ;
	public static String economy4 =  "变压器的原值低，维修停电损失费用和故障维修费用小" ;
	

	public static String monitoringAbility1 =  "监测的经济性差，监测技术可行性小" ;
	public static String monitoringAbility2 =  "监测的经济性和监测技术可行性一般" ;
	public static String monitoringAbility3 =  "监测的经济性和监测技术可行性较好" ;
	public static String monitoringAbility4=  "检测的经济性和监测技术可行性好" ;
	

	public static void evaluatDesc ( TransformerEvaluationResults result ){
		Double value = result.getScore();
		if( value >= 0 && value < 25d){
			result.setSafety(safety1);
			result.setReliability(reliability1);
			result.setMaintainability(maintainability1);
			result.setEconomicRow(economy1);
			result.setMonitoringAbility(monitoringAbility1);
		}else if( value >= 25 && value < 50d){
			result.setSafety(safety2);
			result.setReliability(reliability2);
			result.setMaintainability(maintainability2);
			result.setEconomicRow(economy2);
			result.setMonitoringAbility(monitoringAbility2);
		}else if( value >= 50 && value < 75d){
			result.setSafety(safety3);
			result.setReliability(reliability3);
			result.setMaintainability(maintainability3);
			result.setEconomicRow(economy3);
			result.setMonitoringAbility(monitoringAbility3);
		}else if( value  >= 75 && value < 100d){
			result.setSafety(safety4);
			result.setReliability(reliability4);
			result.setMaintainability(maintainability4);
			result.setEconomicRow(economy1);
			result.setMonitoringAbility(monitoringAbility4);
		}else{
			result.setSafety(safety4);
			result.setReliability(reliability4);
			result.setMaintainability(maintainability4);
			result.setEconomicRow(economy4);
			result.setMonitoringAbility(monitoringAbility4);
		}
	}
}
