package com.jpsoft.shinestar.modules.base.entity;

import java.io.Serializable;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.jpsoft.shinestar.modules.common.utils.TypeNameUtil;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * 描述:base_work_over的实体类
 */
@Data
@ApiModel(value = "base_work_over的实体类")
public class WorkOver {
    @ApiModelProperty(value = "")
    private String id;
    @ApiModelProperty(value = "用户角色id")
    private String personPopedomId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;
    private Integer hours;

    @ApiModelProperty(value = "审核流程id")
    private String procinstId;
    @ApiModelProperty(value = "类型（1：个人申请，2：批量申请）")
    private String type;
    @ApiModelProperty(value = "审核状态（0：审核中，1：同意，2：退回，3：拒绝，4：无需审核，6：已撤销）")
    private String status;
    @ApiModelProperty(value = "审批人id")
    private String approvalPersonPopedomId;
    @ApiModelProperty(value = "加班原因")
    private String reason;
    @ApiModelProperty(value = "审批编号")
    private String approvalNo;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "审核时间")
    private Date approvalTime;
    @ApiModelProperty(value = "审核意见")
    private String approvalContent;
    @ApiModelProperty(value = "审批人id（包含历史记录）")
    private String approvalPersonIdStr;
    @ApiModelProperty(value = "审批状态（包含历史记录）")
    private String approvalStatusStr;
    @ApiModelProperty(value = "审核时间（包含历史记录）")
    private String approvalTimeStr;
    @ApiModelProperty(value = "审核意见（包含历史记录）")
    private String approvalContentStr;
    @ApiModelProperty(value = "")
    private String createBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "")
    private Date createTime;
    @ApiModelProperty(value = "")
    private String updateBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "")
    private Date updateTime;
    @ApiModelProperty(value = "是否删除")
    private Boolean delFlag = false;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "用户单位名称")
    private String companyName;
    @ApiModelProperty(value = "用户名称")
    private String personName;
    @ApiModelProperty(value = "审批人名称")
    private String approvalPersonName;

    public String getStatusN() {

        String text = TypeNameUtil.getExamineTypeName(status);
        return text;
       /* if ("0".equals(status)) {
            return "待处理";
        } else if ("1".equals(status)) {
            return "已同意";
        } else if ("2".equals(status)) {
            return "已拒绝";
        } else {
            return "";
        }*/
    }

    private String overPersonNames;
    private String overPersonIds;
    private List<Map> overPerson;
}