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