|
|
|
@ -108,7 +108,7 @@ public class GradeController {
|
|
|
|
|
if (studentScoreWeights.isEmpty()) { //设置默认权重与计分规则
|
|
|
|
|
//计分规则
|
|
|
|
|
studentScoreWeight.setSummaryOfKnowledgeScore(BigDecimal.valueOf(20));
|
|
|
|
|
studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(2));
|
|
|
|
|
studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(20));
|
|
|
|
|
studentScoreWeight.setLearningAssessmentScore(BigDecimal.valueOf(10));
|
|
|
|
|
studentScoreWeight.setExperimentalTrainingScore(BigDecimal.valueOf(10));
|
|
|
|
|
|
|
|
|
@ -291,7 +291,7 @@ public class GradeController {
|
|
|
|
|
for (int i = 0; i < clientCaseList.size(); i++) {
|
|
|
|
|
StuClientCaseScoreDto clientCase = clientCaseList.get(i);
|
|
|
|
|
BigDecimal trainingTime = clientCase.getTrainingTime() == null ? BigDecimal.ZERO : clientCase.getTrainingTime();
|
|
|
|
|
BigDecimal totalScore = clientCase.getTrainingTotalScore() == null ? BigDecimal.ZERO : clientCase.getTrainingTotalScore();
|
|
|
|
|
BigDecimal totalScore = clientCase.getTrainingTotalScore() == null ? BigDecimal.ZERO : clientCase.getTrainingScore();
|
|
|
|
|
clientCaseTrainingTime = clientCaseTrainingTime.add(trainingTime);
|
|
|
|
|
clientCaseTotalTrainingScore = clientCaseTotalTrainingScore.add(totalScore);
|
|
|
|
|
}
|
|
|
|
@ -993,25 +993,32 @@ public class GradeController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//设置理财方案分数 先获取案例题答案的分数 再获取学生理财方案的四个对象 按照公式对比大小 如果大于老师的答案 则给两分 低于给0分
|
|
|
|
|
CaseLifeEducationPlanExample teaExample = new CaseLifeEducationPlanExample();
|
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseLifeEducationPlan> teaCasePlanList = caseLifeEducationPlanMapper.selectByExample(teaExample);
|
|
|
|
|
CaseLifeEducationPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(0);
|
|
|
|
|
String financialPlan = stuPlan.getFinancialPlan();
|
|
|
|
|
try {
|
|
|
|
|
if (financialPlan != null) {
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal(financialPlan);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// 可以选择设置一个默认值或者进行其他错误处理
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal("0"); // 或者其他适当的默认值
|
|
|
|
|
}
|
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
|
Integer regularYear = stuPlan.getRegularYear(); //定期定额投资年限 n
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
BigDecimal teacherFinancialPlanningScore = BigDecimal.ZERO; //老师理财分数 用于保存到综合规划成绩表中
|
|
|
|
|
try {
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
if (stuFinancialPlanningMoney.compareTo(teaFinancialPlanningMoney) >= 0) {
|
|
|
|
|
teacherFinancialPlanningScore = BigDecimal.valueOf(2);
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
} else {
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
caseLifeEducationPlanMapper.updateByPrimaryKey(stuPlan);
|
|
|
|
|
//并设置综合规划成绩表 修改老师评分分数
|
|
|
|
|
SynthesisPlanScoreExample scoreExample = new SynthesisPlanScoreExample();
|
|
|
|
@ -1064,25 +1071,32 @@ public class GradeController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//设置理财方案分数 先获取案例题答案的分数 再获取学生理财方案的四个对象 按照公式对比大小 如果大于老师的答案 则给两分 低于给0分
|
|
|
|
|
CaseConsumptionPlanExample teaExample = new CaseConsumptionPlanExample();
|
|
|
|
|
teaExample.createCriteria().andCaseIdEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseConsumptionPlan> teaCasePlanList = caseConsumptionPlanMapper.selectByExample(teaExample);
|
|
|
|
|
CaseConsumptionPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(0);
|
|
|
|
|
String financialPlan = stuPlan.getFinancialPlan();
|
|
|
|
|
try {
|
|
|
|
|
if (financialPlan != null) {
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal(financialPlan);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// 可以选择设置一个默认值或者进行其他错误处理
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal("0"); // 或者其他适当的默认值
|
|
|
|
|
}
|
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
|
Integer regularYear = stuPlan.getRegularYear(); //定期定额投资年限 n
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
BigDecimal teacherFinancialPlanningScore = BigDecimal.ZERO; //老师理财分数 用于保存到综合规划成绩表中
|
|
|
|
|
try {
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
if (stuFinancialPlanningMoney.compareTo(teaFinancialPlanningMoney) >= 0) {
|
|
|
|
|
teacherFinancialPlanningScore = BigDecimal.valueOf(2);
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
} else {
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
caseConsumptionPlanMapper.updateByPrimaryKey(stuPlan);
|
|
|
|
|
//并设置综合规划成绩表 修改老师评分分数
|
|
|
|
|
SynthesisPlanScoreExample scoreExample = new SynthesisPlanScoreExample();
|
|
|
|
@ -1135,23 +1149,32 @@ public class GradeController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//设置理财方案分数 先获取案例题答案的分数 再获取学生理财方案的四个对象 按照公式对比大小 如果大于老师的答案 则给两分 低于给0分
|
|
|
|
|
CaseStartAnUndertakingPlanExample teaExample = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseStartAnUndertakingPlan> teaCasePlanList = caseStartAnUndertakingPlanMapper.selectByExample(teaExample);
|
|
|
|
|
CaseStartAnUndertakingPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(0);
|
|
|
|
|
String financialPlan = stuPlan.getFinancialPlan();
|
|
|
|
|
try {
|
|
|
|
|
if (financialPlan != null) {
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal(financialPlan);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// 可以选择设置一个默认值或者进行其他错误处理
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal("0"); // 或者其他适当的默认值
|
|
|
|
|
}
|
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
|
Integer regularYear = stuPlan.getRegularYear(); //定期定额投资年限 n
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
BigDecimal teacherFinancialPlanningScore = BigDecimal.ZERO; //老师理财分数 用于保存到综合规划成绩表中
|
|
|
|
|
try {
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
if (stuFinancialPlanningMoney.compareTo(teaFinancialPlanningMoney) >= 0) {
|
|
|
|
|
teacherFinancialPlanningScore = BigDecimal.valueOf(2);
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
} else {
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
caseStartAnUndertakingPlanMapper.updateByPrimaryKey(stuPlan);
|
|
|
|
@ -1206,24 +1229,32 @@ public class GradeController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//设置理财方案分数 先获取案例题答案的分数 再获取学生理财方案的四个对象 按照公式对比大小 如果大于老师的答案 则给两分 低于给0分
|
|
|
|
|
CaseRetirementPlanExample teaExample = new CaseRetirementPlanExample();
|
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseRetirementPlan> teaCasePlanList = caseRetirementPlanMapper.selectByExample(teaExample);
|
|
|
|
|
CaseRetirementPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(0);
|
|
|
|
|
String financialPlan = stuPlan.getFinancialPlan();
|
|
|
|
|
try {
|
|
|
|
|
if (financialPlan != null) {
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal(financialPlan);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// 可以选择设置一个默认值或者进行其他错误处理
|
|
|
|
|
teaFinancialPlanningMoney = new BigDecimal("0"); // 或者其他适当的默认值
|
|
|
|
|
}
|
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
|
Integer regularYear = stuPlan.getRegularYear(); //定期定额投资年限 n
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
BigDecimal teacherFinancialPlanningScore = BigDecimal.ZERO; //老师理财分数 用于保存到综合规划成绩表中
|
|
|
|
|
try {
|
|
|
|
|
BigDecimal stuFinancialPlanningMoney = getFinancialPlanningMoney(returnOnInvestment, disposableInput, monthlyInvestment, regularYear);
|
|
|
|
|
if (stuFinancialPlanningMoney.compareTo(teaFinancialPlanningMoney) >= 0) {
|
|
|
|
|
teacherFinancialPlanningScore = BigDecimal.valueOf(2);
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
} else {
|
|
|
|
|
stuPlan.setCaseTeacherScore(teacherFinancialPlanningScore);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
caseRetirementPlanMapper.updateByPrimaryKey(stuPlan);
|
|
|
|
|
//并设置综合规划成绩表 修改老师评分分数
|
|
|
|
|