package com.gx.obe.evaluation.step.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import com.gx.obe.util.utils.SerializeUtils;
/** 
 * @Description: 商务参数
 * @author chenxw 
 * @preserve private
 */
public class BusinessParam implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5927177658904267990L;
	
	public static BusinessParam setSerialize(byte[] serializable) {
		try {
			return SerializeUtils.deserializeObject(serializable);
		} catch (Exception e) {
			return null;
		}
	}
	
	public byte[] getSerialize() {
		return SerializeUtils.serializeObject(this);
	}
	
	private String formulaContent;
	
	public void setFormulaContent(String formulaContent) {
		this.formulaContent = formulaContent;
	}

	public String getFormulaContent() {
		return formulaContent;
	}
	
	private BasePriceCalculation basePriceCalculation = new BasePriceCalculation();
	
	private ScoreCalculation scoreCalculation = new ScoreCalculation();
	
	public BasePriceCalculation getBasePriceCalculation() {
		return basePriceCalculation;
	}
	
	public ScoreCalculation getScoreCalculation() {
		return scoreCalculation;
	}
	
	/**
	 * @Description: 基准价计算
	 * @author chenxw
	 */
	/**
	 * @preserve private
	 */
	public class BasePriceCalculation implements Serializable {
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 2779865556518164434L;
		private int extractPercentageC = Integer.MAX_VALUE;
		private int extractPercentageC1 = Integer.MAX_VALUE;
		private int extractPercentageC2 = Integer.MAX_VALUE;
		private BigDecimal weightPercentageQ1;
		private BigDecimal weightPercentageQ2;
		
		public int getExtractPercentageC() {
			return extractPercentageC;
		}
		
		public void setExtractPercentageC(int extractPercentageC) {
			this.extractPercentageC = extractPercentageC;
		}
		
		public int getExtractPercentageC1() {
			return extractPercentageC1;
		}
		
		public void setExtractPercentageC1(int extractPercentageC1) {
			this.extractPercentageC1 = extractPercentageC1;
		}
		
		public int getExtractPercentageC2() {
			return extractPercentageC2;
		}
		
		public void setExtractPercentageC2(int extractPercentageC2) {
			this.extractPercentageC2 = extractPercentageC2;
		}
		
		public BigDecimal getWeightPercentageQ1() {
			return weightPercentageQ1;
		}
		
		public void setWeightPercentageQ1(BigDecimal weightPercentageQ1) {
			this.weightPercentageQ1 = weightPercentageQ1;
		}
		
		public BigDecimal getWeightPercentageQ2() {
			return weightPercentageQ2;
		}
		
		public void setWeightPercentageQ2(BigDecimal weightPercentageQ2) {
			this.weightPercentageQ2 = weightPercentageQ2;
		}
	}
	
	/**
	 * @Description: 得分计算
	 * @author chenxw
	 */
	/**
	 * @preserve private
	 */
	public class ScoreCalculation implements Serializable {
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 4078502155090618546L;
		private BigDecimal highBasePricePercentage;
		private BigDecimal highBasePriceDeductPoints;
		private BigDecimal lowBasePricePercentage;
		private BigDecimal lowBasePriceDeductPoints;
		
		public BigDecimal getHighBasePricePercentage() {
			return highBasePricePercentage;
		}
		
		public void setHighBasePricePercentage(BigDecimal highBasePricePercentage) {
			this.highBasePricePercentage = highBasePricePercentage;
		}
		
		public BigDecimal getHighBasePriceDeductPoints() {
			return highBasePriceDeductPoints;
		}
		
		public void setHighBasePriceDeductPoints(BigDecimal highBasePriceDeductPoints) {
			this.highBasePriceDeductPoints = highBasePriceDeductPoints;
		}
		
		public BigDecimal getLowBasePricePercentage() {
			return lowBasePricePercentage;
		}
		
		public void setLowBasePricePercentage(BigDecimal lowBasePricePercentage) {
			this.lowBasePricePercentage = lowBasePricePercentage;
		}
		
		public BigDecimal getLowBasePriceDeductPoints() {
			return lowBasePriceDeductPoints;
		}
		
		public void setLowBasePriceDeductPoints(BigDecimal lowBasePriceDeductPoints) {
			this.lowBasePriceDeductPoints = lowBasePriceDeductPoints;
		}
	}
	
}
