package cn.com.countrygarden.bi.main.dto.reportCityData;

import lombok.Getter;
import lombok.Setter;

import java.text.NumberFormat;

@Setter
@Getter
public class CcsrDto extends BaseDto{
    private Long id;

    private Long cityCompanyDataReportId;

    private String shareholderName;

    private Float shareholderRatio;

    private String shareholderRatioName;

    public void setShareholderRatio(Float shareholderRatio) {
        this.shareholderRatio = shareholderRatio;
        if (shareholderRatio != null){
            NumberFormat percent = NumberFormat.getPercentInstance();
//            percent.setMaximumFractionDigits(2);
            this.shareholderRatioName = percent.format(shareholderRatio);
        }
    }
}