/*
*
* CwBdVouchtempcom.java
* Copyright(C) 2017-2020 DHCC
* @date 2019-04-05
*/
package com.dhcc.finance.main.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.dhcc.common.util.ExcelColumn;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 *  * cw_bd_vouchtempcom
 */
@ApiModel(value = "CwBdVouchtempcom",description = "单据和凭证模板对应关系")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class CwBdVouchtempcom {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = true, example = "")
    @ExcelColumn(value="主键",col=1)
    private String pkVouchtempcom;

    /**
     * 单据类型
     */
    @ApiModelProperty(value = "单据类型", required = false, example = "")
    @ExcelColumn(value="单据类型",col=2)
    private String pkBilltype;

    /**
     * 场景名称
     */
    @ApiModelProperty(value = "场景名称", required = false, example = "")
    @ExcelColumn(value="场景名称",col=3)
    private String transname;

    /**
     * 交易码
     */
    @ApiModelProperty(value = "交易码", required = false, example = "")
    @ExcelColumn(value="交易码",col=4)
    private String transno;

    /**
     * 凭证模板
     */
    @ApiModelProperty(value = "凭证模板", required = false, example = "")
    @ExcelColumn(value="凭证模板",col=5)
    private String pkVouchtemp;

    /**
     * 凭证模板名称
     */
    @ApiModelProperty(value = "凭证模板名称", required = false, example = "")
    @ExcelColumn(value="凭证模板名称",col=6)
    private String vouchtempname;
    
    @ApiModelProperty(value = "使用状态", required = false, example = "")
    @ExcelColumn(value="使用状态",col=7)
    private String useState;

    @ApiModelProperty(value = "录入人员", required = false, example = "")
    @ExcelColumn(value="录入人员",col=8)
    private String createUser;

    @ApiModelProperty(value = "录入时间", required = false, example = "")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @ExcelColumn(value="录入时间",col=9)
    private Date createTime;

    @ApiModelProperty(value = "最后修改人员", required = false, example = "")
    @ExcelColumn(value="最后修改人员",col=10)
    private String updateUser;

    @ApiModelProperty(value = "最后修改时间", required = false, example = "CURRENT_TIMESTAMP")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @ExcelColumn(value="最后修改时间",col=11)
    private Date updateTime;

    @ApiModelProperty(value = "备注", required = false, example = "")
    @ExcelColumn(value="备注",col=12)
    private String remark;


    public String checkExcelInputDataLegal(String listNo){
		StringBuffer result = new StringBuffer("第"+listNo+"行");
		boolean flag= true;
		if(this.pkBilltype == null ||"".equals(this.pkBilltype)){
			result.append(",单据类型不能为空");
			flag=false;
		}
		if(this.transname == null ||"".equals(this.transname)){
			result.append(",场景名称不能为空");
			flag=false;
		}
		if(this.transno == null ||"".equals(this.transno)){
			result.append(",交易码不能为空");
			flag=false;
		}
		if(this.vouchtempname == null ||"".equals(this.vouchtempname)){
			result.append(",交易码不能为空");
			flag=false;
		}
		if(flag) return "";
		return result.toString();
	}
}