package com.sw.mes.fb.quality.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.math.BigInteger;

/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Data
@ApiModel(value = "检验线看板Dto")
public class UserRealTimeCount {

     @ApiModelProperty(value = "检验员" )
     private String inspectionName;
     @ApiModelProperty(value = "半成品数量（颗）" )
     private BigInteger halfNowProductNum;
     @ApiModelProperty(value = "周转数量（颗）" )
     private BigInteger weekNowProductNum;
     @ApiModelProperty(value = "半成品理论重量（kg）" )
     private BigDecimal halfWishProductNum;
     @ApiModelProperty(value = "周转理论重量（kg）" )
     private BigDecimal weekWishProductNum;
     @ApiModelProperty(value = "总理论重量（kg）" )
     private BigDecimal allWishProductNum;
     @ApiModelProperty(value = "合格率（%）" )
     private String passRatio;

     public UserRealTimeCount() {}

     public void addAll() {
          this.allWishProductNum = (this.halfWishProductNum == null?new BigDecimal("0.00"):this.halfWishProductNum).add(
                  this.weekWishProductNum == null?new BigDecimal("0.00"):this.weekWishProductNum
          );
     }
}