package com.gxwebsoft.tower.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableLogic;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 派单管理
 *
 * @author 科技小王子
 * @since 2023-07-02 16:15:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TowerWorksheet对象", description = "派单管理")
public class TowerWorksheet implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "worksheet_id", type = IdType.AUTO)
    private Integer worksheetId;

    @ApiModelProperty(value = "派单类型:0安拆1质检2仓储3维保")
    private Integer type;

    private Integer parentWorksheetId;

    @ApiModelProperty(value = "经营人员ID")
    private Integer startUid;

    @ApiModelProperty(value = "项目ID")
    private Integer projectId;

    @ApiModelProperty(value = "计划进场时间(经营人员填)")
    private String planInDateInit;

    @ApiModelProperty(value = "计划进场时间")
    private String planInDate;

    @ApiModelProperty(value = "到货时间")
    private String receiveDate;

    @ApiModelProperty(value = "生产主管ID")
    private Integer productionMangerUid;

    @ApiModelProperty(value = "资料员")
    private Integer documentUid;

    @ApiModelProperty(value = "资产员")
    private Integer assetUid;

    @ApiModelProperty(value = "车辆调度员")
    private Integer carDispatchUid;

    @ApiModelProperty(value = "维保人员")
    private Integer fixUid;

    @ApiModelProperty(value = "班组组长")
    private Integer classManager;

    @ApiModelProperty(value = "设备类型:(0塔式起重机;1施工升降机;2物料提升机)")
    private Integer equipmentType;

    @ApiModelProperty(value = "工作类型(0安装1加高2拆卸)")
    private Integer workType;

    @ApiModelProperty(value = "0已取消1待派单2待到场3待确认4已完成")
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "资产员已完成")
    private Integer assetHasDone;

    @ApiModelProperty(value = "资料员已完成")
    private Integer documentHasDone;

    @ApiModelProperty(value = "维保人员已完成")
    private Integer fixHasDone;

    @ApiModelProperty(value = "资产员完成时间")
    private LocalDateTime assetDoneTime;

    @ApiModelProperty(value = "资料员完成时间")
    private LocalDateTime documentDoneTime;

    @ApiModelProperty(value = "维保人员完成时间")
    private LocalDateTime fixDoneTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "拒绝原因")
    private String refuseReason;

    @ApiModelProperty(value = "项目联系人电话")
    private String contactPhone;

    @ApiModelProperty(value = "审核状态0没有审核1待审核2已通过3未通过")
    private Integer auditStatus;

    @ApiModelProperty(value = "详情")
    @TableField(exist = false)
    private TowerWorksheetDetail detail;

    @ApiModelProperty(value = "安装单详情")
    @TableField(exist = false)
    private TowerWorksheetDetail detailType0;

    @ApiModelProperty(value = "安装信息")
    @TableField(exist = false)
    private TowerWorksheetSetUp setUp;

    @ApiModelProperty(value = "配件")
    @TableField(exist = false)
    private List<TowerWorksheetParts> parts;

    @ApiModelProperty(value = "核验")
    @TableField(exist = false)
    private TowerWorksheetCheck check;

    @ApiModelProperty(value = "项目名称")
    @TableField(exist = false)
    private String projectName;

    @ApiModelProperty(value = "经营人员")
    @TableField(exist = false)
    private User startUser;

    @ApiModelProperty(value = "生产主管")
    @TableField(exist = false)
    private User productionMangerUser;

    @ApiModelProperty(value = "标地")
    private String address;

    @ApiModelProperty(value = "项目地址")
    @TableField(exist = false)
    private String projectAddress;

    @ApiModelProperty(value = "项目区域")
    @TableField(exist = false)
    private String projectRegion;

    @ApiModelProperty(value = "资料员")
    @TableField(exist = false)
    private User documentUser;

    @ApiModelProperty(value = "资产员")
    @TableField(exist = false)
    private User assetUser;

    @ApiModelProperty(value = "资产员")
    @TableField(exist = false)
    private User carDispatchUser;

    @ApiModelProperty(value = "班组组长")
    @TableField(exist = false)
    private User classManagerUser;

    @ApiModelProperty(value = "维保人员")
    @TableField(exist = false)
    private User fixUser;

    @ApiModelProperty(value = "该用户是否需要审核")
    @TableField(exist = false)
    private Boolean needAudit;

    @ApiModelProperty(value = "审核人列表")
    @TableField(exist = false)
    private List<User> auditList;

    @ApiModelProperty(value = "车辆列表")
    @TableField(exist = false)
    private List<TowerWorksheetCarDispatch> carDispatchList;

    @ApiModelProperty(value = "车辆数量")
    @TableField(exist = false)
    private Boolean hasCarDispatch;


}
