|
|
|
@ -114,32 +114,32 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus();
|
|
|
|
|
Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus();
|
|
|
|
|
Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus();
|
|
|
|
|
if (knowledgeStatus > 5) {
|
|
|
|
|
knowledgeStatus = 5;
|
|
|
|
|
if(knowledgeStatus>5){
|
|
|
|
|
knowledgeStatus=5;
|
|
|
|
|
}
|
|
|
|
|
if (resourceStatus > 5) {
|
|
|
|
|
resourceStatus = 5;
|
|
|
|
|
if(resourceStatus>5){
|
|
|
|
|
resourceStatus=5;
|
|
|
|
|
}
|
|
|
|
|
StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName());
|
|
|
|
|
BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight());
|
|
|
|
|
BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight());
|
|
|
|
|
BigDecimal learningScore = BigDecimal.valueOf(0);
|
|
|
|
|
BigDecimal experimentalScore = BigDecimal.valueOf(0);
|
|
|
|
|
if (learningEvalCompleteStatus != 9999) {
|
|
|
|
|
if (learningEvalCompleteStatus <= 10) {
|
|
|
|
|
BigDecimal learningScore= BigDecimal.valueOf(0);
|
|
|
|
|
BigDecimal experimentalScore= BigDecimal.valueOf(0);
|
|
|
|
|
if(learningEvalCompleteStatus!=9999){
|
|
|
|
|
if(learningEvalCompleteStatus<=10){
|
|
|
|
|
learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (expStatus != 9999) {
|
|
|
|
|
if (expStatus <= 5) {
|
|
|
|
|
if(expStatus!=9999){
|
|
|
|
|
if(expStatus<=5){
|
|
|
|
|
experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
}
|
|
|
|
|
//财产分配特殊处理
|
|
|
|
|
if ("11".equals(stuTraining.getChapterId())) {
|
|
|
|
|
if (stuTraining.getExpTrainingCompleteStatus().compareTo(100) > 0) {
|
|
|
|
|
if("11".equals(stuTraining.getChapterId())){
|
|
|
|
|
if(stuTraining.getExpTrainingCompleteStatus().compareTo(100)>0){
|
|
|
|
|
stuTraining.setExpTrainingCompleteStatus(100);
|
|
|
|
|
}
|
|
|
|
|
experimentalScore = BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
experimentalScore= BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//计算报告分数
|
|
|
|
@ -147,7 +147,7 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
TrainingReportExample trainingReportExample = new TrainingReportExample();
|
|
|
|
|
trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId);
|
|
|
|
|
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
|
|
|
|
|
BigDecimal reportScore = BigDecimal.ZERO;
|
|
|
|
|
BigDecimal reportScore=BigDecimal.ZERO;
|
|
|
|
|
if (!trainingReports.isEmpty()) {
|
|
|
|
|
if (trainingReports.get(0).getTeacherScore() != null) {
|
|
|
|
|
reportScore = trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight());
|
|
|
|
@ -203,10 +203,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample);
|
|
|
|
|
scoreRank.setCountCase((int) countCase);
|
|
|
|
|
|
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId, schoolId);
|
|
|
|
|
if (dto == null) {
|
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId,schoolId);
|
|
|
|
|
if(dto==null){
|
|
|
|
|
scoreRank.setZhghScore(BigDecimal.ZERO);
|
|
|
|
|
} else {
|
|
|
|
|
}else {
|
|
|
|
|
scoreRank.setZhghScore(dto.getAvgScore());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -402,32 +402,32 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus();
|
|
|
|
|
Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus();
|
|
|
|
|
Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus();
|
|
|
|
|
if (knowledgeStatus > 5) {
|
|
|
|
|
knowledgeStatus = 5;
|
|
|
|
|
if(knowledgeStatus>5){
|
|
|
|
|
knowledgeStatus=5;
|
|
|
|
|
}
|
|
|
|
|
if (resourceStatus > 5) {
|
|
|
|
|
resourceStatus = 5;
|
|
|
|
|
if(resourceStatus>5){
|
|
|
|
|
resourceStatus=5;
|
|
|
|
|
}
|
|
|
|
|
StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName());
|
|
|
|
|
BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight());
|
|
|
|
|
BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight());
|
|
|
|
|
BigDecimal learningScore = BigDecimal.valueOf(0);
|
|
|
|
|
BigDecimal experimentalScore = BigDecimal.valueOf(0);
|
|
|
|
|
if (learningEvalCompleteStatus != 9999) {
|
|
|
|
|
if (learningEvalCompleteStatus <= 10) {
|
|
|
|
|
BigDecimal learningScore= BigDecimal.valueOf(0);
|
|
|
|
|
BigDecimal experimentalScore= BigDecimal.valueOf(0);
|
|
|
|
|
if(learningEvalCompleteStatus!=9999){
|
|
|
|
|
if(learningEvalCompleteStatus<=10){
|
|
|
|
|
learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (expStatus != 9999) {
|
|
|
|
|
if (expStatus <= 5) {
|
|
|
|
|
if(expStatus!=9999){
|
|
|
|
|
if(expStatus<=5){
|
|
|
|
|
experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
}
|
|
|
|
|
//财产分配特殊处理
|
|
|
|
|
if ("11".equals(stuTraining.getChapterId())) {
|
|
|
|
|
if (stuTraining.getExpTrainingCompleteStatus().compareTo(100) > 0) {
|
|
|
|
|
if("11".equals(stuTraining.getChapterId())){
|
|
|
|
|
if(stuTraining.getExpTrainingCompleteStatus().compareTo(100)>0){
|
|
|
|
|
stuTraining.setExpTrainingCompleteStatus(100);
|
|
|
|
|
}
|
|
|
|
|
experimentalScore = BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
experimentalScore= BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//计算报告分数
|
|
|
|
@ -435,9 +435,9 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
TrainingReportExample trainingReportExample = new TrainingReportExample();
|
|
|
|
|
trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId);
|
|
|
|
|
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
|
|
|
|
|
BigDecimal reportScore = BigDecimal.ZERO;
|
|
|
|
|
BigDecimal reportScore=BigDecimal.ZERO;
|
|
|
|
|
if (!trainingReports.isEmpty()) {
|
|
|
|
|
if (trainingReports.get(0).getTeacherScore() != null) {
|
|
|
|
|
if (trainingReports.get(0).getTeacherScore() != null) { //todo 报告得分为0导致更新成绩报错,这里加了一个判断
|
|
|
|
|
reportScore = trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -492,10 +492,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
|
|
|
|
|
long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample);
|
|
|
|
|
scoreRank.setCountCase((int) countCase);
|
|
|
|
|
|
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId, schoolId);
|
|
|
|
|
if (dto == null) {
|
|
|
|
|
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId,schoolId);
|
|
|
|
|
if(dto==null){
|
|
|
|
|
scoreRank.setZhghScore(BigDecimal.ZERO);
|
|
|
|
|
} else {
|
|
|
|
|
}else {
|
|
|
|
|
scoreRank.setZhghScore(dto.getAvgScore());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|