diff --git a/src/main/java/com/sztzjy/money_management/service/impl/CaseServiceImpl.java b/src/main/java/com/sztzjy/money_management/service/impl/CaseServiceImpl.java index dbd1b8f..42dbf77 100644 --- a/src/main/java/com/sztzjy/money_management/service/impl/CaseServiceImpl.java +++ b/src/main/java/com/sztzjy/money_management/service/impl/CaseServiceImpl.java @@ -134,6 +134,7 @@ public class CaseServiceImpl implements CaseService { synthesisPlanClient.setClientNumber(clientNumber); synthesisPlanClient.setCaseid(newCase.getCaseid()); synthesisPlanClient.setName(newCase.getCustomerName()); + synthesisPlanClient.setAge(newCase.getAge()); synthesisPlanClient.setIdcard(newCase.getIdCard()); synthesisPlanClient.setManageMoneyMattersType(newCase.getManageMoneyMattersType()); synthesisPlanClient.setSource(newCase.getSource()); @@ -527,7 +528,7 @@ public class CaseServiceImpl implements CaseService { if (operator.equals("master")) { CaseInfoExample example = new CaseInfoExample(); example.createCriteria().andIdCardEqualTo(newCase.getIdCard()); - List list = caseInfoMapper .selectByExampleWithBLOBs(example); + List list = caseInfoMapper.selectByExampleWithBLOBs(example); String manageMoneyMattersType = newCase.getManageMoneyMattersType(); @@ -580,20 +581,24 @@ public class CaseServiceImpl implements CaseService { } //同时修改综合综合规划客户表 - SynthesisPlanClient synthesisPlanClient = new SynthesisPlanClient(); - synthesisPlanClient.setName(newCase.getCustomerName()); - synthesisPlanClient.setIdcard(newCase.getIdCard()); - synthesisPlanClient.setManageMoneyMattersType(type); - synthesisPlanClient.setAge(newCase.getAge()); - synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient); - return newCase.getCaseid(); + SynthesisPlanClientExample synthesisPlanClientExample = new SynthesisPlanClientExample(); + synthesisPlanClientExample.createCriteria().andCaseidEqualTo(newCase.getCaseid()); + List synthesisPlanClientList = synthesisPlanClientMapper.selectByExample(synthesisPlanClientExample); + if (!synthesisPlanClientList.isEmpty()) { + SynthesisPlanClient synthesisPlanClient = synthesisPlanClientList.get(0); + synthesisPlanClient.setName(newCase.getCustomerName()); + synthesisPlanClient.setIdcard(newCase.getIdCard()); + synthesisPlanClient.setManageMoneyMattersType(type); + synthesisPlanClient.setAge(newCase.getAge()); + synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient); + return newCase.getCaseid(); + } } } return null; } - //单独处理财务分析相关表的类型 private String getString(CaseInfo newCase, String manageMoneyMattersType) { String[] split = manageMoneyMattersType.split(",");