新增财产分配主观题算分,修改投资规划算分

master
xiaoCJ 4 months ago
parent 83fe991018
commit 75dd3708b5

@ -1684,7 +1684,9 @@ public class CaseServiceImpl implements CaseService {
} }
caseDistributionOfPropertyFamilyRecordsMapper.batchInsert(list); caseDistributionOfPropertyFamilyRecordsMapper.batchInsert(list);
} }
//考核点都为主观题,无需算分 //主观题按字数算分50一个
int score = getCaseDistributionOfPropertyScore(stuData);
setCount(stuTrainingWithBLOBs, score);
} }
if (type.equals("财产传承")) { if (type.equals("财产传承")) {
@ -1717,6 +1719,27 @@ public class CaseServiceImpl implements CaseService {
} }
} }
private int getCaseDistributionOfPropertyScore(CaseDistributionOfPropertyFamilyDto stuData) {
int a = 0; //主观题 50分一个 10个5分
int b = 0;
if (StringUtils.isNotBlank(stuData.getPlanAnalysis())) {
String planAnalysis = stuData.getPlanAnalysis();
// 去除空格、标点符号和数字
String cleanedInput = planAnalysis.replaceAll("[\\s\\p{Punct}\\d]", "");
int length = cleanedInput.length();
// 根据长度计算分数每10个5分
a = Math.min(length / 10, 10) * 5;
}
if (StringUtils.isNotBlank(stuData.getSituationAnalysis())) {
String situationAnalysis = stuData.getSituationAnalysis();
String cleanedInput = situationAnalysis.replaceAll("[\\s\\p{Punct}\\d]", "");
int length = cleanedInput.length();
b = Math.min(length / 10, 10) * 5;
}
return a + b;
}
private void setCount(StuTrainingWithBLOBs stuTrainingWithBLOBs, int wrongCount) { private void setCount(StuTrainingWithBLOBs stuTrainingWithBLOBs, int wrongCount) {
if (stuTrainingWithBLOBs.getExpTrainingCompleteStatus() == null) { if (stuTrainingWithBLOBs.getExpTrainingCompleteStatus() == null) {
stuTrainingWithBLOBs.setExpTrainingCompleteStatus(wrongCount); stuTrainingWithBLOBs.setExpTrainingCompleteStatus(wrongCount);
@ -1737,7 +1760,7 @@ public class CaseServiceImpl implements CaseService {
CaseInvestmentPlan investmentPlan = caseInvestmentPlans.get(0); CaseInvestmentPlan investmentPlan = caseInvestmentPlans.get(0);
//当前客户所处家庭生命周期 //当前客户所处家庭生命周期
if (StringUtils.isNotBlank(investmentPlan.getLifeCycleId())) { if (StringUtils.isNotBlank(investmentPlan.getLifeCycleId())) {
if (StringUtils.isNotBlank(stuInvestmentPlan.getLifeCycleId()) || !stuInvestmentPlan.getLifeCycleId().equals(investmentPlan.getLifeCycleId())) { if (StringUtils.isBlank(stuInvestmentPlan.getLifeCycleId()) || !stuInvestmentPlan.getLifeCycleId().equals(investmentPlan.getLifeCycleId())) {
wrongCount += 1; wrongCount += 1;
} }
} }

Loading…
Cancel
Save