package com.jpsoft.shinestar.modules.business.dto;

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

import java.util.Date;

/**
 * @author 墨鱼_mo
 * @date 2021-4-30 13:53
 */
@Data
public class AdjustShiftListDTO {

    private String id;

    private String type;

    private String typeName;

    private String adjustDate;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
    @ApiModelProperty(value = "提交时间")
    private Date submitTime;

    private String status;

    private String statusName;

    public String getTypeName(String type){
        String typeName = "个人申请";
        if ("2".equals(type)){
            typeName = "上级安排";
        }
        return  typeName;
    }

    public String getStatusName(String status){
        String text = TypeNameUtil.getExamineTypeName(status);
        return text;
        /*String statusName = "待审核";
        if ("1".equals(status)){
            statusName = "同意";
        }
        if ("2".equals(status)){
            statusName = "退回";
        }
        if ("3".equals(status)){
            statusName = "拒绝";
        }
        if ("4".equals(status)){
            statusName = "无需审核";
        }*/
      //  return statusName;
    }
}
