From 8b903b4722ece25b44967444496eace780bfd83a Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Wed, 13 Mar 2024 16:16:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B1=E6=95=88=E5=BE=97?= =?UTF-8?q?=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TopicController.java | 24 +++++++++++++++---- .../service/serviceImpl/TopicServiceImpl.java | 18 +++++++------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java index 7bfc5f9..dfb0618 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -64,8 +64,8 @@ public class TopicController { @ApiOperation("知识测评,项目估值,项目尽调,答题页面返回随机6条数据") @AnonymousAccess public ResultEntity> getRandomTopic(@ApiParam("题目来源模块:知识测评题库,项目尽调题库,项目估值题库") @RequestParam String module, - @RequestParam String flowId,String schoolId) { - return new ResultEntity>(topicService.getRandomTopic(module, flowId,schoolId)); + @RequestParam String flowId, String schoolId) { + return new ResultEntity>(topicService.getRandomTopic(module, flowId, schoolId)); } @@ -76,8 +76,23 @@ public class TopicController { @PostMapping("getIPOTopicTwo") @ApiOperation("IPO页面弹窗2使用返回随机6条数据") @AnonymousAccess - public ResultEntity> getIPOTopicTwo(@RequestParam String flowId,@RequestParam String schoolId) { - return new ResultEntity>(topicService.getIPOTopicTwo(flowId,schoolId)); + public ResultEntity> getIPOTopicTwo(@RequestParam String flowId, @RequestParam String schoolId) { + return new ResultEntity>(topicService.getIPOTopicTwo(flowId, schoolId)); + } + + + /* + * @author xcj + * @Date 2023/11/21`` + */ + @GetMapping("getIPOScore") + @ApiOperation("IPO上市流程得分接口") + @AnonymousAccess + public void getIPOScore(@RequestParam String flowId, + @ApiParam("布尔类型参数,正确传true,错误传false") @RequestParam Boolean flag) { + if (flag) { + performanceScoreService.calculateScoreByModule("ipoFlowScore", 4, flowId); + } } @@ -120,6 +135,7 @@ public class TopicController { return new ResultEntity<>(performanceScores.get(0)); } + @AnonymousAccess @GetMapping("/getVideoScore") @ApiOperation("实务认知计算视频得分接口") diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java index 0d09b1a..01d3c62 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -211,7 +211,6 @@ public class TopicServiceImpl implements TopicService { topicRecord.setTopicType(topicType); topicRecordMapper.insert(topicRecord); } - PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); //IPO模块总分十分,其余5分 板块3分,条件3分,流程4分(固定的题目,单独接口) if (/*!(module.equals(Constant.IPOBK) || module.equals(Constant.IPOTJ)) &&*/ score >= 5) { @@ -219,10 +218,11 @@ public class TopicServiceImpl implements TopicService { } // 调用计分方法 if (module.equals(Constant.ZSCETK)) { - //标记完成时间 - performanceScore.setKnowledgeAssessmentTime(new Date()); - performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("knowledgeAssessmentScore", score, flowId); + //标记完成时间 + PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId); + byFlowId.setKnowledgeAssessmentTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(byFlowId); } if (module.equals(Constant.XMJDTK)) { performanceScoreService.calculateScoreByModule("projectDueDiligenceScore", score, flowId); @@ -231,14 +231,16 @@ public class TopicServiceImpl implements TopicService { performanceScoreService.calculateScoreByModule("projectValuationScore", score, flowId); } if (module.equals(Constant.IPOBK)) { - performanceScore.setIpoTime(new Date()); - performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("ipoListedSectorScore", score, flowId); + PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId); + byFlowId.setIpoTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(byFlowId); } if (module.equals(Constant.IPOTJ)) { - performanceScore.setIpoTime(new Date()); - performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("ipoListedConditionScore", score, flowId); + PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId); + byFlowId.setIpoTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(byFlowId); } return new ResultEntity<>(HttpStatus.OK,"提交成功!"); }