|
|
|
@ -5,6 +5,7 @@ import com.sztzjy.money_management.entity.*;
|
|
|
|
|
import com.sztzjy.money_management.mapper.*;
|
|
|
|
|
import com.sztzjy.money_management.service.SynthesisPlanService;
|
|
|
|
|
import com.sztzjy.money_management.util.ResultEntity;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -595,6 +596,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseHeritageWithBLOB));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseHeritageWithBLOB));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("财产传承规划分析") && !testCenter.equals("财务分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -602,11 +605,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财产传承");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
if (testCenter.equals("财产传承规划分析") || testCenter.equals("财务分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -614,11 +614,23 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
if (testCenter.equals("财产传承规划分析") || testCenter.equals("财务分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财产传承");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseDistributionOfProperty(String userId, String caseID,
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> rightCaseDistributionOfPropertys,
|
|
|
|
@ -682,6 +694,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseTaxPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseTaxPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore) && !testCenter.equals("税务筹划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -689,12 +702,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("税务筹划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("税务筹划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -702,10 +712,23 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("税务筹划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("税务筹划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -730,6 +753,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseInvestmentPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseInvestmentPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore) && !testCenter.equals("投资规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -737,12 +761,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("投资规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("投资规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -750,11 +770,24 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("投资规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("投资规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void caseInsurancePlans(String userId, String
|
|
|
|
@ -819,6 +852,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseInsurancePlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseInsurancePlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("寿险需求测算方法选择-遗属需求法-保险规划分析")
|
|
|
|
|
&& !testCenter.equals("寿险需求测算方法选择-生命价值法-保险规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -826,13 +862,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-保险规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("寿险需求测算方法选择-遗属需求法-保险规划分析")
|
|
|
|
|
|| testCenter.equals("寿险需求测算方法选择-生命价值法-保险规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -840,10 +872,24 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
if (testCenter.equals("寿险需求测算方法选择-遗属需求法-保险规划分析")
|
|
|
|
|
|| testCenter.equals("寿险需求测算方法选择-生命价值法-保险规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-保险规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseRetirementPlans(String userId, String
|
|
|
|
@ -878,6 +924,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseRetirementPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseRetirementPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("理财方案") && !testCenter.equals("退休规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -885,12 +933,10 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-退休规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("退休规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -898,11 +944,23 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("退休规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-退休规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseStartAnUndertakingPlans(String userId, String
|
|
|
|
|
caseID, List<CaseStartAnUndertakingPlan> rightCaseStartAnUndertakingPlans,
|
|
|
|
@ -925,6 +983,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseStartAnUndertakingPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseStartAnUndertakingPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("理财方案") && !testCenter.equals("创业规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -932,12 +992,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-创业规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("创业规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -945,11 +1002,24 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("创业规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-创业规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseConsumptionPlans(String userId, String
|
|
|
|
|
caseID, List<CaseConsumptionPlan> rightCaseConsumptionPlans,
|
|
|
|
@ -983,6 +1053,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseConsumptionPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseConsumptionPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("理财方案") && !testCenter.equals("消费规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -990,12 +1062,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-消费规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("消费规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -1003,12 +1072,26 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("消费规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-消费规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseLifeEducationPlans(String userId, String
|
|
|
|
|
caseID, List<CaseLifeEducationPlan> rightCaseLifeEducationPlans,
|
|
|
|
|
List<CaseLifeEducationPlan> stuCaseLifeEducationPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
@ -1052,6 +1135,10 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseLifeEducationPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseLifeEducationPlan));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)
|
|
|
|
|
&& !testCenter.equals("理财方案")
|
|
|
|
|
&& !testCenter.equals("教育规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1059,12 +1146,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-教育规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") || testCenter.equals("教育规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -1072,11 +1155,25 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("理财方案") ||
|
|
|
|
|
testCenter.equals("教育规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("生涯规划-教育规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseCashPlans(String userId, String caseID, List<CaseCashPlan> rightCaseCashPlans,
|
|
|
|
|
List<CaseCashPlan> stuCaseCashPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
@ -1095,7 +1192,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
|
|
|
|
|
String caseScore = convertToString(scoreGetter.apply(caseCashPlan));
|
|
|
|
|
String stuScore = convertToString(scoreGetter.apply(stuCaseCashPlan));
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore) && !testCenter.equals("现金规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1103,12 +1200,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("现金规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("现金规划分析")) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
|
synthesisPlanScore.setStatus("答错");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.ZERO);
|
|
|
|
@ -1116,11 +1209,23 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (testCenter.equals("现金规划分析")) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
|
synthesisPlanScore.setUserid(userId);
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("现金规划");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String convertToString(Object obj) {
|
|
|
|
|
if (obj instanceof BigDecimal) {
|
|
|
|
@ -1150,6 +1255,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
String caseScore = scoreGetter.apply(caseFinancialRatiosWithBLOBs);
|
|
|
|
|
String stuScore = scoreGetter.apply(stuCaseFinancialRatiosWithBLOB);
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(caseScore)) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1157,12 +1263,13 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财务分析-财务比例分析");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore);
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cashFlows(String userId, String
|
|
|
|
|
caseID, List<CaseCashFlow> rightCashFlows, List<CaseCashFlow> stuCaseCashFlows,
|
|
|
|
@ -1186,6 +1293,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
BigDecimal caseScore = scoreGetter.apply(caseCashFlow);
|
|
|
|
|
BigDecimal stuScore = scoreGetter.apply(stuCaseCashFlow);
|
|
|
|
|
|
|
|
|
|
if (caseScore != null) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1193,7 +1301,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财务分析-现金流量表");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(String.valueOf(caseScore));
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
@ -1203,11 +1311,11 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseIncomeAndExpenses(String userId, String
|
|
|
|
|
caseID, List<CaseIncomeAndExpenses> rightCaseIncomeAndExpenses,
|
|
|
|
@ -1241,6 +1349,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
BigDecimal caseScore = scoreGetter.apply(caseIncomeAndExpenses);
|
|
|
|
|
BigDecimal stuScore = scoreGetter.apply(stuCaseRiskIncomeAndExpenses);
|
|
|
|
|
|
|
|
|
|
if (caseScore != null) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1248,7 +1357,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财务分析-收支储蓄表");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(String.valueOf(caseScore));
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
@ -1258,11 +1367,11 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void caseFinanceLiabilities(String userId, String
|
|
|
|
@ -1309,6 +1418,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
BigDecimal caseScore = scoreGetter.apply(caseFinanceLiability);
|
|
|
|
|
BigDecimal stuScore = scoreGetter.apply(stuCaseFinanceLiability);
|
|
|
|
|
|
|
|
|
|
if (caseScore != null) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1316,7 +1426,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("财务分析-资产负债表");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(String.valueOf(caseScore));
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
@ -1330,6 +1440,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseRiskIndex(String userId, String
|
|
|
|
|
caseID, List<CaseRiskIndex> caseRiskIndices, List<CaseRiskIndex> stuCaseRiskIndices, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
@ -1358,6 +1469,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
BigDecimal caseScore = scoreGetter.apply(caseRiskIndex);
|
|
|
|
|
BigDecimal stuScore = scoreGetter.apply(stuCaseRiskIndex);
|
|
|
|
|
|
|
|
|
|
if (caseScore != null) {
|
|
|
|
|
SynthesisPlanScoreWithBLOBs synthesisPlanScore = new SynthesisPlanScoreWithBLOBs();
|
|
|
|
|
synthesisPlanScore.setSynthesisPlanId(IdUtil.randomUUID());
|
|
|
|
|
synthesisPlanScore.setCaseid(caseID);
|
|
|
|
@ -1365,7 +1477,7 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setManageMoneyMattersType("风险测评-风险指标");
|
|
|
|
|
synthesisPlanScore.setTestCenter(testCenter);
|
|
|
|
|
// 检查并设置 caseAnswer 和 stuAnswer 字段
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(caseScore != null ? String.valueOf(caseScore) : null);
|
|
|
|
|
synthesisPlanScore.setCaseAnswer(String.valueOf(caseScore));
|
|
|
|
|
synthesisPlanScore.setStuAnswer(stuScore != null ? String.valueOf(stuScore) : null);
|
|
|
|
|
|
|
|
|
|
if (stuScore == null || !stuScore.equals(caseScore)) {
|
|
|
|
@ -1375,9 +1487,9 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
synthesisPlanScore.setStatus("答对");
|
|
|
|
|
synthesisPlanScore.setScore(BigDecimal.valueOf(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.add(synthesisPlanScore);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|