package com.yifu.cloud.plus.v1.yifu.salary.vo;

import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 工资报账主表（工资条）VO
 *
 * @author hgw
 * @date 2019-07-30 15:00:05
 */
@Data
public class TSalaryAccountVo implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 计税月份
	 */
	@Length(max = 32, message = "计税月份不能超过6个字符")
	@ExcelAttribute(name = "计税月份", maxLength = 6)
	private String taxMonth;

	/**
	 * 封面抬头
	 */
	@Length(max = 50, message = "封面抬头不能超过50个字符")
	@ExcelAttribute(name = "封面抬头", maxLength = 50)
	private String invoiceTitle;

	/**
	 * 工资表ID
	 */
	@Length(max = 32, message = "工资表ID不能超过32个字符")
	@NotBlank(message = "工资表ID不能为空")
	@ExcelAttribute(name = "工资表ID", maxLength = 32)
	private String salaryFormId;
	/**
	 * 工资月份000
	 */
	@Length(max = 6, message = "工资月份不能超过6个字符")
	@NotBlank(message = "工资月份不能为空")
	@ExcelAttribute(name = "工资月份", isNotEmpty = true, errorInfo = "工资月份不能为空", maxLength = 6)
	private String salaryDate;
	/**
	 * 员工 ID
	 */
	@Length(max = 32, message = "员工 ID不能超过32个字符")
	@NotBlank(message = "员工 ID不能为空")
	@ExcelAttribute(name = "员工 ID", isNotEmpty = true, errorInfo = "员工 ID不能为空", maxLength = 32)
	private String empId;
	/**
	 * 员工姓名
	 */
	@Length(max = 50, message = "员工姓名不能超过50个字符")
	@NotBlank(message = "员工姓名不能为空")
	@ExcelAttribute(name = "员工姓名", maxLength = 50)
	private String empName;
	/**
	 * 员工编码
	 */
	@Length(max = 32, message = "员工编码不能超过32个字符")
	@NotBlank(message = "员工编码不能为空")
	@ExcelAttribute(name = "员工编码", maxLength = 32)
	private String empNo;

	/**
	 * 结算部门id
	 */
	@Length(max = 32, message = "结算部门id不能超过32个字符")
	@NotBlank(message = "结算部门id不能为空")
	@ExcelAttribute(name = "结算部门id", isNotEmpty = true, errorInfo = "结算部门id不能为空", maxLength = 32)
	private String settleDepartId;

	/**
	 * 结算部门no
	 */
	@Length(max = 50, message = "结算部门No不能超过50个字符")
	@NotBlank(message = "结算部门No不能为空")
	@ExcelAttribute(name = "结算部门No", isNotEmpty = true, errorInfo = "结算部门No不能为空", maxLength = 50)
	private String settleDepartNo;

	/**
	 * 结算部门name
	 */
	@Length(max = 50, message = "结算部门Name不能超过50个字符")
	@NotBlank(message = "结算部门No不能为空")
	@ExcelAttribute(name = "结算部门No", isNotEmpty = true, errorInfo = "结算部门Name不能为空", maxLength = 50)
	private String settleDepartName;

	/**
	 * 员工身份证号
	 */
	@Length(max = 18, message = "员工身份证号不能超过18个字符")
	@NotBlank(message = "员工身份证号不能为空")
	@ExcelAttribute(name = "员工身份证号", maxLength = 18)
	private String empIdcard;
	/**
	 * 银行卡号000
	 */
	@Length(max = 30, message = "银行卡号不能超过30个字符")
	@ExcelAttribute(name = "银行卡号", maxLength = 30)
	private String bankNo;
	/**
	 * 开户行000
	 */
	@Length(max = 50, message = "开户行不能超过50个字符")
	@ExcelAttribute(name = "开户行", maxLength = 50)
	private String bankName;
	/**
	 * 发工资次数-
	 * 弃用
	 */
	//@NotBlank(message = "发工资次数不能为空")
	@ExcelAttribute(name = "发工资次数")
	private Integer salaryCount;
	/**
	 * 工资发放方式（0现金/1银行）/2线下000
	 */
	@NotBlank(message = "工资发放方式（0现金/1银行）/2线下不能为空")
	@ExcelAttribute(name = "工资发放方式（0现金/1银行）/2线下", isNotEmpty = true, errorInfo = "工资发放方式（0现金/1银行）/2线下不能为空")
	private String salaryStyle;
	/**
	 * 工资发放时间（0立即发、1暂停发）000
	 */
	@NotBlank(message = "工资发放时间（0立即发、1暂停发）不能为空")
	@ExcelAttribute(name = "工资发放时间（0立即发、1暂停发）", isNotEmpty = true, errorInfo = "工资发放时间（0立即发、1暂停发）不能为空")
	private String salaryGiveTime;
	/**
	 * 发放状态 0: 未发放 1: 发放成功 2:发放失败
	 */
	@NotBlank(message = "发放状态 0: 未发放 1: 发放成功 2:发放失败不能为空")
	@ExcelAttribute(name = "发放状态 0: 未发放 1: 发放成功 2:发放失败", isNotEmpty = true, errorInfo = "发放状态 0: 未发放 1: 发放成功 2:发放失败不能为空")
	private String distributionFlag;
	/**
	 * 社保扣缴月份000
	 */
	@Length(max = 6, message = "社保扣缴月份不能超过6个字符")
	@ExcelAttribute(name = "社保扣缴月份", maxLength = 6)
	private String deduSocialMonth;
	/**
	 * 公积金扣缴月份000
	 */
	@Length(max = 6, message = "公积金扣缴月份不能超过6个字符")
	@ExcelAttribute(name = "公积金扣缴月份", maxLength = 6)
	private String deduProvidentMonth;
	/**
	 * 财务类型（数据字典）
	 */
	@Length(max = 1, message = "财务类型不能超过1个字符")
	@NotBlank(message = "财务类型不能为空")
	@ExcelAttribute(name = "财务类型", isNotEmpty = true, errorInfo = "财务类型（数据字典）不能为空", maxLength = 1)
	private String salaryType;
	/**
	 * 是否薪资扣税：0否 1是000
	 */
	@Length(max = 1, message = "是否薪资扣税不能超过1个字符")
	@NotBlank(message = "是否薪资扣税：0否 1是不能为空")
	@ExcelAttribute(name = "是否薪资扣税：0否 1是", isNotEmpty = true, errorInfo = "是否薪资扣税：0否 1是不能为空")
	private String salaryTaxFlag;

	/**
	 * 结算月
	 */
	@Length(max = 6, message = "结算月份不能超过6个字符")
	@NotBlank(message = "结算月份不能为空")
	@ExcelAttribute(name = "结算月份", isNotEmpty = true, errorInfo = "结算月份不能为空", maxLength = 6)
	private String settlementMonth;

	/**
	 * @Description: 是否删除0：未删除；1:已删除
	 * @Author: hgw
	 * @Date: 2019/8/30 18:20
	 * @return:
	 **/
	@Length(max = 1, message = "是否删除不能超过1个字符")
	@NotBlank(message = "是否删除不能为空")
	@ExcelAttribute(name = "是否删除", isNotEmpty = true, errorInfo = "是否删除不能为空", maxLength = 1)
	private Integer deleteFlag;  //0：未删除； 1：已删除

	/**
	 * 社保优先级0：生成月；1：缴纳月000
	 */
	@NotBlank(message = "社保优先级0：生成月；1：缴纳月不能为空")
	@Length(max = 1, message = "社保优先级0：生成月；1：缴纳月不能超过1个字符")
	@ExcelAttribute(name = "社保优先级0：生成月；1：缴纳月", isNotEmpty = true, errorInfo = "社保优先级0：生成月；1：缴纳月不能为空", maxLength = 1)
	private String socialPriority;
	/**
	 * 公积金优先级0：生成月；1：缴纳月000
	 */
	@NotBlank(message = "公积金优先级0：生成月；1：缴纳月不能为空")
	@Length(max = 1, message = "公积金优先级0：生成月；1：缴纳月不能超过1个字符")
	@ExcelAttribute(name = "公积金优先级0：生成月；1：缴纳月", isNotEmpty = true, errorInfo = "公积金优先级0：生成月；1：缴纳月不能为空", maxLength = 1)
	private String fundPriority;
	/**
	 * 年终奖扣税方案0：合并；1：单独000
	 */
	@NotBlank(message = "年终奖扣税方案0：合并；1：单独不能为空")
	@Length(max = 1, message = "年终奖扣税方案0：合并；1：单独不能超过1个字符")
	@ExcelAttribute(name = "年终奖扣税方案0：合并；1：单独", isNotEmpty = true, errorInfo = "年终奖扣税方案0：合并；1：单独不能为空", maxLength = 1)
	private String annualBonusType;

	//000
	@ExcelAttribute(name = "是否扣除社保 0:否,1:是", maxLength = 1)
	private String isDeductSocial;

	//000
	@ExcelAttribute(name = "是否扣除公积金 0:否,1:是", maxLength = 1)
	private String isDeductFund;

	/**
	 * 省
	 */
	@Length(max = 32, message = "省不能超过32个字符")
	@ExcelAttribute(name = "省", maxLength = 32, isDataId = true, isArea = true, parentField = "")
	private Integer province;
	/**
	 * 市
	 */
	@Length(max = 32, message = "市不能超过32个字符")
	@ExcelAttribute(name = "市", maxLength = 32, isDataId = true, isArea = true, parentField = "province")
	private Integer city;
	/**
	 * 县
	 */
	@Length(max = 32, message = "县不能超过32个字符")
	@ExcelAttribute(name = "县", maxLength = 32, isDataId = true, isArea = true, parentField = "city")
	private Integer town;

	/**
	 * 手机号
	 */
	@ExcelAttribute(name = "手机号", maxLength = 11)
	private String empPhone;

	/**
	 * 是否自有员工：默认0:否；1:是自有员工
	 */
	@Length(max = 1, message = "是否自有员工不能超过1个字符")
	@ExcelAttribute(name = "是否自有员工", maxLength = 1)
	private Integer ownFlag;

	/**
	 * 本月是否重复金额0：否；1：是重复导入的
	 */
	@Length(max = 1, message = "本月是否重复金额不能超过1个字符")
	@ExcelAttribute(name = "本月是否重复金额", maxLength = 1)
	private Integer isRepeat;

	private List<TSalaryAccountItemVo> saiList = new ArrayList<>();  //工资组成部分明细
}
