package com.casic.missiles.dto.cockpit;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * @Description:
 * @Author: wangpeng
 * @Date: 2023/6/14 18:36
 */
@ApiModel
@Data
public class StaffAnalyseListResponse {
    @ApiModelProperty(value = "人员id", dataType = "Long")
    private Long staffId;
    @ApiModelProperty(value = "人员名字", dataType = "String")
    private String staffName;
    @ApiModelProperty(value = "检定样品数量（检定完成的数量）", dataType = "Integer")
    private Integer samples = 0;
    @ApiModelProperty(value = "出具证书数量", dataType = "Integer")
    private Integer certificates = 0;
    @ApiModelProperty(value = "产值总计(单位分)", dataType = "Integer")
    private Integer outPut = 0;

    @ExcelProperty(value = "产值总计(元)", order = 10)
    private String outPutYuan = "0.00";

    public String getOutPutYuan() {
        if(Objects.nonNull(outPut)) {
            outPutYuan = BigDecimal.valueOf(outPut).divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_HALF_UP).toPlainString();
        }
        return outPutYuan;
    }

    //山海鲸使用参数
    @ApiModelProperty(value = "人员", dataType = "String")
    private String 人员;
    @ApiModelProperty(value = "已检测", dataType = "Integer")
    private Integer 已检测;
    @ApiModelProperty(value = "报告数", dataType = "Integer")
    private Integer 报告数;
    @ApiModelProperty(value = "产值", dataType = "Integer")
    private String 产值;

    public String get人员() {
        return this.staffName;
    }

    public Integer get已检测() {
        return this.samples;
    }

    public Integer get报告数() {
        return this.certificates;
    }

    public String get产值() {
        return this.outPutYuan;
    }
}
