diff --git a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java index 54e0e7a..dc28fde 100644 --- a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java +++ b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java @@ -365,7 +365,7 @@ public class SynthesisPlanController { return new ResultEntity<>(synthesisPlanClient); } - /* + /* 编辑建议书 * @author xcj * @Date 2024/8/15 */ @@ -373,6 +373,10 @@ public class SynthesisPlanController { @ApiOperation("编辑潜在客户信息/完善客户信息") @PostMapping("/updatePotentialCustomer") public ResultEntity updatePotentialCustomer(@RequestBody SynthesisPlanClient synthesisPlanClient) { + if(StringUtils.isBlank(synthesisPlanClient.getProposalNumber())){ + String number = "FPR"+IdUtil.simpleUUID(); + synthesisPlanClient.setProposalNumber(number); + } int i = synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient); if (i > 0) { return new ResultEntity<>(HttpStatus.OK, "编辑成功!"); @@ -380,6 +384,7 @@ public class SynthesisPlanController { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "系统!"); } + /* * @author xcj * @Date 2024/8/15 diff --git a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java index affdedb..96036f6 100644 --- a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java +++ b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java @@ -77,7 +77,7 @@ public class SynthesisPlanClient { @ApiModelProperty("理财类型") private String manageMoneyMattersType; - @ApiModelProperty("提交状态") + @ApiModelProperty("提交状态 未提交/已审核/未审核") private String submitStatus; @ApiModelProperty("实训时长") 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 cb1896b..6b62218 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 @@ -210,8 +210,8 @@ public class CaseServiceImpl implements CaseService { return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR, "系统错误,请联系管理员!"); } - String submitStatus = synthesisPlanClientList.get(0).getSubmitStatus(); - if (!submitStatus.equals("未提交")) { + SynthesisPlanClient synthesisPlanClient = synthesisPlanClientList.get(0); + if (synthesisPlanClient.getSubmitStatus() != null && !synthesisPlanClient.getSubmitStatus().equals("未提交")) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "提交后无法编辑!"); } return null; @@ -1698,13 +1698,22 @@ public class CaseServiceImpl implements CaseService { ComCaseExample example = new ComCaseExample(); example.createCriteria().andCaseidEqualTo(caseID); List comCases = comCaseMapper.selectByExample(example); + + SynthesisPlanClientExample example1 =new SynthesisPlanClientExample(); + example1.createCriteria().andUseridEqualTo(userId).andCaseidEqualTo(caseID); + List synthesisPlanClientList = synthesisPlanClientMapper.selectByExample(example1); + if (synthesisPlanClientList!=null && !synthesisPlanClientList.isEmpty()){ + SynthesisPlanClient synthesisPlanClient = synthesisPlanClientList.get(0); + synthesisPlanClient.setSubmitStatus("未提交"); + synthesisPlanClientMapper.updateByPrimaryKey(synthesisPlanClient); + } if (comCases == null || comCases.isEmpty()) { log.info("未查询到综合案例信息表"); return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR, "服务器异常,请联系管理员!"); } ComCase comCase = comCases.get(0); - List typeList = Arrays.asList(comCase.getManageMoneyMattersType().split(", ")); + String[] typeList = comCase.getManageMoneyMattersType().split(","); for (String allType : typeList) { if (allType.equals("风险测评-风险指标")) { CaseRiskIndex caseRiskIndices = getCaseRiskIndices(caseID, userId, isAnswer);