package com.qmth.distributed.print.business.bean.dto.report;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.bean.dto.CourseWeightDto;
import com.qmth.distributed.print.business.bean.dto.obe.MatrixSubRequirementDto;
import io.swagger.annotations.ApiModelProperty;
import org.jetbrains.annotations.NotNull;

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

/**
 * @Description: obe毕业指标点dto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2024/2/26
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ObeSubRequirementsDto extends CourseTargetWebDto {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "毕业指标点id")
    private Long id;

    @ApiModelProperty(value = "毕业指标点名称")
    private String name;

    @ApiModelProperty(value = "权重")
    private Double scale;

    @ApiModelProperty(value = "描述")
    private String content;

    @ApiModelProperty(value = "毕业指标点达成值")
    private BigDecimal matrixDegree = new BigDecimal(0);

    public ObeSubRequirementsDto() {

    }

    public ObeSubRequirementsDto(CourseTargetWebDto courseTargetWebDto, MatrixSubRequirementDto matrixSubRequirementDto) {
        this.id = matrixSubRequirementDto.getId();
        this.name = matrixSubRequirementDto.getName();
        this.scale = matrixSubRequirementDto.getScale();
        this.content = matrixSubRequirementDto.getContent();
        setTargetId(courseTargetWebDto.getTargetId());
        setTargetName(courseTargetWebDto.getTargetName());
        setGraduationRequirement(courseTargetWebDto.getGraduationRequirement());
        setGraduationRequirementPoint(courseTargetWebDto.getGraduationRequirementPoint());
        setTargetSumWeight(courseTargetWebDto.getTargetSumWeight());
        setDimensionList(courseTargetWebDto.getDimensionList());
        setEvaluationValue(courseTargetWebDto.getEvaluationValue());
        setEvaluationList(courseTargetWebDto.getEvaluationList());
        setDimensionScoreSum(courseTargetWebDto.getDimensionScoreSum());
        setDimensionPoint(courseTargetWebDto.getDimensionPoint());
        setFinalScoreQuestionScoreSum(courseTargetWebDto.getFinalScoreQuestionScoreSum());
    }

    public ObeSubRequirementsDto(MatrixSubRequirementDto matrixSubRequirementDto) {
        this.id = matrixSubRequirementDto.getId();
        this.name = matrixSubRequirementDto.getName();
        this.scale = matrixSubRequirementDto.getScale();
        this.content = matrixSubRequirementDto.getContent();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getScale() {
        return scale;
    }

    public void setScale(Double scale) {
        this.scale = scale;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public BigDecimal getMatrixDegree() {
        return matrixDegree;
    }

    public void setMatrixDegree(BigDecimal matrixDegree) {
        this.matrixDegree = matrixDegree;
    }
}
