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查询对应交易类判分点信息 *