投资规划评分相关

master
yz 7 months ago
parent 7e8f46a6ec
commit 5607701f19

@ -88,6 +88,8 @@ public class GradeController {
CaseDistributionOfPropertyMapper caseDistributionOfPropertyMapper;
@Autowired
CaseHeritageMapper caseHeritageMapper;
@Autowired
CaseInvestmentPlanMapper caseInvestmentPlanMapper;
@AnonymousAccess
@ApiOperation("实训演练-学习成绩得分情况展示")
@ -1052,7 +1054,38 @@ public class GradeController {
synthesisPlanScore.setScore(teacherScore);
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
}else if("投资规划".equals(type)){
//根据caseid和userId查询case_Financial_Ratios表
CaseInvestmentPlanExample example = new CaseInvestmentPlanExample();
example.createCriteria().andCaseIdEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseInvestmentPlan> list = caseInvestmentPlanMapper.selectByExample(example);
//如果不存在 则跳过
if(list.isEmpty()){
continue;
}
CaseInvestmentPlan stuPlan = list.get(0);
String analysis = stuPlan.getAnalysis();
BigDecimal teacherScore=BigDecimal.ZERO;
if(StringUtils.isBlank(analysis)){
stuPlan.setAnalysisTeacherScore(teacherScore);
}else {
if(analysis.length()<20){
stuPlan.setAnalysisTeacherScore(teacherScore);
}else if(analysis.length()>=50){
teacherScore=BigDecimal.valueOf(2);
stuPlan.setAnalysisTeacherScore(teacherScore);
}else {
teacherScore=BigDecimal.valueOf(1);
stuPlan.setAnalysisTeacherScore(teacherScore);
}
}
caseInvestmentPlanMapper.updateByPrimaryKey(stuPlan);
//并设置综合规划成绩表 修改分数
SynthesisPlanScoreExample scoreExample = new SynthesisPlanScoreExample();
scoreExample.createCriteria().andCaseidEqualTo(caseid).andUseridEqualTo(userid).andManageMoneyMattersTypeEqualTo("投资规划").andTestCenterEqualTo("投资规划分析");
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
synthesisPlanScore.setScore(teacherScore);
synthesisPlanScoreMapper.updateByPrimaryKey(synthesisPlanScore);
}else if("税务筹划".equals(type)){
//根据caseid和userId查询case_Financial_Ratios表
CaseTaxPlanExample example = new CaseTaxPlanExample();

Loading…
Cancel
Save