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 io.swagger.annotations.ApiModelProperty;
import org.jetbrains.annotations.NotNull;

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

/**
 * @Description: 报告课程考核成绩评价明细结果-考生-平时成绩对象dto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2024/2/26
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReportExamStudentUsualScoreObjDto implements Serializable, Comparable<ReportExamStudentUsualScoreObjDto> {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "课程目标id")
    private Long targetId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "评价方式id")
    private Long evaluationId;

    @ApiModelProperty(value = "评价方式")
    private String evaluation;

    @ApiModelProperty(value = "评价方式描述")
    private String evaluationDesc;

    @ApiModelProperty(value = "作业权重")
    private BigDecimal targetWeight;

    @ApiModelProperty(value = "作业目标分值")
    private BigDecimal targetScore;

//    @ApiModelProperty(value = "作业整体权重")
//    private BigDecimal targetSumWeight;

    @ApiModelProperty(value = "作业整体分值")
    private BigDecimal targetSumScore;

    @ApiModelProperty(value = "卷面分数")
    private Double score;

    @ApiModelProperty(value = "换算分数")
    private Double matrixScore;

    @ApiModelProperty(value = "课程目标考核要素的平均分")
    private Double matrixAvgScore;

    public ReportExamStudentUsualScoreObjDto() {

    }

    public ReportExamStudentUsualScoreObjDto(ReportExamStudentUsualScoreObjDto reportExamStudentUsualScoreObjDto) {
        this.targetId = reportExamStudentUsualScoreObjDto.getTargetId();
        this.evaluationId = reportExamStudentUsualScoreObjDto.getEvaluationId();
        this.evaluation = reportExamStudentUsualScoreObjDto.getEvaluation();
        this.evaluationDesc = reportExamStudentUsualScoreObjDto.getEvaluationDesc();
        this.targetWeight = reportExamStudentUsualScoreObjDto.getTargetWeight();
        this.targetScore = reportExamStudentUsualScoreObjDto.getTargetScore();
        this.score = reportExamStudentUsualScoreObjDto.getScore();
        this.matrixScore = reportExamStudentUsualScoreObjDto.getMatrixScore();
        this.targetSumScore = reportExamStudentUsualScoreObjDto.getTargetSumScore();
    }

    public ReportExamStudentUsualScoreObjDto(Long targetId, ReportEvaluationDto reportEvaluationDto, Double score, Double matrixScore, BigDecimal targetSumScore) {
        this.evaluationId = reportEvaluationDto.getEvaluationId();
        this.evaluation = reportEvaluationDto.getEvaluation();
        this.evaluationDesc = reportEvaluationDto.getEvaluationDesc();
        this.targetWeight = reportEvaluationDto.getTargetWeight();
        this.targetScore = reportEvaluationDto.getTargetScore();
        this.score = score;
        this.matrixScore = matrixScore;
        this.targetId = targetId;
        this.targetSumScore = targetSumScore;
    }

    public Double getMatrixAvgScore() {
        return matrixAvgScore;
    }

    public void setMatrixAvgScore(Double matrixAvgScore) {
        this.matrixAvgScore = matrixAvgScore;
    }

    public Long getTargetId() {
        return targetId;
    }

    public void setTargetId(Long targetId) {
        this.targetId = targetId;
    }

    public BigDecimal getTargetSumScore() {
        return targetSumScore;
    }

    public void setTargetSumScore(BigDecimal targetSumScore) {
        this.targetSumScore = targetSumScore;
    }

    public Long getEvaluationId() {
        return evaluationId;
    }

    public void setEvaluationId(Long evaluationId) {
        this.evaluationId = evaluationId;
    }

    public String getEvaluation() {
        return evaluation;
    }

    public void setEvaluation(String evaluation) {
        this.evaluation = evaluation;
    }

    public String getEvaluationDesc() {
        return evaluationDesc;
    }

    public void setEvaluationDesc(String evaluationDesc) {
        this.evaluationDesc = evaluationDesc;
    }

    public BigDecimal getTargetWeight() {
        return targetWeight;
    }

    public void setTargetWeight(BigDecimal targetWeight) {
        this.targetWeight = targetWeight;
    }

    public BigDecimal getTargetScore() {
        return targetScore;
    }

    public void setTargetScore(BigDecimal targetScore) {
        this.targetScore = targetScore;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public Double getMatrixScore() {
        return matrixScore;
    }

    public void setMatrixScore(Double matrixScore) {
        this.matrixScore = matrixScore;
    }

    @Override
    public int compareTo(@NotNull ReportExamStudentUsualScoreObjDto o) {
        return this.getEvaluation().compareTo(o.getEvaluation());
    }
}
