package org.springblade.modules.api.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * Author pangqijun
 * Date 2022/6/30
 * Description
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
@ExcelIgnoreUnannotated
public class ExportAllAppointGoodsVO {

	@ExcelProperty(value = "团购名称", index = 0)
	@ApiModelProperty(value = "自提点名称")
	private String grouponName;

	@ExcelProperty(value = "自提点名称", index = 1)
	@ApiModelProperty(value = "自提点名称")
	private String takeName;

	@ExcelProperty(value ="自提点地址", index = 2)
	@ApiModelProperty(value = "自提点地址")
	private String takeAddress;

	@ExcelProperty(value ="自提点电话", index = 3)
	@ApiModelProperty(value = "自提点电话")
	private String takeTel;

	@ExcelProperty(value = "供应商名称", index = 4)
	@ApiModelProperty(value = "供应商名称")
	private String storeName;

	@ExcelProperty(value = "商品名称", index = 5)
	@ApiModelProperty(value = "商品名称")
	private String goodsName;

	@ExcelProperty(value = "商品编号", index = 6)
	@ApiModelProperty(value = "商品编号")
	private String goodsNo;

	/**
	 * 商品数量
	 */
	@ExcelProperty(value = "商品数量" , index = 7)
	@ApiModelProperty(value = "商品数量")
	private Integer goodsNum;

	@ExcelProperty(value ="履约单状态", index = 8)
	@ApiModelProperty(value = "履约单状态：0、待发货，1、已发货，2已完成")
	private String stateDsr;

	@ExcelProperty(value = "到货码", index = 9)
	@ApiModelProperty(value = "到货码")
	private String arrivalCode;

	@ExcelProperty(value = "发货时间", index = 10)
	@ApiModelProperty(value = "发货时间")
	private Date shipmentsTime;

	@ExcelProperty(value = "到货时间", index = 11)
	@ApiModelProperty(value = "到货时间")
	private Date arrivalTime;

	@ApiModelProperty(value = "履约单状态：0、待发货，1、已发货，2已完成")
	private Integer state;

	public String getStateDsr(){
		if(this.state == 0){
			return "待发货";
		}else if(this.state == 1){
			return "发货中";
		}
		return "已完成";
	}
}
