修改失效得分问题

master
xiaoCJ
parent 3f7cdb4c9e
commit 25dc307116

@ -141,7 +141,7 @@ public class ClassScoreServiceImpl implements ClassScoreService {
} else { //选中某个班级返回 } else { //选中某个班级返回
criteria.andClassIdEqualTo(classId).andStartTimeEqualTo(time); criteria.andClassIdEqualTo(classId).andStartTimeEqualTo(time);
List<TeaClassScore> teaClassScores = teaClassScoreMapper.selectByExample(teaClassScoreExample); List<TeaClassScore> teaClassScores = teaClassScoreMapper.selectByExample(teaClassScoreExample);
if (teaClassScores.isEmpty()){ if (teaClassScores.isEmpty()) {
return new TeaClassScoreDto(); return new TeaClassScoreDto();
} }
TeaClassScore teaClassScore = teaClassScores.get(0); TeaClassScore teaClassScore = teaClassScores.get(0);
@ -315,7 +315,9 @@ public class ClassScoreServiceImpl implements ClassScoreService {
projectValuationAbsolute = projectValuationAbsolute.replaceAll("[^a-zA-Z0-9]", ""); projectValuationAbsolute = projectValuationAbsolute.replaceAll("[^a-zA-Z0-9]", "");
PerformanceScoreExample performanceScoreExample2 = new PerformanceScoreExample(); PerformanceScoreExample performanceScoreExample2 = new PerformanceScoreExample();
performanceScoreExample2.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowId); performanceScoreExample2.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowId);
// 寻找项目结论 // 寻找项目结论
if (performanceScore.getProjectSearchReportScore() == null) {
if (foundProjectConclusion.length() >= 30) { if (foundProjectConclusion.length() >= 30) {
// 字符串长度超过30 // 字符串长度超过30
performanceScoreService.updateScore("projectSearchReportScore", 2, flowId); performanceScoreService.updateScore("projectSearchReportScore", 2, flowId);
@ -323,34 +325,48 @@ public class ClassScoreServiceImpl implements ClassScoreService {
//未超过30结论报告是必填项到这里就给1分没有0 //未超过30结论报告是必填项到这里就给1分没有0
performanceScoreService.updateScore("projectSearchReportScore", 1, flowId); performanceScoreService.updateScore("projectSearchReportScore", 1, flowId);
} }
}
// 业务尽调结论 // 业务尽调结论
if (performanceScore.getProjectDueDiligenceBusinessReportScore() == null) {
if (serviceDueDiligence.length() >= 30) { if (serviceDueDiligence.length() >= 30) {
performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 2, flowId); performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 2, flowId);
} else { } else {
performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 1, flowId); performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 1, flowId);
} }
}
//财务尽调结论 //财务尽调结论
if (performanceScore.getProjectDueDiligenceFinanceReportScore() == null) {
if (financialDueDiligence.length() >= 30) { if (financialDueDiligence.length() >= 30) {
performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 2, flowId); performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 2, flowId);
} else { } else {
performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 1, flowId); performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 1, flowId);
} }
}
//项目相对估值结论 //项目相对估值结论
if (performanceScore.getProjectValuationRelativeScore() == null) {
if (projectValuationRelative.length() >= 30) { if (projectValuationRelative.length() >= 30) {
performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowId); performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowId);
} else { } else {
performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowId); performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowId);
} }
}
//项目绝对估值结论 //项目绝对估值结论
if (performanceScore.getProjectValuationAbsoluteScore() == null) {
if (projectValuationAbsolute.length() >= 30) { if (projectValuationAbsolute.length() >= 30) {
performanceScoreService.updateScore("projectValuationAbsoluteScore", 2, flowId); performanceScoreService.updateScore("projectValuationAbsoluteScore", 2, flowId);
} else { } else {
performanceScoreService.updateScore("projectValuationAbsoluteScore", 1, flowId); performanceScoreService.updateScore("projectValuationAbsoluteScore", 1, flowId);
} }
} }
}
for (String flowIdByList : list) { for (String flowIdByList : list) {
TrainingReportExample trainingReportExample = new TrainingReportExample(); TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowIdByList); trainingReportExample.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowIdByList);
PerformanceScore scoreByFlowId = performanceScoreService.getByFlowId(flowIdByList);
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample); List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
if (trainingReports.isEmpty()) { if (trainingReports.isEmpty()) {
continue; continue;
@ -358,34 +374,34 @@ public class ClassScoreServiceImpl implements ClassScoreService {
String experience = ""; String experience = "";
TrainingReport trainingReport = trainingReports.get(0); TrainingReport trainingReport = trainingReports.get(0);
if (trainingReport.getExperience() == null) { if (trainingReport.getExperience() == null) {
performanceScoreService.updateScore("projectValuationRelativeScore", 0, flowIdByList); performanceScoreService.updateScore("experienceScore", 0, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.ZERO); trainingReport.setExperienceScore(BigDecimal.ZERO);
} else { } else {
experience = trainingReport.getExperience(); experience = trainingReport.getExperience();
} }
//实训心得 //实训心得
if (scoreByFlowId.getExperienceScore() == null) {
if (experience.length() < 100) { if (experience.length() < 100) {
performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowIdByList); performanceScoreService.updateScore("experienceScore", 1, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.ONE); trainingReport.setExperienceScore(BigDecimal.ONE);
} } else if (experience.length() < 300) {
if (experience.length() >= 100 && experience.length() < 300) { performanceScoreService.updateScore("experienceScore", 2, flowIdByList);
performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.valueOf(2)); trainingReport.setExperienceScore(BigDecimal.valueOf(2));
} } else {
if (experience.length() >= 300) { performanceScoreService.updateScore("experienceScore", 3, flowIdByList);
performanceScoreService.updateScore("projectValuationRelativeScore", 3, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.valueOf(3)); trainingReport.setExperienceScore(BigDecimal.valueOf(3));
} }
}
//实验报告,未上传 0 分 上传得两分 //实验报告,未上传 0 分 上传得两分
if (scoreByFlowId.getInvestmentReportScore() == null) {
if (trainingReport.getUrl() == null && trainingReport.getReportName() == null) { if (trainingReport.getUrl() == null && trainingReport.getReportName() == null) {
performanceScoreService.updateScore("investmentReportScore", 0, flowIdByList);//todo 需要修改 performanceScoreService.updateScore("investmentReportScore", 0, flowIdByList);//todo 需要修改
trainingReport.setReportScore(BigDecimal.ZERO); trainingReport.setReportScore(BigDecimal.ZERO);
} } else if (!(trainingReport.getUrl().isEmpty()) && !(trainingReport.getReportName().isEmpty())) {
if (!(trainingReport.getUrl().isEmpty()) && !(trainingReport.getReportName().isEmpty())) {
performanceScoreService.updateScore("investmentReportScore", 2, flowIdByList);//todo 需要修改 performanceScoreService.updateScore("investmentReportScore", 2, flowIdByList);//todo 需要修改
trainingReport.setReportScore(BigDecimal.valueOf(2)); trainingReport.setReportScore(BigDecimal.valueOf(2));
} }
}
trainingReportMapper.updateByPrimaryKey(trainingReport); trainingReportMapper.updateByPrimaryKey(trainingReport);
} }
return new ResultEntity<>(HttpStatus.OK); return new ResultEntity<>(HttpStatus.OK);

Loading…
Cancel
Save