package cn.ezhizao.project.business.keepAccounts.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import cn.ezhizao.project.business.ticketReport.domain.BizFinancialTicketReportDetail;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@ApiModel("biz_financial_keep_account 财务记账")
public class BizFinancialKeepAccount extends BaseEntity {
    @ApiModelProperty("客户外键")
    private Long companyId;
    @ApiModelProperty("账套外键")
    private Integer accountSetsId;
    @ApiModelProperty("登录账套外键")

    private Long tenantId;
    @ApiModelProperty("当前维护人员")
    private Long currentEmployeeId;
    @ApiModelProperty("全部维护人员")
    private String employeeIds;

    @Excel(name = "客户名称", sort = 1)
    @TableField(exist = false)
    private String companyName;

    @TableField(exist = false)
    private String companyLevel;
    @TableField(exist = false)
    private String currentDate;
    @TableField(exist = false)
    private List<BizFinancialKeepAccountDetail> details;

    @ApiModelProperty("创建时间")
    private Date createTime;
    // 用于收票报表的属性
//    @TableField(exist = false)
//    private List<BizFinancialTicketReportDetail> receiveTickets;
//    @TableField(exist = false)
//    private List<BizFinancialTicketReportDetail> scanTickets;
//    @TableField(exist = false)
//    private List<BizFinancialTicketReportDetail> salaryTickets;

    @Excel(name = "来源", sort = 2)
    @TableField(exist = false)
    private String fromCompanyName;

    @Excel(name = "纳税性质", sort = 3)
    @TableField(exist = false)
    private String taxType;

    @Excel(name = "税号", sort = 4)
    @TableField(exist = false)
    private String socialCreditCode;

    @TableField(exist = false)
    @Excel(name = "查询期间", sort = 5)
    private String currentPeriod;

    @Excel(name = "当前状态", sort = 6)
    @TableField(exist = false)
    private String currentStatus;

    /**
     * 查询条件新增
     */
    @TableField(exist = false)
    private String year;
    @TableField(exist = false)
    private String month;
    @TableField(exist = false)
    private Integer status;

    @TableField(exist = false)
    private List<BizFinancialTicketReportDetail> receiveTickets;
    @TableField(exist = false)
    private List<BizFinancialTicketReportDetail> scanTickets;
    @TableField(exist = false)
    private List<BizFinancialTicketReportDetail> salaryTickets;

    @TableField(exist = false)
    private String keyword;

    @ApiModelProperty("工单外键")
    private Long workOrderId;
    @ApiModelProperty(value = "是否零申报")
    @TableField(exist = false)
    private Integer isZero;
    @ApiModelProperty(value = "是否停止")
    @TableField(exist = false)
    private Integer isStop;

    //是否为自己负责(当前登陆人Id)
    @TableField(exist = false)
    private Long principal;

    //执行人
    @Excel(name = "执行人", sort = 7)
    @TableField(exist = false)
    private String serviceName;
    @TableField(exist = false)
    private Long customerLabelId;
    @TableField(exist = false)
    private String customerLabelName;
    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    @TableField(exist = false)
    private Long verifierId;
    @TableField(exist = false)
    @Excel(name = "审核人", sort = 8)
    private String verifierName;
    @TableField(exist = false)
    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd", sort = 9)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private java.util.Date verifierTime;
    @TableField(exist = false)
    private List<String> dateFilter;
    @Excel(name = "暂估金额", sort = 9)
    @TableField(exist = false)
    @ApiModelProperty("暂估金额")
    private BigDecimal provisionalEstimateAmount;
    @Excel(name = "本年利润", sort = 10)
    @TableField(exist = false)
    @ApiModelProperty("本年利润总额")
    private BigDecimal currentYearProfit;
    @Excel(name = "本年收入", sort = 11)
    @TableField(exist = false)
    @ApiModelProperty("本年收入")
    private BigDecimal currentYearIncome;


    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private java.util.Date finishTime;
    @TableField(exist = false)
    private Long finishUserId;
    @TableField(exist = false)
    private String finishUserName;
    @TableField(exist = false)
    private List<String> dateFilterFinish;
    @TableField(exist = false)
    @Excel(name = "可弥补之前年度的亏损", sort = 12)
    private BigDecimal previousAnnualLosses;
    @TableField(exist = false)
    private String toTenantName;

}
