package com.prolog.cs.biz.inbound.dto;

import com.prolog.cs.biz.inbound.model.SupervisionCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Description 监管码/防窜码/唯一码记录表 
 * @Author Xiong  
 * @Date 2021-06-16 
 */
@Data
@ApiModel
public class SuperviseResultDTO implements Serializable {

    private static final long serialVersionUID =  2291818160143936395L;

	@ApiModelProperty(value = "是否扫码完成")
	private Boolean complete;

	@ApiModelProperty(value = "是否解锁")
	private Boolean isUnLock;

	@ApiModelProperty(value = "【12.BZLB】包装级别(0大包装，1中包装，2小包装)【包装类别，BZLB】")
	private String packLevel;

	@ApiModelProperty(value = "已扫码监管码")
	private List<String> superviseCodes;

	@ApiModelProperty(value = "已扫描监管码列表")
	private List<SupervisionCode> superviseCodesModal;

	@ApiModelProperty("总记录数")
	private long totalCount;

	@ApiModelProperty("总页数")
	private int pageCount;

	@ApiModelProperty("当前页码")
	private int pageNum;

	@ApiModelProperty("每页大小")
	private int pageSize;

	@ApiModelProperty("当前页开始行")
	private int startRow;

	@ApiModelProperty("当前页结束行")
	private int endRow;

	@ApiModelProperty(value = "实扫大包装数")
	private String maxScanedQty = "0";

	@ApiModelProperty(value = "实扫中包装数")
	private String middleScanedQty = "0";

	@ApiModelProperty(value = "实扫小包装数")
	private String minScanedQty = "0";

	@ApiModelProperty(value = "所有订单行是否扫码完成")
	private Boolean billComplete = false;

	@ApiModelProperty(value = "当前扫描重复的监管码")
	private List<String> repeatSuperviseCodes;

	public SuperviseResultDTO() {
	}

	public SuperviseResultDTO(Boolean complete,Boolean isUnLock, String packLevel, List<String> superviseCodes, List<SupervisionCode> superviseCodesModal) {
		this.complete = complete;
		this.isUnLock = isUnLock;
		this.packLevel = packLevel;
		this.superviseCodes = superviseCodes;
		this.superviseCodesModal = superviseCodesModal;
	}

	public static SuperviseResultDTO newInstance(Boolean complete,Boolean isUnLock, String packLevel, List<String> superviseCodes,List<SupervisionCode> superviseCodesModal) {
		return new SuperviseResultDTO(complete,isUnLock, packLevel, superviseCodes,superviseCodesModal);
	}

	public Boolean isComplete() {
		return complete;
	}
}
