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

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

import java.math.BigDecimal;
import java.util.List;
import java.util.TreeSet;

/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Data
@ApiModel(value = "异常炉台Dto")
public class ErrorDeviceDto implements Comparable<ErrorDeviceDto>{

     @ApiModelProperty(value = "片区" )
     String series;
     @ApiModelProperty(value = "异常炉数" )
     Integer errorNumber;
     @ApiModelProperty(value = "异常炉台号" )
     TreeSet<String> errorDeviceList;


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