|
|
@ -736,7 +736,7 @@ public class GradeController {
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseLifeEducationPlan> teaObj = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
List<CaseLifeEducationPlan> teaObj = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestment()));
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getFinancialPlan()));
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -745,7 +745,7 @@ public class GradeController {
|
|
|
|
example.createCriteria().andCaseIdEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
example.createCriteria().andCaseIdEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseConsumptionPlan> teaObj = caseConsumptionPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
List<CaseConsumptionPlan> teaObj = caseConsumptionPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestment()));
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getFinancialPlan()));
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -754,7 +754,7 @@ public class GradeController {
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseStartAnUndertakingPlan> teaObj = caseStartAnUndertakingPlanMapper.selectByExample(example);
|
|
|
|
List<CaseStartAnUndertakingPlan> teaObj = caseStartAnUndertakingPlanMapper.selectByExample(example);
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestmentRate()));
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getFinancialPlan()));
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -763,7 +763,7 @@ public class GradeController {
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseRetirementPlan> teaObj = caseRetirementPlanMapper.selectByExample(example);
|
|
|
|
List<CaseRetirementPlan> teaObj = caseRetirementPlanMapper.selectByExample(example);
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
if (!teaObj.isEmpty()) {
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestmentRate()));
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getFinancialPlan()));
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -871,13 +871,10 @@ public class GradeController {
|
|
|
|
//根据caseId 查询caseInfo表中的manage_money_matters_type字段 如果等于综合规划 则查询com_case表 获取理财类型TypeList 如果不等于综合规划 则获取caseInfo中的manage_money_matters_type作为理财类型Type
|
|
|
|
//根据caseId 查询caseInfo表中的manage_money_matters_type字段 如果等于综合规划 则查询com_case表 获取理财类型TypeList 如果不等于综合规划 则获取caseInfo中的manage_money_matters_type作为理财类型Type
|
|
|
|
CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseid);
|
|
|
|
CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseid);
|
|
|
|
List<String> typeList = new ArrayList<>();
|
|
|
|
List<String> typeList = new ArrayList<>();
|
|
|
|
if ("综合规划".equals(caseInfo.getManageMoneyMattersType())) {
|
|
|
|
if (caseInfo.getManageMoneyMattersType().contains(",")) {
|
|
|
|
ComCaseExample comCaseExample = new ComCaseExample();
|
|
|
|
String[] split = caseInfo.getManageMoneyMattersType().split(",");
|
|
|
|
comCaseExample.createCriteria().andCaseidEqualTo(caseid);
|
|
|
|
for (String type : split) {
|
|
|
|
List<ComCase> comCaseList = comCaseMapper.selectByExample(comCaseExample);
|
|
|
|
typeList.add(type);
|
|
|
|
for (int j = 0; j < comCaseList.size(); j++) {
|
|
|
|
|
|
|
|
String manageMoneyMattersType = comCaseList.get(j).getManageMoneyMattersType();
|
|
|
|
|
|
|
|
typeList.add(manageMoneyMattersType);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
typeList.add(caseInfo.getManageMoneyMattersType());
|
|
|
|
typeList.add(caseInfo.getManageMoneyMattersType());
|
|
|
@ -916,6 +913,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
} else if ("现金规划".equals(type)) {
|
|
|
|
} else if ("现金规划".equals(type)) {
|
|
|
|
CaseCashPlanExample example = new CaseCashPlanExample();
|
|
|
|
CaseCashPlanExample example = new CaseCashPlanExample();
|
|
|
@ -948,6 +950,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
} else if ("生涯规划-教育规划".equals(type)) {
|
|
|
|
} else if ("生涯规划-教育规划".equals(type)) {
|
|
|
|
CaseLifeEducationPlanExample example = new CaseLifeEducationPlanExample();
|
|
|
|
CaseLifeEducationPlanExample example = new CaseLifeEducationPlanExample();
|
|
|
@ -979,7 +986,7 @@ public class GradeController {
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseLifeEducationPlan> teaCasePlanList = caseLifeEducationPlanMapper.selectByExample(teaExample);
|
|
|
|
List<CaseLifeEducationPlan> teaCasePlanList = caseLifeEducationPlanMapper.selectByExample(teaExample);
|
|
|
|
CaseLifeEducationPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
CaseLifeEducationPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
BigDecimal teaFinancialPlanningMoney = teaPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
@ -1001,6 +1008,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
|
|
|
|
|
|
|
|
//修改理财方案老师评分
|
|
|
|
//修改理财方案老师评分
|
|
|
@ -1009,6 +1021,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
|
|
|
|
if(teacherFinancialPlanningScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else if ("生涯规划-消费规划".equals(type)) {
|
|
|
|
} else if ("生涯规划-消费规划".equals(type)) {
|
|
|
|
CaseConsumptionPlanExample example = new CaseConsumptionPlanExample();
|
|
|
|
CaseConsumptionPlanExample example = new CaseConsumptionPlanExample();
|
|
|
@ -1040,7 +1057,7 @@ public class GradeController {
|
|
|
|
teaExample.createCriteria().andCaseIdEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
teaExample.createCriteria().andCaseIdEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseConsumptionPlan> teaCasePlanList = caseConsumptionPlanMapper.selectByExample(teaExample);
|
|
|
|
List<CaseConsumptionPlan> teaCasePlanList = caseConsumptionPlanMapper.selectByExample(teaExample);
|
|
|
|
CaseConsumptionPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
CaseConsumptionPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
BigDecimal teaFinancialPlanningMoney = teaPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestment();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
@ -1062,6 +1079,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
|
|
|
|
|
|
|
|
//修改理财方案老师评分
|
|
|
|
//修改理财方案老师评分
|
|
|
@ -1070,6 +1092,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
|
|
|
|
if(teacherFinancialPlanningScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else if ("生涯规划-创业规划".equals(type)) {
|
|
|
|
} else if ("生涯规划-创业规划".equals(type)) {
|
|
|
|
CaseStartAnUndertakingPlanExample example = new CaseStartAnUndertakingPlanExample();
|
|
|
|
CaseStartAnUndertakingPlanExample example = new CaseStartAnUndertakingPlanExample();
|
|
|
@ -1101,7 +1128,7 @@ public class GradeController {
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseStartAnUndertakingPlan> teaCasePlanList = caseStartAnUndertakingPlanMapper.selectByExample(teaExample);
|
|
|
|
List<CaseStartAnUndertakingPlan> teaCasePlanList = caseStartAnUndertakingPlanMapper.selectByExample(teaExample);
|
|
|
|
CaseStartAnUndertakingPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
CaseStartAnUndertakingPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
BigDecimal teaFinancialPlanningMoney = teaPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
@ -1123,6 +1150,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
|
|
|
|
|
|
|
|
//修改理财方案老师评分
|
|
|
|
//修改理财方案老师评分
|
|
|
@ -1131,6 +1163,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
|
|
|
|
if(teacherFinancialPlanningScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else if ("生涯规划-退休规划".equals(type)) {
|
|
|
|
} else if ("生涯规划-退休规划".equals(type)) {
|
|
|
|
CaseRetirementPlanExample example = new CaseRetirementPlanExample();
|
|
|
|
CaseRetirementPlanExample example = new CaseRetirementPlanExample();
|
|
|
@ -1162,7 +1199,7 @@ public class GradeController {
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
teaExample.createCriteria().andCaseidEqualTo(caseid).andIsAnswerEqualTo("题目答案");
|
|
|
|
List<CaseRetirementPlan> teaCasePlanList = caseRetirementPlanMapper.selectByExample(teaExample);
|
|
|
|
List<CaseRetirementPlan> teaCasePlanList = caseRetirementPlanMapper.selectByExample(teaExample);
|
|
|
|
CaseRetirementPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
CaseRetirementPlan teaPlan = teaCasePlanList.get(0);
|
|
|
|
BigDecimal teaFinancialPlanningMoney = teaPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal teaFinancialPlanningMoney = new BigDecimal(teaPlan.getFinancialPlan());
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal returnOnInvestment = stuPlan.getReturnOnInvestmentRate();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal disposableInput = stuPlan.getDisposableInput();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
|
BigDecimal monthlyInvestment = stuPlan.getMonthlyInvestment();
|
|
|
@ -1184,6 +1221,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
|
|
|
|
|
|
|
|
//修改理财方案老师评分
|
|
|
|
//修改理财方案老师评分
|
|
|
@ -1192,6 +1234,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
synthesisPlanScore2.setScore(teacherFinancialPlanningScore);
|
|
|
|
|
|
|
|
if(teacherFinancialPlanningScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else if ("生涯规划-保险规划".equals(type)) {
|
|
|
|
} else if ("生涯规划-保险规划".equals(type)) {
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
@ -1228,6 +1275,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
} else if ("投资规划".equals(type)) {
|
|
|
|
} else if ("投资规划".equals(type)) {
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
@ -1261,6 +1313,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
} else if ("税务筹划".equals(type)) {
|
|
|
|
} else if ("税务筹划".equals(type)) {
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
@ -1294,6 +1351,11 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
synthesisPlanScore.setScore(teacherScore);
|
|
|
|
|
|
|
|
if(teacherScore.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
} else if ("财产分配".equals(type)) {
|
|
|
|
} else if ("财产分配".equals(type)) {
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
@ -1342,12 +1404,22 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
|
|
|
|
synthesisPlanScore.setScore(teacherScore1);
|
|
|
|
synthesisPlanScore.setScore(teacherScore1);
|
|
|
|
|
|
|
|
if(teacherScore1.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
|
|
|
|
SynthesisPlanScoreExample scoreExample2 = new SynthesisPlanScoreExample();
|
|
|
|
SynthesisPlanScoreExample scoreExample2 = new SynthesisPlanScoreExample();
|
|
|
|
scoreExample2.createCriteria().andCaseidEqualTo(caseid).andUseridEqualTo(userid).andManageMoneyMattersTypeEqualTo("财产分配").andTestCenterEqualTo("财产分配规划分析");
|
|
|
|
scoreExample2.createCriteria().andCaseidEqualTo(caseid).andUseridEqualTo(userid).andManageMoneyMattersTypeEqualTo("财产分配").andTestCenterEqualTo("财产分配规划分析");
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherScore2);
|
|
|
|
synthesisPlanScore2.setScore(teacherScore2);
|
|
|
|
|
|
|
|
if(teacherScore2.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else if ("财产传承".equals(type)) {
|
|
|
|
} else if ("财产传承".equals(type)) {
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
|
//根据caseid和userId查询case_Financial_Ratios表
|
|
|
@ -1381,11 +1453,18 @@ public class GradeController {
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
List<SynthesisPlanScore> scoreList2 = synthesisPlanScoreMapper.selectByExample(scoreExample2);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
SynthesisPlanScore synthesisPlanScore2 = scoreList2.get(0);
|
|
|
|
synthesisPlanScore2.setScore(teacherScore2);
|
|
|
|
synthesisPlanScore2.setScore(teacherScore2);
|
|
|
|
|
|
|
|
if(teacherScore2.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答对");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
synthesisPlanScore2.setStatus("答错");
|
|
|
|
|
|
|
|
}
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore2);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
client.setSubmitStatus("已审核");
|
|
|
|
|
|
|
|
synthesisPlanClientMapper.updateByPrimaryKeySelective(client);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.OK, "一键评分成功");
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.OK, "一键评分成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1398,10 +1477,14 @@ public class GradeController {
|
|
|
|
// regularYear 定期定额投资年份
|
|
|
|
// regularYear 定期定额投资年份
|
|
|
|
Integer regularMonth = regularYear * 12; //定期定额投资月份 n
|
|
|
|
Integer regularMonth = regularYear * 12; //定期定额投资月份 n
|
|
|
|
//单笔投资的终值 FV=PV*(1+r)^n FV终值 PV一次性投入金额 r预计投资收益率 n定期定额投资月份
|
|
|
|
//单笔投资的终值 FV=PV*(1+r)^n FV终值 PV一次性投入金额 r预计投资收益率 n定期定额投资月份
|
|
|
|
BigDecimal dbFV = disposableInput.multiply((BigDecimal.ONE.add(returnOnInvestment)).pow(regularMonth));
|
|
|
|
BigDecimal dbFV = disposableInput.multiply((BigDecimal.ONE.add(returnOnInvestment)).pow(regularMonth)).setScale(2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
//普通年金的终值 FV=PMT*(((1+r)^n)-1)/r PMT 每月定期投资金额 r预计投资收益率 n定期定额投资月份
|
|
|
|
//普通年金的终值 FV=PMT*(((1+r)^n)-1)/r PMT 每月定期投资金额 r预计投资收益率 n定期定额投资月份
|
|
|
|
BigDecimal ptFV = monthlyInvestment.divide(((((BigDecimal.ONE.add(returnOnInvestment)).pow(regularMonth)).subtract(BigDecimal.ONE)).divide(returnOnInvestment)));
|
|
|
|
BigDecimal ptFV = monthlyInvestment.multiply(((((BigDecimal.ONE.add(returnOnInvestment)).pow(regularMonth)).subtract(BigDecimal.ONE)).divide(returnOnInvestment)));
|
|
|
|
BigDecimal answer = dbFV.add(ptFV);
|
|
|
|
// BigDecimal pow = BigDecimal.ONE.add(returnOnInvestment).pow(regularMonth);
|
|
|
|
|
|
|
|
// BigDecimal subtract = pow.subtract(BigDecimal.ONE);
|
|
|
|
|
|
|
|
// BigDecimal divide = monthlyInvestment.multiply(subtract);
|
|
|
|
|
|
|
|
// divide
|
|
|
|
|
|
|
|
BigDecimal answer = dbFV.add(ptFV).setScale(2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
return answer;
|
|
|
|
return answer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|