package com.tykj.dev.rfid.entity.vo;

import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Arrays;
import java.util.List;

/**
 * @author HuangXiahao
 * @version V1.0
 * @class WaringLogSelectVo
 * @packageName com.tykj.dev.rfid.entity.vo
 **/
@Data
@ApiModel("告警管理页面")
public class WaringLogSelectVo extends CustomPage {

    @ApiModelProperty(value = "告警类型(0:入库异常,1:出库异常,2:盘点异常)")
    private List<Integer> warningType;

    @ApiModelProperty("时间 0为 本年 1为本月 2为本周 3为本日")
    private Integer time;

    @ApiModelProperty(value = "模糊查询")
    private String content;

    public LibraryWarningLogSelectVo toWarningVo(){
        LibraryWarningLogSelectVo libraryWarningLogSelectVo = new LibraryWarningLogSelectVo();
        BeanUtils.copyProperties(this,libraryWarningLogSelectVo);
        if (this.warningType==null){
            libraryWarningLogSelectVo.setWarningType(Arrays.asList(0,1,2));
        }
        libraryWarningLogSelectVo.setStatus(1);
        return libraryWarningLogSelectVo;
    }
}
