|
|
|
@ -8,6 +8,7 @@ import com.nimbusds.jose.shaded.gson.Gson;
|
|
|
|
|
import com.sztzjy.money_management.annotation.AnonymousAccess;
|
|
|
|
|
import com.sztzjy.money_management.entity.*;
|
|
|
|
|
import com.sztzjy.money_management.entity.dto.*;
|
|
|
|
|
import com.sztzjy.money_management.entity.vo.ObjCaseScoreVo;
|
|
|
|
|
import com.sztzjy.money_management.mapper.*;
|
|
|
|
|
import com.sztzjy.money_management.service.CaseService;
|
|
|
|
|
import com.sztzjy.money_management.service.ScoreRankService;
|
|
|
|
@ -17,8 +18,11 @@ import com.sztzjy.money_management.util.excel.FilePortUtil;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
import org.python.core.AstList;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.core.io.FileSystemResource;
|
|
|
|
@ -90,6 +94,8 @@ public class GradeController {
|
|
|
|
|
CaseHeritageMapper caseHeritageMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
CaseInvestmentPlanMapper caseInvestmentPlanMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
UserInfoMapper userInfoMapper;
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("实训演练-学习成绩得分情况展示")
|
|
|
|
@ -151,6 +157,18 @@ public class GradeController {
|
|
|
|
|
stuTrainingDto.setResourceLearningScore(studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(stuTraining.getResourceLearningCompleteStatus()==null?0:stuTraining.getResourceLearningCompleteStatus())));
|
|
|
|
|
stuTrainingDto.setLearningEvalScore(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(stuTraining.getLearningEvalCompleteStatus()==null?0:stuTraining.getLearningEvalCompleteStatus())));
|
|
|
|
|
stuTrainingDto.setCaseStuScore(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()==null?0:stuTraining.getExpTrainingCompleteStatus())));
|
|
|
|
|
if(stuTrainingDto.getKnowledgeSummaryScore().compareTo(BigDecimal.valueOf(100))>0){
|
|
|
|
|
stuTrainingDto.setKnowledgeSummaryScore(BigDecimal.valueOf(100));
|
|
|
|
|
}
|
|
|
|
|
if(stuTrainingDto.getResourceLearningScore().compareTo(BigDecimal.valueOf(100))>0){
|
|
|
|
|
stuTrainingDto.setResourceLearningScore(BigDecimal.valueOf(100));
|
|
|
|
|
}
|
|
|
|
|
if(stuTrainingDto.getLearningEvalScore().compareTo(BigDecimal.valueOf(100))>0){
|
|
|
|
|
stuTrainingDto.setLearningEvalScore(BigDecimal.valueOf(100));
|
|
|
|
|
}
|
|
|
|
|
if(stuTrainingDto.getCaseStuScore().compareTo(BigDecimal.valueOf(100))>0){
|
|
|
|
|
stuTrainingDto.setCaseStuScore(BigDecimal.valueOf(100));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//设置实验报告情况及得分
|
|
|
|
|
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
|
|
|
|
@ -536,7 +554,19 @@ public class GradeController {
|
|
|
|
|
TrainingReportExample trainingReportExample = new TrainingReportExample();
|
|
|
|
|
trainingReportExample.createCriteria().andSchoolIdEqualTo(schoolId);
|
|
|
|
|
List<TrainingReport> trainingReports = trainingReportMapper.selectByExampleWithBLOBs(trainingReportExample);
|
|
|
|
|
PageInfo pageInfo = new PageInfo(trainingReports);
|
|
|
|
|
List<TrainingReportDto> list = new AstList();
|
|
|
|
|
if (!trainingReports.isEmpty()) {
|
|
|
|
|
for (TrainingReport trainingReport : trainingReports) {
|
|
|
|
|
TrainingReportDto trainingReportDto = new TrainingReportDto();
|
|
|
|
|
BeanUtils.copyProperties(trainingReport, trainingReportDto);
|
|
|
|
|
UserInfo user = userInfoMapper.selectByPrimaryKey(trainingReport.getUserId());
|
|
|
|
|
trainingReportDto.setName(user.getName());
|
|
|
|
|
trainingReportDto.setStudentId(user.getStudentId());
|
|
|
|
|
trainingReportDto.setClassName(user.getClassName());
|
|
|
|
|
list.add(trainingReportDto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
PageInfo pageInfo = new PageInfo(list);
|
|
|
|
|
return new ResultEntity<PageInfo<TrainingReport>>(pageInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -654,14 +684,152 @@ public class GradeController {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "案例列表展示成功",synthesisPlanClientList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//教师端 综合规划成绩详情查询
|
|
|
|
|
@PostMapping("/getExamPoint")
|
|
|
|
|
@ApiOperation("教师端 综合规划成绩详情查询")
|
|
|
|
|
//***** map有误 必须根据caseId获取案例题所有type
|
|
|
|
|
@GetMapping("/getObjCaseScore")
|
|
|
|
|
@ApiOperation("教师端-成绩中心-综合规划-查看详情、评分 客观题标准分、学生得分情况")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
private ResultEntity<Object> getExamPoint(@RequestParam String caseID) {
|
|
|
|
|
return caseService.getExamPoint(caseID,null, "题目答案", "报告");
|
|
|
|
|
public ResultEntity<Map<String,ObjCaseScoreVo>> getObjCaseScore(String userId,String caseId){
|
|
|
|
|
SynthesisPlanScoreExample synthesisPlanScoreExample = new SynthesisPlanScoreExample();
|
|
|
|
|
synthesisPlanScoreExample.createCriteria().andCaseidEqualTo(caseId).andUseridEqualTo(userId);
|
|
|
|
|
List<SynthesisPlanScore> synthesisPlanScores = synthesisPlanScoreMapper.selectByExample(synthesisPlanScoreExample);
|
|
|
|
|
if(!synthesisPlanScores.isEmpty()){
|
|
|
|
|
Map<String, ObjCaseScoreVo> map=new HashMap<>();
|
|
|
|
|
for (int i = 0; i < synthesisPlanScores.size(); i++) {
|
|
|
|
|
SynthesisPlanScore synthesisPlanScore = synthesisPlanScores.get(i);
|
|
|
|
|
if(map.containsKey(synthesisPlanScore.getManageMoneyMattersType())){
|
|
|
|
|
ObjCaseScoreVo objCaseScoreVo = map.get(synthesisPlanScore.getManageMoneyMattersType());
|
|
|
|
|
objCaseScoreVo.setStandardScore(objCaseScoreVo.getStandardScore().add(BigDecimal.valueOf(2)));
|
|
|
|
|
if("答对".equals(synthesisPlanScore.getStatus())){
|
|
|
|
|
objCaseScoreVo.setStuScore(objCaseScoreVo.getStuScore().add(BigDecimal.valueOf(2)));
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
ObjCaseScoreVo objCaseScoreVo = new ObjCaseScoreVo();
|
|
|
|
|
objCaseScoreVo.setStandardScore(BigDecimal.valueOf(2));
|
|
|
|
|
if("答对".equals(synthesisPlanScore.getStatus())){
|
|
|
|
|
objCaseScoreVo.setStuScore(BigDecimal.valueOf(2));
|
|
|
|
|
}else {
|
|
|
|
|
objCaseScoreVo.setStuScore(BigDecimal.ZERO);
|
|
|
|
|
}
|
|
|
|
|
map.put(synthesisPlanScore.getManageMoneyMattersType(),objCaseScoreVo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Set<String> keySet = map.keySet();
|
|
|
|
|
for(Object key : keySet ){
|
|
|
|
|
ObjCaseScoreVo objCaseScoreVo = map.get(key);
|
|
|
|
|
if("财务分析-财务比例分析".equals(key)){
|
|
|
|
|
CaseFinancialRatiosExample example = new CaseFinancialRatiosExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> caseFinancialRatios = caseFinancialRatiosMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!caseFinancialRatios.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(caseFinancialRatios.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("现金规划".equals(key)){
|
|
|
|
|
CaseCashPlanExample example = new CaseCashPlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseCashPlan> teaObj = caseCashPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("生涯规划-教育规划".equals(key)){
|
|
|
|
|
CaseLifeEducationPlanExample example = new CaseLifeEducationPlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseLifeEducationPlan> teaObj = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestment()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("生涯规划-消费规划".equals(key)){
|
|
|
|
|
CaseConsumptionPlanExample example = new CaseConsumptionPlanExample();
|
|
|
|
|
example.createCriteria().andCaseIdEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseConsumptionPlan> teaObj = caseConsumptionPlanMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestment()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("生涯规划-创业规划".equals(key)){
|
|
|
|
|
CaseStartAnUndertakingPlanExample example = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseStartAnUndertakingPlan> teaObj = caseStartAnUndertakingPlanMapper.selectByExample(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestmentRate()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("生涯规划-退休规划".equals(key)){
|
|
|
|
|
CaseRetirementPlanExample example = new CaseRetirementPlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseRetirementPlan> teaObj = caseRetirementPlanMapper.selectByExample(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getReturnOnInvestmentRate()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("生涯规划-保险规划".equals(key)){
|
|
|
|
|
CaseInsurancePlanExample example = new CaseInsurancePlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseInsurancePlan> teaObj = caseInsurancePlanMapper.selectByExample(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("投资规划".equals(key)){
|
|
|
|
|
CaseInvestmentPlanExample example = new CaseInvestmentPlanExample();
|
|
|
|
|
example.createCriteria().andCaseIdEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseInvestmentPlan> teaObj = caseInvestmentPlanMapper.selectByExample(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("税务筹划".equals(key)){
|
|
|
|
|
CaseTaxPlanExample example = new CaseTaxPlanExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseTaxPlan> teaObj = caseTaxPlanMapper.selectByExample(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(teaObj.get(0).getAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("财产分配".equals(key)){
|
|
|
|
|
CaseDistributionOfPropertyExample example = new CaseDistributionOfPropertyExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> teaObj = caseDistributionOfPropertyMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getSituationAnalysis()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getPlanAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("财产传承".equals(key)){
|
|
|
|
|
CaseHeritageExample example = new CaseHeritageExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andIsAnswerEqualTo("题目答案");
|
|
|
|
|
List<CaseHeritageWithBLOBs> teaObj = caseHeritageMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
if (!teaObj.isEmpty()){
|
|
|
|
|
objCaseScoreVo.setAnswerOne(String.valueOf(teaObj.get(0).getFinanceAnalysis()));
|
|
|
|
|
objCaseScoreVo.setAnswerTwo(teaObj.get(0).getPlanAnalysis());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "学生得分情况返回成功",map);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "未查询到数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//教师端 综合规划成绩详情查询
|
|
|
|
|
// @PostMapping("/getExamPoint")
|
|
|
|
|
// @ApiOperation("教师端 综合规划成绩详情查询")
|
|
|
|
|
// @AnonymousAccess
|
|
|
|
|
// private ResultEntity<List<SynthesisPlanScoreWithBLOBs>> getExamPoint(@RequestParam String caseID,@RequestParam String userId) {
|
|
|
|
|
// SynthesisPlanScoreExample synthesisPlanScoreExample = new SynthesisPlanScoreExample();
|
|
|
|
|
// synthesisPlanScoreExample.createCriteria().andUseridEqualTo(userId).andCaseidEqualTo(caseID);
|
|
|
|
|
// List<SynthesisPlanScoreWithBLOBs> synthesisPlanScores = synthesisPlanScoreMapper.selectByExampleWithBLOBs(synthesisPlanScoreExample);
|
|
|
|
|
// return new ResultEntity<>(HttpStatus.OK, "综合规划成绩详情查询成功",synthesisPlanScores);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//教师端 综合规划老师评分
|
|
|
|
|
@PostMapping("/updateSynthesisPlanMark")
|
|
|
|
|
@ApiOperation("教师端 综合规划老师评分")
|
|
|
|
|