package com.ruoyi.system.domain.vo;

import com.ruoyi.system.domain.SysTrainingScore;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TrainingScoreVo implements Serializable {
    private Integer dataCollectionScore;
    private String dataCollectionTime;
    private String dataCollectionProgress;

    private Integer textSegmentationScore;
    private String textSegmentationTime;
    private String textSegmentationProgress;

    private Integer partofspeechTaggingScore;
    private String partofspeechTaggingTime;
    private String partofspeechTaggingProgress;

    private Integer categoryManagementScore;
    private String categoryManagementTime;
    private String categoryManagementProgress;

    private Integer textClassificationScore;
    private String textClassificationTime;
    private String textClassificationProgress;

    private Integer textSummarizationScore;
    private String textSummarizationTime;
    private String textSummarizationProgress;

    private Integer similarityCalculationScore;
    private String similarityCalculationTime;
    private String similarityCalculationProgress;

    private Integer sentimentAnalysisScore;
    private String sentimentAnalysisTime;
    private String sentimentAnalysisProgress;

    private Integer dataVisualizationScore;
    private String dataVisualizationTime;
    private String dataVisualizationProgress;

    private Integer reportSubmissionScore;
    private String reportSubmissionTime;
    private String reportSubmissionProgress;

    public Integer getDataCollectionScore() {
        return dataCollectionScore;
    }

    public void setDataCollectionScore(Integer dataCollectionScore) {
        this.dataCollectionScore = dataCollectionScore;
    }

    public String getDataCollectionTime() {
        return dataCollectionTime;
    }

    public void setDataCollectionTime(String dataCollectionTime) {
        this.dataCollectionTime = dataCollectionTime;
    }

    public String getDataCollectionProgress() {
        return dataCollectionProgress;
    }

    public void setDataCollectionProgress(String dataCollectionProgress) {
        this.dataCollectionProgress = dataCollectionProgress;
    }

    public Integer getTextSegmentationScore() {
        return textSegmentationScore;
    }

    public void setTextSegmentationScore(Integer textSegmentationScore) {
        this.textSegmentationScore = textSegmentationScore;
    }

    public String getTextSegmentationTime() {
        return textSegmentationTime;
    }

    public void setTextSegmentationTime(String textSegmentationTime) {
        this.textSegmentationTime = textSegmentationTime;
    }

    public String getTextSegmentationProgress() {
        return textSegmentationProgress;
    }

    public void setTextSegmentationProgress(String textSegmentationProgress) {
        this.textSegmentationProgress = textSegmentationProgress;
    }

    public Integer getPartofspeechTaggingScore() {
        return partofspeechTaggingScore;
    }

    public void setPartofspeechTaggingScore(Integer partofspeechTaggingScore) {
        this.partofspeechTaggingScore = partofspeechTaggingScore;
    }

    public String getPartofspeechTaggingTime() {
        return partofspeechTaggingTime;
    }

    public void setPartofspeechTaggingTime(String partofspeechTaggingTime) {
        this.partofspeechTaggingTime = partofspeechTaggingTime;
    }

    public String getPartofspeechTaggingProgress() {
        return partofspeechTaggingProgress;
    }

    public void setPartofspeechTaggingProgress(String partofspeechTaggingProgress) {
        this.partofspeechTaggingProgress = partofspeechTaggingProgress;
    }

    public Integer getCategoryManagementScore() {
        return categoryManagementScore;
    }

    public void setCategoryManagementScore(Integer categoryManagementScore) {
        this.categoryManagementScore = categoryManagementScore;
    }

    public String getCategoryManagementTime() {
        return categoryManagementTime;
    }

    public void setCategoryManagementTime(String categoryManagementTime) {
        this.categoryManagementTime = categoryManagementTime;
    }

    public String getCategoryManagementProgress() {
        return categoryManagementProgress;
    }

    public void setCategoryManagementProgress(String categoryManagementProgress) {
        this.categoryManagementProgress = categoryManagementProgress;
    }

    public Integer getTextClassificationScore() {
        return textClassificationScore;
    }

    public void setTextClassificationScore(Integer textClassificationScore) {
        this.textClassificationScore = textClassificationScore;
    }

    public String getTextClassificationTime() {
        return textClassificationTime;
    }

    public void setTextClassificationTime(String textClassificationTime) {
        this.textClassificationTime = textClassificationTime;
    }

    public String getTextClassificationProgress() {
        return textClassificationProgress;
    }

    public void setTextClassificationProgress(String textClassificationProgress) {
        this.textClassificationProgress = textClassificationProgress;
    }

    public Integer getTextSummarizationScore() {
        return textSummarizationScore;
    }

    public void setTextSummarizationScore(Integer textSummarizationScore) {
        this.textSummarizationScore = textSummarizationScore;
    }

    public String getTextSummarizationTime() {
        return textSummarizationTime;
    }

    public void setTextSummarizationTime(String textSummarizationTime) {
        this.textSummarizationTime = textSummarizationTime;
    }

    public String getTextSummarizationProgress() {
        return textSummarizationProgress;
    }

    public void setTextSummarizationProgress(String textSummarizationProgress) {
        this.textSummarizationProgress = textSummarizationProgress;
    }

    public Integer getSimilarityCalculationScore() {
        return similarityCalculationScore;
    }

    public void setSimilarityCalculationScore(Integer similarityCalculationScore) {
        this.similarityCalculationScore = similarityCalculationScore;
    }

    public String getSimilarityCalculationTime() {
        return similarityCalculationTime;
    }

    public void setSimilarityCalculationTime(String similarityCalculationTime) {
        this.similarityCalculationTime = similarityCalculationTime;
    }

    public String getSimilarityCalculationProgress() {
        return similarityCalculationProgress;
    }

    public void setSimilarityCalculationProgress(String similarityCalculationProgress) {
        this.similarityCalculationProgress = similarityCalculationProgress;
    }

    public Integer getSentimentAnalysisScore() {
        return sentimentAnalysisScore;
    }

    public void setSentimentAnalysisScore(Integer sentimentAnalysisScore) {
        this.sentimentAnalysisScore = sentimentAnalysisScore;
    }

    public String getSentimentAnalysisTime() {
        return sentimentAnalysisTime;
    }

    public void setSentimentAnalysisTime(String sentimentAnalysisTime) {
        this.sentimentAnalysisTime = sentimentAnalysisTime;
    }

    public String getSentimentAnalysisProgress() {
        return sentimentAnalysisProgress;
    }

    public void setSentimentAnalysisProgress(String sentimentAnalysisProgress) {
        this.sentimentAnalysisProgress = sentimentAnalysisProgress;
    }

    public Integer getDataVisualizationScore() {
        return dataVisualizationScore;
    }

    public void setDataVisualizationScore(Integer dataVisualizationScore) {
        this.dataVisualizationScore = dataVisualizationScore;
    }

    public String getDataVisualizationTime() {
        return dataVisualizationTime;
    }

    public void setDataVisualizationTime(String dataVisualizationTime) {
        this.dataVisualizationTime = dataVisualizationTime;
    }

    public String getDataVisualizationProgress() {
        return dataVisualizationProgress;
    }

    public void setDataVisualizationProgress(String dataVisualizationProgress) {
        this.dataVisualizationProgress = dataVisualizationProgress;
    }

    public Integer getReportSubmissionScore() {
        return reportSubmissionScore;
    }

    public void setReportSubmissionScore(Integer reportSubmissionScore) {
        this.reportSubmissionScore = reportSubmissionScore;
    }

    public String getReportSubmissionTime() {
        return reportSubmissionTime;
    }

    public void setReportSubmissionTime(String reportSubmissionTime) {
        this.reportSubmissionTime = reportSubmissionTime;
    }

    public String getReportSubmissionProgress() {
        return reportSubmissionProgress;
    }

    public void setReportSubmissionProgress(String reportSubmissionProgress) {
        this.reportSubmissionProgress = reportSubmissionProgress;
    }

    public List<Map> ReturnTrainingScore(TrainingScoreVo trainingScoreVo){
        List<Map> list=new ArrayList<>();
        Map dataCollectionMap=new HashMap();
        dataCollectionMap.put("name","数据采集");
        dataCollectionMap.put("score",trainingScoreVo.getDataCollectionScore());
        dataCollectionMap.put("progress",trainingScoreVo.getDataCollectionProgress());
        dataCollectionMap.put("time",trainingScoreVo.getDataCollectionTime());
        list.add(dataCollectionMap);

        Map textSegmentationMap=new HashMap();
        textSegmentationMap.put("name","文本分词");
        textSegmentationMap.put("score",trainingScoreVo.getTextSegmentationScore());
        textSegmentationMap.put("progress",trainingScoreVo.getTextSegmentationProgress());
        textSegmentationMap.put("time",trainingScoreVo.getTextSegmentationTime());
        list.add(textSegmentationMap);

        Map partofspeechTaggingMap=new HashMap();
        partofspeechTaggingMap.put("name","词性标注");
        partofspeechTaggingMap.put("score",trainingScoreVo.getPartofspeechTaggingScore());
        partofspeechTaggingMap.put("progress",trainingScoreVo.getPartofspeechTaggingProgress());
        partofspeechTaggingMap.put("time",trainingScoreVo.getPartofspeechTaggingTime());
        list.add(partofspeechTaggingMap);

        Map categoryManagementMap=new HashMap();
        categoryManagementMap.put("name","分类管理");
        categoryManagementMap.put("score",trainingScoreVo.getCategoryManagementScore());
        categoryManagementMap.put("progress",trainingScoreVo.getCategoryManagementProgress());
        categoryManagementMap.put("time",trainingScoreVo.getCategoryManagementTime());
        list.add(categoryManagementMap);

        Map textClassificationMap=new HashMap();
        textClassificationMap.put("name","文本分类");
        textClassificationMap.put("score",trainingScoreVo.getTextClassificationScore());
        textClassificationMap.put("progress",trainingScoreVo.getTextClassificationProgress());
        textClassificationMap.put("time",trainingScoreVo.getTextClassificationTime());
        list.add(textClassificationMap);

        Map textSummarizationMap=new HashMap();
        textSummarizationMap.put("name","文本摘要");
        textSummarizationMap.put("score",trainingScoreVo.getTextSummarizationScore());
        textSummarizationMap.put("progress",trainingScoreVo.getTextSummarizationProgress());
        textSummarizationMap.put("time",trainingScoreVo.getTextSummarizationTime());
        list.add(textSummarizationMap);

        Map similarityCalculationMap=new HashMap();
        similarityCalculationMap.put("name","相似度计算");
        similarityCalculationMap.put("score",trainingScoreVo.getSimilarityCalculationScore());
        similarityCalculationMap.put("progress",trainingScoreVo.getSimilarityCalculationProgress());
        similarityCalculationMap.put("time",trainingScoreVo.getSimilarityCalculationTime());
        list.add(similarityCalculationMap);

        Map sentimentAnalysisMap=new HashMap();
        sentimentAnalysisMap.put("name","情感分析");
        sentimentAnalysisMap.put("score",trainingScoreVo.getSentimentAnalysisScore());
        sentimentAnalysisMap.put("progress",trainingScoreVo.getSentimentAnalysisProgress());
        sentimentAnalysisMap.put("time",trainingScoreVo.getSentimentAnalysisTime());
        list.add(sentimentAnalysisMap);

        Map dataVisualizationMap=new HashMap();
        dataVisualizationMap.put("name","数据可视化");
        dataVisualizationMap.put("score",trainingScoreVo.getDataVisualizationScore());
        dataVisualizationMap.put("progress",trainingScoreVo.getDataVisualizationProgress());
        dataVisualizationMap.put("time",trainingScoreVo.getDataVisualizationTime());
        list.add(dataVisualizationMap);


        Map reportSubmissionMap=new HashMap();
        reportSubmissionMap.put("name","报告提交");
        reportSubmissionMap.put("score",trainingScoreVo.getReportSubmissionScore());
        reportSubmissionMap.put("progress",trainingScoreVo.getReportSubmissionProgress());
        reportSubmissionMap.put("time",trainingScoreVo.getReportSubmissionTime());
        list.add(reportSubmissionMap);

        return list;
    }

    public TrainingScoreVo(SysTrainingScore sysTrainingScore){
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        if (sysTrainingScore.getDataCollectionTime()!=null){
            this.dataCollectionTime=dateFormat.format(sysTrainingScore.getDataCollectionTime());;
        }
        this.dataCollectionScore=sysTrainingScore.getDataCollectionScore();
        this.dataCollectionProgress=sysTrainingScore.getDataCollectionProgress();

        if (sysTrainingScore.getTextSegmentationTime()!=null){
            this.textSegmentationTime=dateFormat.format(sysTrainingScore.getTextSegmentationTime());;
        }
        this.textSegmentationScore = sysTrainingScore.getTextSegmentationScore();
        this.textSegmentationProgress = sysTrainingScore.getTextSegmentationProgress();

        if (sysTrainingScore.getPartofspeechTaggingTime()!=null){
            this.partofspeechTaggingTime=dateFormat.format(sysTrainingScore.getPartofspeechTaggingTime());;
        }
        this.partofspeechTaggingScore = sysTrainingScore.getPartofspeechTaggingScore();
        this.partofspeechTaggingProgress = sysTrainingScore.getPartofspeechTaggingProgress();

        if (sysTrainingScore.getCategoryManagementTime()!=null){
            this.categoryManagementTime=dateFormat.format(sysTrainingScore.getCategoryManagementTime());;
        }
        this.categoryManagementScore = sysTrainingScore.getCategoryManagementScore();
        this.categoryManagementProgress = sysTrainingScore.getCategoryManagementProgress();

        if (sysTrainingScore.getTextClassificationTime()!=null){
            this.textClassificationTime=dateFormat.format(sysTrainingScore.getTextClassificationTime());;
        }
        this.textClassificationScore = sysTrainingScore.getTextClassificationScore();
        this.textClassificationProgress = sysTrainingScore.getTextClassificationProgress();

        if (sysTrainingScore.getTextSummarizationTime()!=null){
            this.textSummarizationTime=dateFormat.format(sysTrainingScore.getTextSummarizationTime());;
        }
        this.textSummarizationScore = sysTrainingScore.getTextSummarizationScore();
        this.textSummarizationProgress = sysTrainingScore.getTextSummarizationProgress();

        if (sysTrainingScore.getSimilarityCalculationTime()!=null){
            this.similarityCalculationTime=dateFormat.format(sysTrainingScore.getSimilarityCalculationTime());;
        }
        this.similarityCalculationScore = sysTrainingScore.getSimilarityCalculationScore();
        this.similarityCalculationProgress = sysTrainingScore.getSimilarityCalculationProgress();

        if (sysTrainingScore.getSentimentAnalysisTime()!=null){
            this.sentimentAnalysisTime=dateFormat.format(sysTrainingScore.getSentimentAnalysisTime());;
        }
        this.sentimentAnalysisScore = sysTrainingScore.getSentimentAnalysisScore();
        this.sentimentAnalysisProgress = sysTrainingScore.getSentimentAnalysisProgress();

        if (sysTrainingScore.getDataVisualizationTime()!=null){
            this.dataVisualizationTime=dateFormat.format(sysTrainingScore.getDataVisualizationTime());;
        }
        this.dataVisualizationScore = sysTrainingScore.getDataVisualizationScore();
        this.dataVisualizationProgress = sysTrainingScore.getDataVisualizationProgress();

        if (sysTrainingScore.getReportSubmissionTime()!=null){
            this.reportSubmissionTime=dateFormat.format(sysTrainingScore.getReportSubmissionTime());;
        }
        this.reportSubmissionScore = sysTrainingScore.getReportSubmissionScore();
        this.reportSubmissionProgress = sysTrainingScore.getReportSubmissionProgress();

    }

}
