package org.dromara.payment.worker.domain.vo;

import java.util.Date;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.payment.worker.domain.UserWorkerBusiness;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 用工签约查询视图对象 user_worker_business
 *
 * @author LionLi
 * @date 2024-04-26
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = UserWorkerBusiness.class)
public class UserWorkerBusinessVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
//    @ExcelProperty(value = "主键")
    @ExcelIgnore
    private Long id;

    /**
     * 自雇者id
     */
//    @ExcelProperty(value = "自雇者id")
    @ExcelIgnore
    private Long workId;

    /**
     * 结算中心id
     */
//    @ExcelProperty(value = "结算中心id")
    @ExcelIgnore
    private Long sydId;

    /**
     * 结算中心编号
     */
//    @ExcelProperty(value = "结算中心编号")
    @ExcelIgnore
    private String sydNo;


    /**
     * 运营商编号
     */
//    @ExcelProperty(value = "运营商编号")
    @ExcelIgnore
    private String opNo;

    /**
     * 运营商id
     */
//    @ExcelProperty(value = "运营商id")
    @ExcelIgnore
    private Long opId;

    /**
     * 代理商id
     */
//    @ExcelProperty(value = "代理商id")
    @ExcelIgnore
    private Long channelId;


    /**
     * 代理商编号
     */
//    @ExcelProperty(value = "代理商编号")
    @ExcelIgnore
    private String channelNo;

    /**
     * 代理商上下级关系编码
     */
//    @ExcelProperty(value = "代理商上下级关系编码")
    @ExcelIgnore
    private String channelCode;


    /**
     * 商户id
     */
//    @ExcelProperty(value = "商户id")
    @ExcelIgnore
    private Long merId;

    /**
     * 商户编号
     */
//    @ExcelProperty(value = "商户编号")
    @ExcelIgnore
    private String merNo;

    /**
     * 合同编号
     */
//    @ExcelProperty(value = "合同编号")
    @ExcelIgnore
    private String no;


    /**
     * 签约时间
     */
//    @ExcelProperty(value = "签约时间")
    @ExcelIgnore
    private Date signTime;

    /**
     * 签约文件地址
     */
//    @ExcelProperty(value = "签约文件地址")
    @ExcelIgnore
    private String signFileUrl;

    /**
     * 协议签字图片
     */
//    @ExcelProperty(value = "协议签字图片")
    @ExcelIgnore
    private String signPic;

    /**
     * 年代发金额所属年份
     */
//    @ExcelProperty(value = "年代发金额所属年份")
    @ExcelIgnore
    private String moneyYearDate;

    /**
     * 年代发金额
     */
//    @ExcelProperty(value = "年代发金额")
    @ExcelIgnore
    private Long moneyYear;



    /**
     * 签约地址
     */
//    @ExcelProperty(value = "签约地址")
    @ExcelIgnore
    private String signUrl;

    /**
     * 预览地址
     */
//    @ExcelProperty(value = "预览地址"
    @ExcelIgnore
    private String webUrl;

    /**
     * ossid
     */
//    @ExcelProperty(value = "ossid")
    @ExcelIgnore
    private String ossid;


    @ExcelProperty(value = "创建时间")
    private Date createTime;

    @ExcelProperty(value = "用工姓名")
    private String workName;


    @ExcelProperty(value = "身份证号")
    private String cardId;

    /**
     * 手机号
     */
    @ExcelIgnore
    private String vPhone;


    public String getPhoneStr() {
        return this.getvPhone();
    }

    @ExcelProperty(value = "手机号")
    private String phoneStr;



    @ExcelProperty(value = "企业名称")
    private String busMerName;


    @ExcelProperty(value = "服务商名称")
    private String serviceName;


    /**
     * 业务类型(1:委托代征，2:自然人代开，3:个体户注册 4:临时税务登记 5：资金代发 6：派遣&外包
     */
    @ExcelProperty(value = "业务类型" , converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType="wxfe_bus_type")
    private Integer busType;


    /**
     * 签约状态（0:待签约 1:签约成功 2:签约失败）
     */
    @ExcelProperty(value = "签约状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sign_status")
    private Integer signStatus;




    public String getvPhone() {
        if(StringUtils.isNotEmpty(this.vPhone)){
            return StringUtils.phoneHide(this.vPhone);
        }else{
            return "--";
        }
    }


    public String getvPhoneNoHide() {
        return this.vPhone;
    }

    @ExcelIgnore
    private String phone;


    public String getCardId() {
        if(StringUtils.isNotEmpty(this.cardId)){
            return StringUtils.idcardHide(this.cardId);
        }else{
            return "--";
        }

    }

    @ExcelIgnore
    private String cardPositive;


}
