package com.casic.missiles.dto.cockpit;

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 13:36
 */
@ApiModel
@Data
public class CockpitDeptOutputListResponse {
    @ApiModelProperty(value = "部门id", dataType = "Long")
    private Long deptId;
    @ApiModelProperty(value = "部门名", dataType = "String")
    private String deptName;
    @ApiModelProperty(value = "检定样品数量（检定完成的数量）", dataType = "Integer")
    private Integer samples = 0;
    @ApiModelProperty(value = "出具证书数量", dataType = "Integer")
    private Integer certificates = 0;
    @ApiModelProperty(value = "产值总计(分)", dataType = "Integer")
    private Integer outPut = 0;

    @ApiModelProperty(value = "产值总计(元)", dataType = "String")
    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 = "String")
    private String 产值总计;
    public String get实验室名称() {
        return this.deptName;
    }

    public Integer get检定样品数量() {
        return this.samples;
    }

    public Integer get出具证书数量() {
        return this.certificates;
    }

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