package com.sw.mes.yb.report.dto;

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

import java.math.BigDecimal;

/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Data
@ApiModel(value = "工时列表Dto")
public class HourListDto implements Comparable<HourListDto>{

     @ApiModelProperty(value = "片区" )
     String series;
     @ApiModelProperty(value = "合炉工时" )
     BigDecimal compoundOven;
     @ApiModelProperty(value = "加料工时" )
     BigDecimal chargeHour;
     @ApiModelProperty(value = "取棒工时" )
     BigDecimal rodRemoval;
     @ApiModelProperty(value = "调温工时" )
     BigDecimal thermORegulation;
     @ApiModelProperty(value = "引放成活率" )
     BigDecimal shoulderRate;
     @ApiModelProperty(value = "二加效率" )
     BigDecimal diadplusRate;
     @ApiModelProperty(value = "排名" )
     BigDecimal rank;

     @Override
     public int compareTo(HourListDto other) {
          // 根据系列进行排序
          if (this.series.length() < other.series.length()) {
               return -1;
          } else if (this.series.length() > other.series.length()) {
               return 1;
          } else {
               // 长度相等
               return 0;
          }
     }
}