/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workreceiptsregister.entity;


import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
import com.jeeplus.modules.sys.entity.Office;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.NumberFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 收入登记Entity
 * @author ssrh
 * @version 2018-05-21
 */
public class WorkReceiptsRegister extends DataEntity<WorkReceiptsRegister> {
	
	private static final long serialVersionUID = 1L;
    @NotNull(message = "到账时间不能为空")
	private Date arrivalDate;		// 到账时间
    private ProjectRecords project;		// 开票项目(来源项目登记)
    private String ext;
    @NotBlank(message = "对方账号不能为空")
    @Size(min = 16,max = 19,message = "银行账号长度应为16-19位")
	private String clientAccno;		// 对方账号
    @NotBlank(message = "对方户名不能为空")
	private String clientAccname;		// 对方户名
    @NotNull(message = "到账金额不能为空")
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
	private Double arrivalAmt;		// 到账金额
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
	private Double registerAmt = 0.00;		// 登记金额
	private String status;		// 收入状态
	private Office company;		// 所属分公司
	private Office comp;		// 所属公司
	private Office office;		// 所属部门
    private Date beginDate;
    private Date endDate;
    private int detailCou;
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
    private Double minArr = 0.00;
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
    private Double maxArr = 0.00;
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
    private Double minReg = 0.00;
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
    private Double maxReg = 0.00;
    private List<WorkReceiptsRegisterDetail> registerDetailList = new ArrayList<>();
	
	public WorkReceiptsRegister() {
		super();
	}

	public WorkReceiptsRegister(String id){
		super(id);
	}

	@ExcelField(title="到账时间", align=2, sort=6,colNum = 0)
	public Date getArrivalDate() {
		return arrivalDate;
	}

	public void setArrivalDate(Date arrivalDate) {
		this.arrivalDate = arrivalDate;
	}
	
	@ExcelField(title="对方账号", align=2, sort=8, colNum = 9)
	public String getClientAccno() {
		return clientAccno;
	}

	public void setClientAccno(String clientAccno) {
		this.clientAccno = clientAccno;
	}
	
	@ExcelField(title="对方户名", align=2, sort=9, colNum = 10)
	public String getClientAccname() {
		return clientAccname;
	}

	public void setClientAccname(String clientAccname) {
		this.clientAccname = clientAccname;
	}
	
	@ExcelField(title="到账金额", align=2, sort=7,colNum = 6)
	public Double getArrivalAmt() {
		return arrivalAmt;
	}

	public void setArrivalAmt(Double arrivalAmt) {
		this.arrivalAmt = arrivalAmt;
	}
	
	public Double getRegisterAmt() {
		return registerAmt;
	}

	public void setRegisterAmt(Double registerAmt) {
		this.registerAmt = registerAmt;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

    public Office getCompany() {
        return company;
    }

    public void setCompany(Office company) {
        this.company = company;
    }

    public List<WorkReceiptsRegisterDetail> getRegisterDetailList() {
        return registerDetailList;
    }

    public void setRegisterDetailList(List<WorkReceiptsRegisterDetail> registerDetailList) {
        this.registerDetailList = registerDetailList;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public int getDetailCou() {
        return detailCou;
    }

    public void setDetailCou(int detailCou) {
        this.detailCou = detailCou;
    }

    public Double getMinArr() {
        return minArr;
    }

    public void setMinArr(Double minArr) {
        this.minArr = minArr;
    }

    public Double getMaxArr() {
        return maxArr;
    }

    public void setMaxArr(Double maxArr) {
        this.maxArr = maxArr;
    }

    public Double getMinReg() {
        return minReg;
    }

    public void setMinReg(Double minReg) {
        this.minReg = minReg;
    }

    public Double getMaxReg() {
        return maxReg;
    }

    public void setMaxReg(Double maxReg) {
        this.maxReg = maxReg;
    }

    public Office getComp() {
        return comp;
    }

    public void setComp(Office comp) {
        this.comp = comp;
    }

    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }

    public ProjectRecords getProject() {
        return project;
    }

    public void setProject(ProjectRecords project) {
        this.project = project;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }
}