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

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import cn.ezhizao.project.business.entrust.domain.BizEntrust;
import cn.ezhizao.project.business.standardCpmpany.domain.BizStandardCompany;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 工单信息对象 biz_work_order
 *
 * @author ruoyi
 * @date 2023-10-16
 */
@Data
@TableName(value = "biz_work_order")
public class BizWorkOrderOnce extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同外键 */
    @ApiModelProperty(value = "${comment}")
    private Long contractId;

    /** 客户外键 */
    @ApiModelProperty(value = "${comment}")
    private Long companyId;

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

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

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

    @ApiModelProperty("合同明细外键")
    private Long contractDetailId;

    @ApiModelProperty("合同流程外键")
    private Long contractDetailProcessId;

    /** 工单类型 1循环 2代办 */
//    @Excel(name = "工单类型 1循环 2代办")
    @ApiModelProperty(value = "工单类型 1循环 2代办")
    private Integer type;

    @Excel(name = "工单类型")
    @TableField(exist = false)
    @ApiModelProperty(value = "工单类型 1循环 2代办")
    private String typeName;

    /** 无合同 */
//    @Excel(name = "无合同")
    @ApiModelProperty(value = "无合同")
    private Integer noContract;

    /** 编号 */
//    @Excel(name = "编号")
    @ApiModelProperty(value = "编号")
    private String workOrderNo;

    /** 任务类型 任务表外键 任务明细表 */
    @ApiModelProperty(value = "任务外键")
    private Long taskTypeId;

    @Excel(name = "项目")
    @TableField(exist = false)
    private String taskTypeName;

    /** 任务类型 任务表外键 任务明细表 */
    @ApiModelProperty(value = "任务明细外键")
    private Long taskTypeDetailId;

    @TableField(exist = false)
    private String taskTypeDetailName;

    @TableField(exist = false)
    private Integer isZero;

    /** 开始月 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "开始月", dateFormat = "yyyy-MM")
    @ApiModelProperty(value = "开始月")
    private Date startMonth;

    /** 结束月 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "结束月", dateFormat = "yyyy-MM")
    @ApiModelProperty(value = "结束月")
    private Date endMonth;

    /** 月数 */
//    @Excel(name = "工单月数")
    @ApiModelProperty(value = "月数")
    private Integer monthNum;


    @ApiModelProperty(value = "月数")
    private Long managerId;

    /** 主程序账套外键 */
    @ApiModelProperty(value = "月数")
    private Long tenantId;

    /** 停止任务 */
//    @Excel(name = "停止任务")
    @ApiModelProperty(value = "停止任务")
    private Integer isStop;


//    @Excel(name = "注册省份编码")
    @ApiModelProperty(value = "注册省份编码")
    private String provinceCode;

    /** 省 */
//    @Excel(name = "省")
    @ApiModelProperty(value = "省")
    private String province;

    /** 注册城市编码 */
//    @Excel(name = "注册城市编码")
    @ApiModelProperty(value = "注册城市编码")
    private String cityCode;

    /** 市 */
//    @Excel(name = "市")
    @ApiModelProperty(value = "市")
    private String city;

    /** 注册行政区编码 */
//    @Excel(name = "注册行政区编码")
    @ApiModelProperty(value = "注册行政区编码")
    private String districtCode;

    /** 工单执行人 */
    @Excel(name = "工单执行人")
    @TableField(exist = false)
    private String executor;


    /** 区 */
//    @Excel(name = "区")
    @ApiModelProperty(value = "区")
    private String district;

    @TableField(exist = false)
    private List<BizWorkOrderRecord> records;
    @TableField(exist = false)
    private List<BizWorkOrderDetail> details;

    /** 服务管理查询条件 */
    @TableField(exist = false)
    private Integer status;
    @TableField(exist = false)
    private String year;
    @TableField(exist = false)
    private String month;

    @ApiModelProperty("服务人员")
    private Long serviceId;

    @TableField(exist = false)
    private String serviceName;

    @TableField(exist = false)
    private List<Long> ids;

    @TableField(exist = false)
    private BizEntrust entrust;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date currentMonth;

    @TableField(exist = false)
    private Long toTenantId;


    @TableField(exist = false)
    private List<BizStandardCompany> companies;

    /** 委托项目 */
    @TableField(exist = false)
    private List<Long> taskTypeIds;




}
