|
|
|
@ -4,7 +4,9 @@ import cn.hutool.core.util.IdUtil;
|
|
|
|
|
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.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
@ -211,164 +213,280 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void getScore(String userId, String caseID) {
|
|
|
|
|
//先取出所有的考核点和学生提交的进行对比
|
|
|
|
|
//风险测评-风险指标
|
|
|
|
|
CaseRiskIndexExample example = new CaseRiskIndexExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUseridIsNull();
|
|
|
|
|
List<CaseRiskIndex> caseRiskIndices = caseRiskIndexMapper.selectByExample(example);
|
|
|
|
|
|
|
|
|
|
CaseRiskIndexExample stuExample = new CaseRiskIndexExample();
|
|
|
|
|
stuExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUseridEqualTo(userId);
|
|
|
|
|
List<CaseRiskIndex> stuCaseRiskIndices = caseRiskIndexMapper.selectByExample(stuExample);
|
|
|
|
|
|
|
|
|
|
//财务分析-资产负债表
|
|
|
|
|
CaseFinanceLiabilityExample caseFinanceLiabilityExample = new CaseFinanceLiabilityExample();
|
|
|
|
|
caseFinanceLiabilityExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseFinanceLiability> rightCaseFinanceLiabilities = caseFinanceLiabilityMapper.selectByExample(caseFinanceLiabilityExample);
|
|
|
|
|
|
|
|
|
|
CaseFinanceLiabilityExample stuCaseFinanceLiabilityExample = new CaseFinanceLiabilityExample();
|
|
|
|
|
stuCaseFinanceLiabilityExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseFinanceLiability> stuCaseFinanceLiabilities = caseFinanceLiabilityMapper.selectByExample(stuCaseFinanceLiabilityExample);
|
|
|
|
|
|
|
|
|
|
//财务分析-收支储蓄表
|
|
|
|
|
CaseIncomeAndExpensesExample caseIncomeAndExpensesExample = new CaseIncomeAndExpensesExample();
|
|
|
|
|
caseIncomeAndExpensesExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseIncomeAndExpenses> rightCaseIncomeAndExpenses = caseIncomeAndExpensesMapper.selectByExample(caseIncomeAndExpensesExample);
|
|
|
|
|
|
|
|
|
|
CaseIncomeAndExpensesExample stuCaseIncomeAndExpensesExample = new CaseIncomeAndExpensesExample();
|
|
|
|
|
stuCaseIncomeAndExpensesExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseIncomeAndExpenses> stuCaseIncomeAndExpenses = caseIncomeAndExpensesMapper.selectByExample(stuCaseIncomeAndExpensesExample);
|
|
|
|
|
|
|
|
|
|
//财务分析-现金流量表
|
|
|
|
|
CaseCashFlowExample caseCashFlowExample = new CaseCashFlowExample();
|
|
|
|
|
caseCashFlowExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseCashFlow> rightCashFlows = caseCashFlowMapper.selectByExample(caseCashFlowExample);
|
|
|
|
|
|
|
|
|
|
CaseCashFlowExample stuCashFlowExample = new CaseCashFlowExample();
|
|
|
|
|
stuCashFlowExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseCashFlow> stuCaseCashFlows = caseCashFlowMapper.selectByExample(stuCashFlowExample);
|
|
|
|
|
|
|
|
|
|
//财务分析-财务比例分析
|
|
|
|
|
CaseFinancialRatiosExample caseFinancialRatiosExample = new CaseFinancialRatiosExample();
|
|
|
|
|
caseFinancialRatiosExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> rightCaseFinancialRatiosWithBLOBs = caseFinancialRatiosMapper.selectByExampleWithBLOBs(caseFinancialRatiosExample);
|
|
|
|
|
|
|
|
|
|
CaseFinancialRatiosExample stuCaseFinancialRatiosExample = new CaseFinancialRatiosExample();
|
|
|
|
|
stuCaseFinancialRatiosExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> stuCaseFinancialRatiosWithBLOBs = caseFinancialRatiosMapper.selectByExampleWithBLOBs(stuCaseFinancialRatiosExample);
|
|
|
|
|
|
|
|
|
|
//现金规划
|
|
|
|
|
CaseCashPlanExample caseCashPlanExample = new CaseCashPlanExample();
|
|
|
|
|
caseCashPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseCashPlan> rightCaseCashPlans = caseCashPlanMapper.selectByExampleWithBLOBs(caseCashPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseCashPlanExample stuCaseCashPlanExample = new CaseCashPlanExample();
|
|
|
|
|
stuCaseCashPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseCashPlan> stuCaseCashPlans = caseCashPlanMapper.selectByExampleWithBLOBs(stuCaseCashPlanExample);
|
|
|
|
|
|
|
|
|
|
//生涯规划-教育规划
|
|
|
|
|
CaseLifeEducationPlanExample caseLifeEducationPlanExample = new CaseLifeEducationPlanExample();
|
|
|
|
|
caseLifeEducationPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseLifeEducationPlan> rightCaseLifeEducationPlans = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(caseLifeEducationPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseLifeEducationPlanExample stuCaseLifeEducationPlanExample = new CaseLifeEducationPlanExample();
|
|
|
|
|
stuCaseLifeEducationPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseLifeEducationPlan> stuCaseLifeEducationPlans = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(stuCaseLifeEducationPlanExample);
|
|
|
|
|
|
|
|
|
|
//生涯规划-消费规划
|
|
|
|
|
CaseConsumptionPlanExample caseConsumptionPlanExample = new CaseConsumptionPlanExample();
|
|
|
|
|
caseConsumptionPlanExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseConsumptionPlan> rightCaseConsumptionPlans = caseConsumptionPlanMapper.selectByExampleWithBLOBs(caseConsumptionPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseConsumptionPlanExample stuCaseConsumptionPlanExample = new CaseConsumptionPlanExample();
|
|
|
|
|
stuCaseConsumptionPlanExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseConsumptionPlan> stuCaseConsumptionPlans = caseConsumptionPlanMapper.selectByExampleWithBLOBs(stuCaseConsumptionPlanExample);
|
|
|
|
|
|
|
|
|
|
//生涯规划-创业规划
|
|
|
|
|
CaseStartAnUndertakingPlanExample caseStartAnUndertakingPlanExample = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
caseStartAnUndertakingPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseStartAnUndertakingPlan> rightCaseStartAnUndertakingPlans = caseStartAnUndertakingPlanMapper.selectByExampleWithBLOBs(caseStartAnUndertakingPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseStartAnUndertakingPlanExample stuCaseStartAnUndertakingPlanExample = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
stuCaseStartAnUndertakingPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseStartAnUndertakingPlan> stuCaseStartAnUndertakingPlans = caseStartAnUndertakingPlanMapper.selectByExampleWithBLOBs(stuCaseStartAnUndertakingPlanExample);
|
|
|
|
|
|
|
|
|
|
//生涯规划-退休规划
|
|
|
|
|
CaseRetirementPlanExample caseRetirementPlanExample = new CaseRetirementPlanExample();
|
|
|
|
|
caseRetirementPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseRetirementPlan> rightCaseRetirementPlans = caseRetirementPlanMapper.selectByExampleWithBLOBs(caseRetirementPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseRetirementPlanExample stuCaseRetirementPlanExample = new CaseRetirementPlanExample();
|
|
|
|
|
stuCaseRetirementPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseRetirementPlan> stuCaseRetirementPlans = caseRetirementPlanMapper.selectByExampleWithBLOBs(stuCaseRetirementPlanExample);
|
|
|
|
|
|
|
|
|
|
//生涯规划-保险规划
|
|
|
|
|
CaseInsurancePlanExample caseInsurancePlanExample = new CaseInsurancePlanExample();
|
|
|
|
|
caseInsurancePlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseInsurancePlan> rightCaseInsurancePlans = caseInsurancePlanMapper.selectByExampleWithBLOBs(caseInsurancePlanExample);
|
|
|
|
|
|
|
|
|
|
CaseInsurancePlanExample stuCaseInsurancePlanExample = new CaseInsurancePlanExample();
|
|
|
|
|
stuCaseInsurancePlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseInsurancePlan> stuCaseInsurancePlans = caseInsurancePlanMapper.selectByExampleWithBLOBs(stuCaseInsurancePlanExample);
|
|
|
|
|
|
|
|
|
|
//投资规划
|
|
|
|
|
// todo 表暂时没有
|
|
|
|
|
|
|
|
|
|
//税务筹划
|
|
|
|
|
CaseTaxPlanExample caseTaxPlanExample = new CaseTaxPlanExample();
|
|
|
|
|
caseTaxPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseTaxPlan> rightCaseTaxPlans = caseTaxPlanMapper.selectByExampleWithBLOBs(caseTaxPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseTaxPlanExample stuCaseTaxPlanExample = new CaseTaxPlanExample();
|
|
|
|
|
stuCaseTaxPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseTaxPlan> stuCaseTaxPlans = caseTaxPlanMapper.selectByExampleWithBLOBs(stuCaseTaxPlanExample);
|
|
|
|
|
|
|
|
|
|
//财产分配
|
|
|
|
|
CaseDistributionOfPropertyExample caseDistributionOfPropertyExample = new CaseDistributionOfPropertyExample();
|
|
|
|
|
caseDistributionOfPropertyExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> rightCaseDistributionOfPropertyWithBLOBs = caseDistributionOfPropertyMapper.selectByExampleWithBLOBs(caseDistributionOfPropertyExample);
|
|
|
|
|
|
|
|
|
|
CaseDistributionOfPropertyExample stuCaseDistributionOfPropertyExample = new CaseDistributionOfPropertyExample();
|
|
|
|
|
stuCaseDistributionOfPropertyExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> stuCaseDistributionOfPropertyWithBLOBs = caseDistributionOfPropertyMapper.selectByExampleWithBLOBs(stuCaseDistributionOfPropertyExample);
|
|
|
|
|
|
|
|
|
|
//财产传承
|
|
|
|
|
CaseHeritageExample caseHeritageExample = new CaseHeritageExample();
|
|
|
|
|
caseHeritageExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseHeritageWithBLOBs> rightCaseHeritageWithBLOBs = caseHeritageMapper.selectByExampleWithBLOBs(caseHeritageExample);
|
|
|
|
|
|
|
|
|
|
CaseHeritageExample stuCaseHeritageExample = new CaseHeritageExample();
|
|
|
|
|
stuCaseHeritageExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseHeritageWithBLOBs> stuCaseHeritageWithBLOBs = caseHeritageMapper.selectByExampleWithBLOBs(stuCaseHeritageExample);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SynthesisPlanScoreWithBLOBs> list = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
caseRiskIndex(userId, caseID, caseRiskIndices, stuCaseRiskIndices, list);
|
|
|
|
|
caseFinanceLiabilities(userId, caseID, rightCaseFinanceLiabilities, stuCaseFinanceLiabilities, list);
|
|
|
|
|
caseIncomeAndExpenses(userId, caseID, rightCaseIncomeAndExpenses, stuCaseIncomeAndExpenses, list);
|
|
|
|
|
cashFlows(userId, caseID, rightCashFlows, stuCaseCashFlows, list);
|
|
|
|
|
caseFinancialRatios(userId, caseID, rightCaseFinancialRatiosWithBLOBs, stuCaseFinancialRatiosWithBLOBs, list);
|
|
|
|
|
caseCashPlans(userId, caseID, rightCaseCashPlans, stuCaseCashPlans, list);
|
|
|
|
|
caseLifeEducationPlans(userId, caseID, rightCaseLifeEducationPlans, stuCaseLifeEducationPlans, list);
|
|
|
|
|
caseConsumptionPlans(userId, caseID, rightCaseConsumptionPlans, stuCaseConsumptionPlans, list);
|
|
|
|
|
caseStartAnUndertakingPlans(userId, caseID, rightCaseStartAnUndertakingPlans, stuCaseStartAnUndertakingPlans, list);
|
|
|
|
|
caseRetirementPlans(userId, caseID, rightCaseRetirementPlans, stuCaseRetirementPlans, list);
|
|
|
|
|
caseInsurancePlans(userId, caseID, rightCaseInsurancePlans, stuCaseInsurancePlans, list);
|
|
|
|
|
//todo 投资规划 表暂无
|
|
|
|
|
caseTaxPlans(userId, caseID, rightCaseTaxPlans, stuCaseTaxPlans, list);
|
|
|
|
|
caseDistributionOfProperty(userId, caseID, rightCaseDistributionOfPropertyWithBLOBs, stuCaseDistributionOfPropertyWithBLOBs, list);
|
|
|
|
|
caseHeritageWithBLOBs(userId, caseID, rightCaseHeritageWithBLOBs, stuCaseHeritageWithBLOBs, list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i = synthesisPlanScoreMapper.batchInsert(list);
|
|
|
|
|
if (i <= 0) {
|
|
|
|
|
throw new RuntimeException("新增失败");
|
|
|
|
|
public ResultEntity<HttpStatus> getScore(String userId, String caseID) {
|
|
|
|
|
CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseID);
|
|
|
|
|
List<String> typeList = new ArrayList<>();
|
|
|
|
|
if ("综合规划".equals(caseInfo.getManageMoneyMattersType())) {
|
|
|
|
|
ComCaseExample comCaseExample = new ComCaseExample();
|
|
|
|
|
comCaseExample.createCriteria().andCaseidEqualTo(caseID);
|
|
|
|
|
List<ComCase> comCaseList = comCaseMapper.selectByExample(comCaseExample);
|
|
|
|
|
for (int j = 0; j < comCaseList.size(); j++) {
|
|
|
|
|
String manageMoneyMattersType = comCaseList.get(j).getManageMoneyMattersType();
|
|
|
|
|
typeList.add(manageMoneyMattersType);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
typeList.add(caseInfo.getManageMoneyMattersType());
|
|
|
|
|
}
|
|
|
|
|
for (String type : typeList) {
|
|
|
|
|
List<SynthesisPlanScoreWithBLOBs> list = new ArrayList<>();
|
|
|
|
|
if (type.equals("风险测评-风险指标")) {
|
|
|
|
|
//风险测评-风险指标
|
|
|
|
|
CaseRiskIndexExample example = new CaseRiskIndexExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUseridIsNull();
|
|
|
|
|
List<CaseRiskIndex> caseRiskIndices = caseRiskIndexMapper.selectByExample(example);
|
|
|
|
|
|
|
|
|
|
CaseRiskIndexExample stuExample = new CaseRiskIndexExample();
|
|
|
|
|
stuExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUseridEqualTo(userId);
|
|
|
|
|
List<CaseRiskIndex> stuCaseRiskIndices = caseRiskIndexMapper.selectByExample(stuExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseRiskIndices == null || stuCaseRiskIndices.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseRiskIndex(userId, caseID, caseRiskIndices, stuCaseRiskIndices, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财务分析-资产负债表")) {
|
|
|
|
|
//财务分析-资产负债表
|
|
|
|
|
CaseFinanceLiabilityExample caseFinanceLiabilityExample = new CaseFinanceLiabilityExample();
|
|
|
|
|
caseFinanceLiabilityExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseFinanceLiability> rightCaseFinanceLiabilities = caseFinanceLiabilityMapper.selectByExample(caseFinanceLiabilityExample);
|
|
|
|
|
|
|
|
|
|
CaseFinanceLiabilityExample stuCaseFinanceLiabilityExample = new CaseFinanceLiabilityExample();
|
|
|
|
|
stuCaseFinanceLiabilityExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseFinanceLiability> stuCaseFinanceLiabilities = caseFinanceLiabilityMapper.selectByExample(stuCaseFinanceLiabilityExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseFinanceLiabilities == null || stuCaseFinanceLiabilities.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseFinanceLiabilities(userId, caseID, rightCaseFinanceLiabilities, stuCaseFinanceLiabilities, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财务分析-收支储蓄表")) {
|
|
|
|
|
//财务分析-收支储蓄表
|
|
|
|
|
CaseIncomeAndExpensesExample caseIncomeAndExpensesExample = new CaseIncomeAndExpensesExample();
|
|
|
|
|
caseIncomeAndExpensesExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseIncomeAndExpenses> rightCaseIncomeAndExpenses = caseIncomeAndExpensesMapper.selectByExample(caseIncomeAndExpensesExample);
|
|
|
|
|
|
|
|
|
|
CaseIncomeAndExpensesExample stuCaseIncomeAndExpensesExample = new CaseIncomeAndExpensesExample();
|
|
|
|
|
stuCaseIncomeAndExpensesExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseIncomeAndExpenses> stuCaseIncomeAndExpenses = caseIncomeAndExpensesMapper.selectByExample(stuCaseIncomeAndExpensesExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseIncomeAndExpenses == null || stuCaseIncomeAndExpenses.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseIncomeAndExpenses(userId, caseID, rightCaseIncomeAndExpenses, stuCaseIncomeAndExpenses, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财务分析-现金流量表")) {
|
|
|
|
|
//财务分析-现金流量表
|
|
|
|
|
CaseCashFlowExample caseCashFlowExample = new CaseCashFlowExample();
|
|
|
|
|
caseCashFlowExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseCashFlow> rightCashFlows = caseCashFlowMapper.selectByExample(caseCashFlowExample);
|
|
|
|
|
|
|
|
|
|
CaseCashFlowExample stuCashFlowExample = new CaseCashFlowExample();
|
|
|
|
|
stuCashFlowExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseCashFlow> stuCaseCashFlows = caseCashFlowMapper.selectByExample(stuCashFlowExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseCashFlows == null || stuCaseCashFlows.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
cashFlows(userId, caseID, rightCashFlows, stuCaseCashFlows, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财务分析-财务比例分析")) {
|
|
|
|
|
//财务分析-财务比例分析
|
|
|
|
|
CaseFinancialRatiosExample caseFinancialRatiosExample = new CaseFinancialRatiosExample();
|
|
|
|
|
caseFinancialRatiosExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> rightCaseFinancialRatiosWithBLOBs = caseFinancialRatiosMapper.selectByExampleWithBLOBs(caseFinancialRatiosExample);
|
|
|
|
|
|
|
|
|
|
CaseFinancialRatiosExample stuCaseFinancialRatiosExample = new CaseFinancialRatiosExample();
|
|
|
|
|
stuCaseFinancialRatiosExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> stuCaseFinancialRatiosWithBLOBs = caseFinancialRatiosMapper.selectByExampleWithBLOBs(stuCaseFinancialRatiosExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseFinancialRatiosWithBLOBs == null || stuCaseFinancialRatiosWithBLOBs.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseFinancialRatios(userId, caseID, rightCaseFinancialRatiosWithBLOBs, stuCaseFinancialRatiosWithBLOBs, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("现金规划")) {
|
|
|
|
|
//现金规划
|
|
|
|
|
CaseCashPlanExample caseCashPlanExample = new CaseCashPlanExample();
|
|
|
|
|
caseCashPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseCashPlan> rightCaseCashPlans = caseCashPlanMapper.selectByExampleWithBLOBs(caseCashPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseCashPlanExample stuCaseCashPlanExample = new CaseCashPlanExample();
|
|
|
|
|
stuCaseCashPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseCashPlan> stuCaseCashPlans = caseCashPlanMapper.selectByExampleWithBLOBs(stuCaseCashPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseCashPlans == null || stuCaseCashPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseCashPlans(userId, caseID, rightCaseCashPlans, stuCaseCashPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("生涯规划-教育规划")) {
|
|
|
|
|
//生涯规划-教育规划
|
|
|
|
|
CaseLifeEducationPlanExample caseLifeEducationPlanExample = new CaseLifeEducationPlanExample();
|
|
|
|
|
caseLifeEducationPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseLifeEducationPlan> rightCaseLifeEducationPlans = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(caseLifeEducationPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseLifeEducationPlanExample stuCaseLifeEducationPlanExample = new CaseLifeEducationPlanExample();
|
|
|
|
|
stuCaseLifeEducationPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseLifeEducationPlan> stuCaseLifeEducationPlans = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(stuCaseLifeEducationPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseLifeEducationPlans == null || stuCaseLifeEducationPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseLifeEducationPlans(userId, caseID, rightCaseLifeEducationPlans, stuCaseLifeEducationPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("生涯规划-消费规划")) {
|
|
|
|
|
//生涯规划-消费规划
|
|
|
|
|
CaseConsumptionPlanExample caseConsumptionPlanExample = new CaseConsumptionPlanExample();
|
|
|
|
|
caseConsumptionPlanExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseConsumptionPlan> rightCaseConsumptionPlans = caseConsumptionPlanMapper.selectByExampleWithBLOBs(caseConsumptionPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseConsumptionPlanExample stuCaseConsumptionPlanExample = new CaseConsumptionPlanExample();
|
|
|
|
|
stuCaseConsumptionPlanExample.createCriteria().andCaseIdEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseConsumptionPlan> stuCaseConsumptionPlans = caseConsumptionPlanMapper.selectByExampleWithBLOBs(stuCaseConsumptionPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseConsumptionPlans == null || stuCaseConsumptionPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseConsumptionPlans(userId, caseID, rightCaseConsumptionPlans, stuCaseConsumptionPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("生涯规划-创业规划")) {
|
|
|
|
|
//生涯规划-创业规划
|
|
|
|
|
CaseStartAnUndertakingPlanExample caseStartAnUndertakingPlanExample = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
caseStartAnUndertakingPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseStartAnUndertakingPlan> rightCaseStartAnUndertakingPlans = caseStartAnUndertakingPlanMapper.selectByExampleWithBLOBs(caseStartAnUndertakingPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseStartAnUndertakingPlanExample stuCaseStartAnUndertakingPlanExample = new CaseStartAnUndertakingPlanExample();
|
|
|
|
|
stuCaseStartAnUndertakingPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseStartAnUndertakingPlan> stuCaseStartAnUndertakingPlans = caseStartAnUndertakingPlanMapper.selectByExampleWithBLOBs(stuCaseStartAnUndertakingPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseStartAnUndertakingPlans == null || stuCaseStartAnUndertakingPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseStartAnUndertakingPlans(userId, caseID, rightCaseStartAnUndertakingPlans, stuCaseStartAnUndertakingPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("生涯规划-退休规划")) {
|
|
|
|
|
//生涯规划-退休规划
|
|
|
|
|
CaseRetirementPlanExample caseRetirementPlanExample = new CaseRetirementPlanExample();
|
|
|
|
|
caseRetirementPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseRetirementPlan> rightCaseRetirementPlans = caseRetirementPlanMapper.selectByExampleWithBLOBs(caseRetirementPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseRetirementPlanExample stuCaseRetirementPlanExample = new CaseRetirementPlanExample();
|
|
|
|
|
stuCaseRetirementPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseRetirementPlan> stuCaseRetirementPlans = caseRetirementPlanMapper.selectByExampleWithBLOBs(stuCaseRetirementPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseRetirementPlans == null || stuCaseRetirementPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseRetirementPlans(userId, caseID, rightCaseRetirementPlans, stuCaseRetirementPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("生涯规划-保险规划")) {
|
|
|
|
|
//生涯规划-保险规划
|
|
|
|
|
CaseInsurancePlanExample caseInsurancePlanExample = new CaseInsurancePlanExample();
|
|
|
|
|
caseInsurancePlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseInsurancePlan> rightCaseInsurancePlans = caseInsurancePlanMapper.selectByExampleWithBLOBs(caseInsurancePlanExample);
|
|
|
|
|
|
|
|
|
|
CaseInsurancePlanExample stuCaseInsurancePlanExample = new CaseInsurancePlanExample();
|
|
|
|
|
stuCaseInsurancePlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseInsurancePlan> stuCaseInsurancePlans = caseInsurancePlanMapper.selectByExampleWithBLOBs(stuCaseInsurancePlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseInsurancePlans == null || stuCaseInsurancePlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseInsurancePlans(userId, caseID, rightCaseInsurancePlans, stuCaseInsurancePlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("投资规划")) {
|
|
|
|
|
// todo 表暂时没有
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("税务筹划")) {
|
|
|
|
|
//税务筹划
|
|
|
|
|
CaseTaxPlanExample caseTaxPlanExample = new CaseTaxPlanExample();
|
|
|
|
|
caseTaxPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseTaxPlan> rightCaseTaxPlans = caseTaxPlanMapper.selectByExampleWithBLOBs(caseTaxPlanExample);
|
|
|
|
|
|
|
|
|
|
CaseTaxPlanExample stuCaseTaxPlanExample = new CaseTaxPlanExample();
|
|
|
|
|
stuCaseTaxPlanExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseTaxPlan> stuCaseTaxPlans = caseTaxPlanMapper.selectByExampleWithBLOBs(stuCaseTaxPlanExample);
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseTaxPlans == null || stuCaseTaxPlans.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseTaxPlans(userId, caseID, rightCaseTaxPlans, stuCaseTaxPlans, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财产分配")) {
|
|
|
|
|
//财产分配
|
|
|
|
|
CaseDistributionOfPropertyExample caseDistributionOfPropertyExample = new CaseDistributionOfPropertyExample();
|
|
|
|
|
caseDistributionOfPropertyExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> rightCaseDistributionOfPropertyWithBLOBs = caseDistributionOfPropertyMapper.selectByExampleWithBLOBs(caseDistributionOfPropertyExample);
|
|
|
|
|
|
|
|
|
|
CaseDistributionOfPropertyExample stuCaseDistributionOfPropertyExample = new CaseDistributionOfPropertyExample();
|
|
|
|
|
stuCaseDistributionOfPropertyExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseDistributionOfPropertyWithBLOBs> stuCaseDistributionOfPropertyWithBLOBs = caseDistributionOfPropertyMapper.selectByExampleWithBLOBs(stuCaseDistributionOfPropertyExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseDistributionOfPropertyWithBLOBs == null || stuCaseDistributionOfPropertyWithBLOBs.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseDistributionOfProperty(userId, caseID, rightCaseDistributionOfPropertyWithBLOBs, stuCaseDistributionOfPropertyWithBLOBs, list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (type.equals("财产分配")) {
|
|
|
|
|
//财产传承
|
|
|
|
|
CaseHeritageExample caseHeritageExample = new CaseHeritageExample();
|
|
|
|
|
caseHeritageExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("题目答案").andUserIdIsNull();
|
|
|
|
|
List<CaseHeritageWithBLOBs> rightCaseHeritageWithBLOBs = caseHeritageMapper.selectByExampleWithBLOBs(caseHeritageExample);
|
|
|
|
|
|
|
|
|
|
CaseHeritageExample stuCaseHeritageExample = new CaseHeritageExample();
|
|
|
|
|
stuCaseHeritageExample.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo("学生答案").andUserIdEqualTo(userId);
|
|
|
|
|
List<CaseHeritageWithBLOBs> stuCaseHeritageWithBLOBs = caseHeritageMapper.selectByExampleWithBLOBs(stuCaseHeritageExample);
|
|
|
|
|
|
|
|
|
|
//为空的话返回报错提示
|
|
|
|
|
if (stuCaseHeritageWithBLOBs == null || stuCaseHeritageWithBLOBs.isEmpty()) {
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, type + "还未填写!");
|
|
|
|
|
}
|
|
|
|
|
//计算对错
|
|
|
|
|
caseHeritageWithBLOBs(userId, caseID, rightCaseHeritageWithBLOBs, stuCaseHeritageWithBLOBs, list);
|
|
|
|
|
}
|
|
|
|
|
int i = synthesisPlanScoreMapper.batchInsert(list);
|
|
|
|
|
if (i <= 0) {
|
|
|
|
|
throw new RuntimeException("新增失败");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<HttpStatus>(HttpStatus.OK,"");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseHeritageWithBLOBs(String userId, String caseID, List<CaseHeritageWithBLOBs> rightCaseHeritageWithBLOBs,
|
|
|
|
|
private void caseHeritageWithBLOBs(String userId, String
|
|
|
|
|
caseID, List<CaseHeritageWithBLOBs> rightCaseHeritageWithBLOBs,
|
|
|
|
|
List<CaseHeritageWithBLOBs> stuCaseHeritageWithBLOBs, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseHeritageWithBLOBs != null && !rightCaseHeritageWithBLOBs.isEmpty())
|
|
|
|
|
&& (stuCaseHeritageWithBLOBs != null && !stuCaseHeritageWithBLOBs.isEmpty())) {
|
|
|
|
@ -528,7 +646,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
|
|
|
|
|
//todo 投资规划 表暂无
|
|
|
|
|
|
|
|
|
|
private void caseInsurancePlans(String userId, String caseID, List<CaseInsurancePlan> rightCaseInsurancePlans,
|
|
|
|
|
private void caseInsurancePlans(String userId, String
|
|
|
|
|
caseID, List<CaseInsurancePlan> rightCaseInsurancePlans,
|
|
|
|
|
List<CaseInsurancePlan> stuCaseInsurancePlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseInsurancePlans != null && !rightCaseInsurancePlans.isEmpty())
|
|
|
|
|
&& (stuCaseInsurancePlans != null && !stuCaseInsurancePlans.isEmpty())) {
|
|
|
|
@ -616,7 +735,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseRetirementPlans(String userId, String caseID, List<CaseRetirementPlan> rightCaseRetirementPlans,
|
|
|
|
|
private void caseRetirementPlans(String userId, String
|
|
|
|
|
caseID, List<CaseRetirementPlan> rightCaseRetirementPlans,
|
|
|
|
|
List<CaseRetirementPlan> stuCaseRetirementPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseRetirementPlans != null && !rightCaseRetirementPlans.isEmpty())
|
|
|
|
|
&& (stuCaseRetirementPlans != null && !stuCaseRetirementPlans.isEmpty())) {
|
|
|
|
@ -673,7 +793,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseStartAnUndertakingPlans(String userId, String caseID, List<CaseStartAnUndertakingPlan> rightCaseStartAnUndertakingPlans,
|
|
|
|
|
private void caseStartAnUndertakingPlans(String userId, String
|
|
|
|
|
caseID, List<CaseStartAnUndertakingPlan> rightCaseStartAnUndertakingPlans,
|
|
|
|
|
List<CaseStartAnUndertakingPlan> stuCaseStartAnUndertakingPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseStartAnUndertakingPlans != null && !rightCaseStartAnUndertakingPlans.isEmpty())
|
|
|
|
|
&& (stuCaseStartAnUndertakingPlans != null && !stuCaseStartAnUndertakingPlans.isEmpty())) {
|
|
|
|
@ -719,7 +840,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseConsumptionPlans(String userId, String caseID, List<CaseConsumptionPlan> rightCaseConsumptionPlans,
|
|
|
|
|
private void caseConsumptionPlans(String userId, String
|
|
|
|
|
caseID, List<CaseConsumptionPlan> rightCaseConsumptionPlans,
|
|
|
|
|
List<CaseConsumptionPlan> stuCaseConsumptionPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseConsumptionPlans != null && !rightCaseConsumptionPlans.isEmpty())
|
|
|
|
|
&& (stuCaseConsumptionPlans != null && !stuCaseConsumptionPlans.isEmpty())) {
|
|
|
|
@ -776,7 +898,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseLifeEducationPlans(String userId, String caseID, List<CaseLifeEducationPlan> rightCaseLifeEducationPlans,
|
|
|
|
|
private void caseLifeEducationPlans(String userId, String
|
|
|
|
|
caseID, List<CaseLifeEducationPlan> rightCaseLifeEducationPlans,
|
|
|
|
|
List<CaseLifeEducationPlan> stuCaseLifeEducationPlans, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseLifeEducationPlans != null && !rightCaseLifeEducationPlans.isEmpty())
|
|
|
|
|
&& (stuCaseLifeEducationPlans != null && !stuCaseLifeEducationPlans.isEmpty())) {
|
|
|
|
@ -897,7 +1020,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void caseFinancialRatios(String userId, String caseID, List<CaseFinancialRatiosWithBLOBs> rightCaseFinancialRatiosWithBLOBs,
|
|
|
|
|
private void caseFinancialRatios(String userId, String
|
|
|
|
|
caseID, List<CaseFinancialRatiosWithBLOBs> rightCaseFinancialRatiosWithBLOBs,
|
|
|
|
|
List<CaseFinancialRatiosWithBLOBs> stuCaseFinancialRatiosWithBLOBs, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseFinancialRatiosWithBLOBs != null && !rightCaseFinancialRatiosWithBLOBs.isEmpty())
|
|
|
|
|
&& (stuCaseFinancialRatiosWithBLOBs != null && !stuCaseFinancialRatiosWithBLOBs.isEmpty())) {
|
|
|
|
@ -929,7 +1053,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cashFlows(String userId, String caseID, List<CaseCashFlow> rightCashFlows, List<CaseCashFlow> stuCaseCashFlows,
|
|
|
|
|
private void cashFlows(String userId, String
|
|
|
|
|
caseID, List<CaseCashFlow> rightCashFlows, List<CaseCashFlow> stuCaseCashFlows,
|
|
|
|
|
List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCashFlows != null && !rightCashFlows.isEmpty())
|
|
|
|
|
&& (stuCaseCashFlows != null && !stuCaseCashFlows.isEmpty())) {
|
|
|
|
@ -973,7 +1098,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseIncomeAndExpenses(String userId, String caseID, List<CaseIncomeAndExpenses> rightCaseIncomeAndExpenses,
|
|
|
|
|
private void caseIncomeAndExpenses(String userId, String
|
|
|
|
|
caseID, List<CaseIncomeAndExpenses> rightCaseIncomeAndExpenses,
|
|
|
|
|
List<CaseIncomeAndExpenses> stuCaseIncomeAndExpenses, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((rightCaseIncomeAndExpenses != null && !rightCaseIncomeAndExpenses.isEmpty())
|
|
|
|
|
&& (stuCaseIncomeAndExpenses != null && !stuCaseIncomeAndExpenses.isEmpty())) {
|
|
|
|
@ -1028,7 +1154,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void caseFinanceLiabilities(String userId, String caseID, List<CaseFinanceLiability> rightCaseFinanceLiabilities,
|
|
|
|
|
private void caseFinanceLiabilities(String userId, String
|
|
|
|
|
caseID, List<CaseFinanceLiability> rightCaseFinanceLiabilities,
|
|
|
|
|
List<CaseFinanceLiability> stuCaseFinanceLiabilities, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
|
|
|
|
|
if ((rightCaseFinanceLiabilities != null && !rightCaseFinanceLiabilities.isEmpty())
|
|
|
|
@ -1095,7 +1222,8 @@ public class SynthesisPlanServiceImpl implements SynthesisPlanService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void caseRiskIndex(String userId, String caseID, List<CaseRiskIndex> caseRiskIndices, List<CaseRiskIndex> stuCaseRiskIndices, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
private void caseRiskIndex(String userId, String
|
|
|
|
|
caseID, List<CaseRiskIndex> caseRiskIndices, List<CaseRiskIndex> stuCaseRiskIndices, List<SynthesisPlanScoreWithBLOBs> list) {
|
|
|
|
|
if ((stuCaseRiskIndices != null && !stuCaseRiskIndices.isEmpty()) && (caseRiskIndices != null && !caseRiskIndices.isEmpty())) {
|
|
|
|
|
CaseRiskIndex stuCaseRiskIndex = stuCaseRiskIndices.get(0);
|
|
|
|
|
CaseRiskIndex caseRiskIndex = caseRiskIndices.get(0);
|
|
|
|
|