修改失效得分问题

master
xiaoCJ 1 year ago
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,42 +315,58 @@ 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 (foundProjectConclusion.length() >= 30) { if (performanceScore.getProjectSearchReportScore() == null) {
// 字符串长度超过30 if (foundProjectConclusion.length() >= 30) {
performanceScoreService.updateScore("projectSearchReportScore", 2, flowId); // 字符串长度超过30
} else { performanceScoreService.updateScore("projectSearchReportScore", 2, flowId);
//未超过30结论报告是必填项到这里就给1分没有0 } else {
performanceScoreService.updateScore("projectSearchReportScore", 1, flowId); //未超过30结论报告是必填项到这里就给1分没有0
performanceScoreService.updateScore("projectSearchReportScore", 1, flowId);
}
} }
// 业务尽调结论 // 业务尽调结论
if (serviceDueDiligence.length() >= 30) { if (performanceScore.getProjectDueDiligenceBusinessReportScore() == null) {
performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 2, flowId);
} else { if (serviceDueDiligence.length() >= 30) {
performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 1, flowId); performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 2, flowId);
} else {
performanceScoreService.updateScore("projectDueDiligenceBusinessReportScore", 1, flowId);
}
} }
//财务尽调结论 //财务尽调结论
if (financialDueDiligence.length() >= 30) { if (performanceScore.getProjectDueDiligenceFinanceReportScore() == null) {
performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 2, flowId);
} else { if (financialDueDiligence.length() >= 30) {
performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 1, flowId); performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 2, flowId);
} else {
performanceScoreService.updateScore("projectDueDiligenceFinanceReportScore", 1, flowId);
}
} }
//项目相对估值结论 //项目相对估值结论
if (projectValuationRelative.length() >= 30) { if (performanceScore.getProjectValuationRelativeScore() == null) {
performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowId);
} else { if (projectValuationRelative.length() >= 30) {
performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowId); performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowId);
} else {
performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowId);
}
} }
//项目绝对估值结论 //项目绝对估值结论
if (projectValuationAbsolute.length() >= 30) { if (performanceScore.getProjectValuationAbsoluteScore() == null) {
performanceScoreService.updateScore("projectValuationAbsoluteScore", 2, flowId);
} else { if (projectValuationAbsolute.length() >= 30) {
performanceScoreService.updateScore("projectValuationAbsoluteScore", 1, flowId); performanceScoreService.updateScore("projectValuationAbsoluteScore", 2, flowId);
} else {
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,33 +374,33 @@ 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 (experience.length() < 100) { if (scoreByFlowId.getExperienceScore() == null) {
performanceScoreService.updateScore("projectValuationRelativeScore", 1, flowIdByList); if (experience.length() < 100) {
trainingReport.setExperienceScore(BigDecimal.ONE); performanceScoreService.updateScore("experienceScore", 1, flowIdByList);
} trainingReport.setExperienceScore(BigDecimal.ONE);
if (experience.length() >= 100 && experience.length() < 300) { } else if (experience.length() < 300) {
performanceScoreService.updateScore("projectValuationRelativeScore", 2, flowIdByList); performanceScoreService.updateScore("experienceScore", 2, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.valueOf(2)); trainingReport.setExperienceScore(BigDecimal.valueOf(2));
} else {
performanceScoreService.updateScore("experienceScore", 3, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.valueOf(3));
}
} }
if (experience.length() >= 300) {
performanceScoreService.updateScore("projectValuationRelativeScore", 3, flowIdByList);
trainingReport.setExperienceScore(BigDecimal.valueOf(3));
}
//实验报告,未上传 0 分 上传得两分 //实验报告,未上传 0 分 上传得两分
if (trainingReport.getUrl() == null && trainingReport.getReportName() == null) { if (scoreByFlowId.getInvestmentReportScore() == null) {
performanceScoreService.updateScore("investmentReportScore", 0, flowIdByList);//todo 需要修改 if (trainingReport.getUrl() == null && trainingReport.getReportName() == null) {
trainingReport.setReportScore(BigDecimal.ZERO); performanceScoreService.updateScore("investmentReportScore", 0, flowIdByList);//todo 需要修改
} trainingReport.setReportScore(BigDecimal.ZERO);
if (!(trainingReport.getUrl().isEmpty()) && !(trainingReport.getReportName().isEmpty())) { } else 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);
} }
@ -553,7 +569,7 @@ public class ClassScoreServiceImpl implements ClassScoreService {
); );
performanceTrainingScoreDto.setProfitDistributionScore(Optional.ofNullable(performanceScore.getProfitDistributionScore()).orElse(BigDecimal.ZERO) performanceTrainingScoreDto.setProfitDistributionScore(Optional.ofNullable(performanceScore.getProfitDistributionScore()).orElse(BigDecimal.ZERO)
.add(Optional.ofNullable(performanceScore.getProfitDistributionAvailablefundsScore()).orElse(BigDecimal.ZERO))); .add(Optional.ofNullable(performanceScore.getProfitDistributionAvailablefundsScore()).orElse(BigDecimal.ZERO)));
performanceTrainingScoreDto.setInvestmentReportScore(Optional.ofNullable(performanceScore.getInvestmentReportScore()).orElse(BigDecimal.ZERO).add(Optional.ofNullable(performanceScore.getExperienceScore()).orElse(BigDecimal.ZERO))); performanceTrainingScoreDto.setInvestmentReportScore(Optional.ofNullable(performanceScore.getInvestmentReportScore()).orElse(BigDecimal.ZERO).add(Optional.ofNullable(performanceScore.getExperienceScore()).orElse(BigDecimal.ZERO)));
performanceTrainingScoreDto.setTotalScore(Optional.ofNullable(performanceScore.getTotalScore()).orElse(BigDecimal.ZERO)); performanceTrainingScoreDto.setTotalScore(Optional.ofNullable(performanceScore.getTotalScore()).orElse(BigDecimal.ZERO));

Loading…
Cancel
Save