|
|
|
@ -529,54 +529,10 @@ public class CaseServiceImpl implements CaseService {
|
|
|
|
|
example.createCriteria().andIdCardEqualTo(newCase.getIdCard());
|
|
|
|
|
List<CaseInfo> list = caseInfoMapper.selectByExampleWithBLOBs(example);
|
|
|
|
|
|
|
|
|
|
// //判断身份证号是否存在,不存在才新增 客户信息 和综合规划客户表
|
|
|
|
|
// if (list == null || list.isEmpty()) {
|
|
|
|
|
// //前端没传主键ID为新增
|
|
|
|
|
// newCase.setCaseid(IdUtil.randomUUID());
|
|
|
|
|
// newCase.setAddTime(new Date());
|
|
|
|
|
// caseInfoMapper.insert(newCase);
|
|
|
|
|
// //综合规划需要额外新增一张表
|
|
|
|
|
// if (newCase.getModel().equals("综合规划")) {
|
|
|
|
|
// ComCase comCase = new ComCase();
|
|
|
|
|
// comCase.setCaseid(newCase.getCaseid());
|
|
|
|
|
// comCase.setComCaseId(IdUtil.randomUUID());
|
|
|
|
|
// comCase.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
// comCaseMapper.insert(comCase);
|
|
|
|
|
// }
|
|
|
|
|
// insertSynthesisPlanClient(newCase);
|
|
|
|
|
// return newCase.getCaseid();
|
|
|
|
|
// } else {
|
|
|
|
|
// //修改案例信息表
|
|
|
|
|
//
|
|
|
|
|
// //传了相同的身份证,系统判定是编辑,但是没传CaseId,直接return
|
|
|
|
|
// if (StringUtils.isBlank(newCase.getCaseid())) {
|
|
|
|
|
// return "false";
|
|
|
|
|
// }
|
|
|
|
|
// caseInfoMapper.updateByPrimaryKeySelective(newCase);
|
|
|
|
|
//
|
|
|
|
|
// //修改实训类型
|
|
|
|
|
// if (newCase.getModel().equals("综合规划")) {
|
|
|
|
|
// ComCaseExample example1 = new ComCaseExample();
|
|
|
|
|
// example1.createCriteria().andCaseidEqualTo(newCase.getCaseid());
|
|
|
|
|
// List<ComCase> comCases = comCaseMapper.selectByExample(example1);
|
|
|
|
|
// ComCase comCase = comCases.get(0);
|
|
|
|
|
// comCase.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
// comCaseMapper.updateByPrimaryKeySelective(comCase);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //同时修改综合综合规划客户表
|
|
|
|
|
// SynthesisPlanClient synthesisPlanClient = new SynthesisPlanClient();
|
|
|
|
|
// synthesisPlanClient.setName(newCase.getCustomerName());
|
|
|
|
|
// synthesisPlanClient.setIdcard(newCase.getIdCard());
|
|
|
|
|
// synthesisPlanClient.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
// synthesisPlanClient.setAge(newCase.getAge());
|
|
|
|
|
// synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient);
|
|
|
|
|
// return newCase.getCaseid();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return null;
|
|
|
|
|
// }
|
|
|
|
|
String manageMoneyMattersType = newCase.getManageMoneyMattersType();
|
|
|
|
|
|
|
|
|
|
//单独处理财务分析相关表的类型
|
|
|
|
|
String type = getString(newCase, manageMoneyMattersType);
|
|
|
|
|
|
|
|
|
|
//新增
|
|
|
|
|
if (StringUtils.isBlank(newCase.getCaseid())) {
|
|
|
|
@ -592,7 +548,7 @@ public class CaseServiceImpl implements CaseService {
|
|
|
|
|
ComCase comCase = new ComCase();
|
|
|
|
|
comCase.setCaseid(newCase.getCaseid());
|
|
|
|
|
comCase.setComCaseId(IdUtil.randomUUID());
|
|
|
|
|
comCase.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
comCase.setManageMoneyMattersType(type);
|
|
|
|
|
comCaseMapper.insert(comCase);
|
|
|
|
|
}
|
|
|
|
|
insertSynthesisPlanClient(newCase);
|
|
|
|
@ -619,7 +575,7 @@ public class CaseServiceImpl implements CaseService {
|
|
|
|
|
example1.createCriteria().andCaseidEqualTo(newCase.getCaseid());
|
|
|
|
|
List<ComCase> comCases = comCaseMapper.selectByExample(example1);
|
|
|
|
|
ComCase comCase = comCases.get(0);
|
|
|
|
|
comCase.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
comCase.setManageMoneyMattersType(manageMoneyMattersType);
|
|
|
|
|
comCaseMapper.updateByPrimaryKeySelective(comCase);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -627,7 +583,7 @@ public class CaseServiceImpl implements CaseService {
|
|
|
|
|
SynthesisPlanClient synthesisPlanClient = new SynthesisPlanClient();
|
|
|
|
|
synthesisPlanClient.setName(newCase.getCustomerName());
|
|
|
|
|
synthesisPlanClient.setIdcard(newCase.getIdCard());
|
|
|
|
|
synthesisPlanClient.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
|
|
|
|
|
synthesisPlanClient.setManageMoneyMattersType(type);
|
|
|
|
|
synthesisPlanClient.setAge(newCase.getAge());
|
|
|
|
|
synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient);
|
|
|
|
|
return newCase.getCaseid();
|
|
|
|
@ -637,6 +593,24 @@ public class CaseServiceImpl implements CaseService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//单独处理财务分析相关表的类型
|
|
|
|
|
private String getString(CaseInfo newCase, String manageMoneyMattersType) {
|
|
|
|
|
String[] split = manageMoneyMattersType.split(",");
|
|
|
|
|
List<String> list1 = Arrays.asList(split);
|
|
|
|
|
String type = "";
|
|
|
|
|
for (String s : list1) {
|
|
|
|
|
if (s.equals("财务分析")) {
|
|
|
|
|
s = "财务分析-收支储蓄表,财务分析-资产负债表,财务分析-现金流量表,财务分析-财务比例分析";
|
|
|
|
|
}
|
|
|
|
|
type += s + ",";
|
|
|
|
|
}
|
|
|
|
|
type = type.replaceAll(",$", "");
|
|
|
|
|
newCase.setManageMoneyMattersType(type);
|
|
|
|
|
return type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断综合规划客户表是否存在,取status字段用于判断学生编辑综合规划使用
|
|
|
|
|
private ResultEntity<HttpStatus> getHttpStatusResultEntity(String caseid, String userId) {
|
|
|
|
|
//提交过答案则直接返回
|
|
|
|
|