package com.yunfeiyun.agmp.fms.domain.resvo;

import com.yunfeiyun.agmp.common.annotation.Excel;
import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.utils.DateUtils;
import com.yunfeiyun.agmp.common.utils.DictUtils;
import com.yunfeiyun.agmp.common.utils.StringUtils;
import lombok.Data;

/**
 * 决策对象 FmsPolicy
 * 
 * @author 杨晓辉
 * @date 2023-06-05
 */
@Data
public class FmsPolicyListResVo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 决策标识 */
    private String decisionId;

    /** 决策类型 */
    @Excel(name = "决策类型")
    private String decisionType;

    /** 决策标题 */
    @Excel(name = "决策标题")
    private String decisionTitle;

    /** 决策发布人 */
    @Excel(name = "决策发布人")
    private String decisionCreator;

    /** 决策发布日期 */
    @Excel(name = "决策发布日期")
    private String decisionCreateddate;

    public String getDecisionCreateddate() {
        if (this.decisionCreateddate != null && !this.decisionCreateddate.equals("")){
            return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.parseDate(this.decisionCreateddate));
        }
        return decisionCreateddate;
    }

    public String getDecisionTypeContent() {
        if (!StringUtils.isEmpty(this.decisionType)){
            return DictUtils.getDictLabel("fms_policy_type", this.decisionType);
        }
        return "";
    }

}
