package com.ruoyi.postCheck.domain.tools;

import com.ruoyi.postCheck.domain.problemStatistics.ProblemNumberBase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel(value = "按问题属性分组统计问题类别")
@Data
public class ProblemCategory extends ProblemNumberBase {

    @ApiModelProperty("问题属性（1-完整问题；2-有效性问题；3-适宜性问题；）")
    private Integer problemAttribute;
    @ApiModelProperty("问题属性显示名称")
    private String problemAttributeView;

//        @ApiModelProperty("职责权限问题")
//        private Integer problemCategoryOne;

//        @ApiModelProperty("工作内容问题")
//        private Integer problemCategoryTwo;

//        @ApiModelProperty("工作标准问题")
//        private Integer problemCategoryThree;

//        @ApiModelProperty("考核奖励问题")
//        private Integer problemCategoryFour;

//        @ApiModelProperty("任职资格问题")
//        private Integer problemCategoryFive;

//        @ApiModelProperty("其他")
//        private Integer problemCategorySix;

//        @ApiModelProperty("总数量")
//        private Integer problemTotal;

    public void setProblemAttribute(Integer problemAttribute) {
        this.problemAttribute = problemAttribute;

        if (problemAttribute != null)
            switch (problemAttribute) {
                case 1: {
                    setProblemAttributeView("完整问题");

                    break;
                }
                case 2: {
                    setProblemAttributeView("有效性问题");

                    break;
                }
                case 3: {
                    setProblemAttributeView("适宜性问题");

                    break;
                }

                default:
                    setProblemAttributeView("Other");
                    break;
            }
    }


}
