From ff892a7e18ea39f7df8a6c175d8ab89792fd7546 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Thu, 8 Apr 2021 15:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=91=E5=A4=A7=E9=A1=B9=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8F=8A=E5=A2=9E=E5=8A=A0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManagementController.java | 25 ++++++++++++- .../mapper/ProjectManagementMapper.java | 10 ++++++ .../service/ProjectManagementService.java | 35 +++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java index 5defed8..db2ac39 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java @@ -349,7 +349,7 @@ public class ProjectManagementController { } /** - * 根据项目管理id查询对应交易类判分点信息 + * 根据项目管理id查询对应交易类判分点信息(职站) * * @param projectId * @return @@ -370,6 +370,29 @@ public class ProjectManagementController { return resp; } + + /** + * 根据项目管理id查询对应交易类判分点信息(科大) + * + * @param projectId + * @return + */ + @ApiOperation(value = "根据项目管理id查询对应交易类判分点信息(科大)", notes = "根据项目管理id查询对应交易类判分点信息(科大)") + @GetMapping("/getTrdingJudgmentPointsByKD") + Response getTrdingJudgmentPointsByKD(@ApiParam(name = "projectId", value = "项目主键ID", required = true) @RequestParam Integer projectId) { + Response resp = new Response(); + HashMap ret = service.getTrdingJudgmentPointsByKD(projectId); + int status = (int) ret.get("retcode"); + if (status == 200) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + return resp; + } + /** * 根据项目管理id查询对应交易类判分点信息 * diff --git a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java index ef94a85..8e96456 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java @@ -114,6 +114,16 @@ public interface ProjectManagementMapper { @Select("select projectId,projectName,projectPermissions,experimentalGoal,caseDescription,experimentSuggests,state,isstartexperimental,isstartexperimentSuggests,userId,knowledgePoints,experimentIntroduction,knowledgePointsIsEnable,experimentIntroductionIsEnable from hr_project_management where isdel=0 and projectId=#{projectId}") ProjectManagement getProjectId(Integer projectId); + + /** + * 根据实验项目id查询信息(科大) + * + * @param projectId + * @return + */ + @Select("select pattern,projectId,projectName,projectPermissions,experimentalGoal,caseDescription,experimentSuggests,state,isstartexperimental,isstartexperimentSuggests,userId,knowledgePoints,experimentIntroduction,knowledgePointsIsEnable,experimentIntroductionIsEnable from hr_project_management where isdel=0 and projectId=#{projectId}") + HrProjectManagement getProjectIdByKD(Integer projectId); + /** * 根据实验项目id查询项目名称 * diff --git a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java index e3013d9..e77e26a 100644 --- a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java +++ b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java @@ -438,6 +438,41 @@ public class ProjectManagementService { } + /** + * 根据项目管理id查询对应交易类判分点信息(科大) + * + * @param projectId + * @return + */ + public HashMap getTrdingJudgmentPointsByKD(Integer projectId) { + HashMap resp = new HashMap(); + List obj = new ArrayList(); + + try { + // 项目信息 + HrProjectManagement management = mapper.getProjectIdByKD(projectId); + if (null != management) { + // 判分点信息 + List points = mapper.queryJudgmentPoints(projectId); + // 角色信息 + List roles = mapper.queryProjectId(projectId); + // 存数据 + obj.add(management); + obj.add(points); + obj.add(roles); + } + resp.put("retvalue", obj); + resp.put("retcode", 200); + } catch (Exception e) { + logger.error(e.getMessage()); + resp.put("retcode", 500); + resp.put("retvalue", "Inquiry Failed"); + return resp; + } + return resp; + } + + /** * 根据项目管理id查询对应交易类判分点信息 *