|
|
@ -5,6 +5,7 @@ import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin; |
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin; |
|
|
@ -33,12 +34,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询用户角色 |
|
|
|
* 查询用户角色 |
|
|
|
|
|
|
|
* |
|
|
|
* @param userId |
|
|
|
* @param userId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "查询角色", notes = "查询角色") |
|
|
|
@ApiOperation(value = "查询用户角色信息", notes = "查询用户角色信息") |
|
|
|
@GetMapping("/queryRole") |
|
|
|
@GetMapping("/queryRole") |
|
|
|
Response queryRole(Integer userId) { |
|
|
|
Response queryRole(@ApiParam(name = "userId", value = "用户id", required = true) Integer userId) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.queryRole(userId); |
|
|
|
HashMap<String, Object> ret = service.queryRole(userId); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -55,6 +57,8 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 首页面查询 |
|
|
|
* 首页面查询 |
|
|
|
|
|
|
|
* <p> |
|
|
|
|
|
|
|
* |
|
|
|
* @param projectPermissions:权限 |
|
|
|
* @param projectPermissions:权限 |
|
|
|
* @param founder:创建人 |
|
|
|
* @param founder:创建人 |
|
|
|
* @param state:状态 |
|
|
|
* @param state:状态 |
|
|
@ -62,23 +66,34 @@ public class Project_ManagementController { |
|
|
|
* @param systemId |
|
|
|
* @param systemId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "首页面查询", notes = "首页面查询") |
|
|
|
@ApiOperation(value = "项目管理列表", notes = "项目管理列表") |
|
|
|
@GetMapping("/queryAllManagements") |
|
|
|
@GetMapping("/queryAllManagements") |
|
|
|
Response queryAllManagements(@RequestParam Integer projectPermissions,@RequestParam Integer founder,@RequestParam Integer state,@RequestParam String projectName, |
|
|
|
Response queryAllManagements(@ApiParam(name = "projectPermissions", value = "项目权限(0、练习 1、考核 2、竞赛)", required = false) @RequestParam(required = false) Integer projectPermissions, |
|
|
|
@RequestParam Integer systemId,@RequestParam Integer userId,@RequestParam Integer pageNo,@RequestParam Integer pageSize){ |
|
|
|
@ApiParam(name = "founder", value = "项目创建人(0、系统 1、老师)", required = false) @RequestParam(required = false) Integer founder, |
|
|
|
|
|
|
|
@ApiParam(name = "state", value = "项目状态(0、草稿箱 1、已发布)", required = false) @RequestParam(required = false) Integer state, |
|
|
|
|
|
|
|
@ApiParam(name = "projectName", value = "项目名称", required = false) @RequestParam(required = false) String projectName, |
|
|
|
|
|
|
|
@ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, |
|
|
|
|
|
|
|
@ApiParam(name = "userId", value = "用户id", required = true) @RequestParam Integer userId, |
|
|
|
|
|
|
|
@ApiParam(name = "pageNo", value = "第几页,页码", required = true) @RequestParam Integer pageNo, |
|
|
|
|
|
|
|
@ApiParam(name = "pageSize", value = "每页展示的数据条数", required = true) @RequestParam Integer pageSize) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
Project_Management vo = new Project_Management(); |
|
|
|
Project_Management vo = new Project_Management(); |
|
|
|
if (null != projectPermissions) { |
|
|
|
if (null != projectPermissions) { |
|
|
|
vo.setProjectPermissions(projectPermissions); |
|
|
|
vo.setProjectPermissions(projectPermissions); |
|
|
|
}if(null!=founder) { |
|
|
|
} |
|
|
|
|
|
|
|
if (null != founder) { |
|
|
|
vo.setFounder(founder); |
|
|
|
vo.setFounder(founder); |
|
|
|
}if(null!=state) { |
|
|
|
} |
|
|
|
|
|
|
|
if (null != state) { |
|
|
|
vo.setState(state); |
|
|
|
vo.setState(state); |
|
|
|
}if(null!=systemId) { |
|
|
|
} |
|
|
|
|
|
|
|
if (null != systemId) { |
|
|
|
vo.setSystemId(systemId); |
|
|
|
vo.setSystemId(systemId); |
|
|
|
}if(null!=projectName&&projectName!="") { |
|
|
|
} |
|
|
|
|
|
|
|
if (null != projectName && projectName != "") { |
|
|
|
vo.setProjectName(projectName); |
|
|
|
vo.setProjectName(projectName); |
|
|
|
}if(null!=userId) { |
|
|
|
} |
|
|
|
|
|
|
|
if (null != userId) { |
|
|
|
vo.setUserId(userId); |
|
|
|
vo.setUserId(userId); |
|
|
|
} |
|
|
|
} |
|
|
|
HashMap<String, Object> ret = service.queryAllManagements(vo, pageNo, pageSize); |
|
|
|
HashMap<String, Object> ret = service.queryAllManagements(vo, pageNo, pageSize); |
|
|
@ -96,12 +111,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 批量删除 |
|
|
|
* 批量删除 |
|
|
|
|
|
|
|
* |
|
|
|
* @param point 项目id集合 |
|
|
|
* @param point 项目id集合 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "批量删除", notes = "批量删除") |
|
|
|
@ApiOperation(value = "批量删除", notes = "批量删除") |
|
|
|
@PostMapping("/removeProjectManagement") |
|
|
|
@PostMapping("/removeProjectManagement") |
|
|
|
Response removeProjectManagement(@RequestBody List<Integer> point) { |
|
|
|
Response removeProjectManagement(@ApiParam(name = "point", value = "项目主键Id", required = true) @RequestBody List<Integer> point) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.deleteProjectManagement(point); |
|
|
|
HashMap<String, Object> ret = service.deleteProjectManagement(point); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -118,12 +134,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 根据项目管理id查询对应信息 |
|
|
|
* 根据项目管理id查询对应信息 |
|
|
|
|
|
|
|
* |
|
|
|
* @param projectId |
|
|
|
* @param projectId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "根据项目管理id查询对应信息", notes = "根据项目管理id查询对应信息") |
|
|
|
@ApiOperation(value = "获取点击编辑的对应信息", notes = "获取点击编辑的对应信息") |
|
|
|
@GetMapping("/getProjectId") |
|
|
|
@GetMapping("/getProjectId") |
|
|
|
Response getProjectId(Integer projectId) { |
|
|
|
Response getProjectId(@ApiParam(name = "projectId", value = "项目主键ID", required = true) Integer projectId) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.getProjectId(projectId); |
|
|
|
HashMap<String, Object> ret = service.getProjectId(projectId); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -139,12 +156,14 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加点面板的数据展示+条件筛选 |
|
|
|
* 添加点面板的数据展示+条件筛选 |
|
|
|
|
|
|
|
* |
|
|
|
* @param judgmentPointsName 判分点名称 |
|
|
|
* @param judgmentPointsName 判分点名称 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "添加点面板的数据展示+条件筛选", notes = "添加点面板的数据展示+条件筛选") |
|
|
|
@ApiOperation(value = "判分点列表", notes = "判分点列表") |
|
|
|
@GetMapping("/queryAllJudgmentPoints") |
|
|
|
@GetMapping("/queryAllJudgmentPoints") |
|
|
|
Response queryAllJudgmentPoints(@RequestParam String judgmentPointsName,@RequestParam Integer systemId) { |
|
|
|
Response queryAllJudgmentPoints(@ApiParam(name = "judgmentPointsName", value = "判分点名称", required = false) @RequestParam(required = false) String judgmentPointsName, |
|
|
|
|
|
|
|
@ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
Judgment_Points points = new Judgment_Points(); |
|
|
|
Judgment_Points points = new Judgment_Points(); |
|
|
|
if (StringUtils.isEmpty(systemId)) { |
|
|
|
if (StringUtils.isEmpty(systemId)) { |
|
|
@ -172,12 +191,15 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 实验任务表格信息的展示,根据判分点id和项目 |
|
|
|
* 实验任务表格信息的展示,根据判分点id和项目 |
|
|
|
|
|
|
|
* |
|
|
|
* @param judgmentPointsIds 判分点id |
|
|
|
* @param judgmentPointsIds 判分点id |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "实验任务表格信息的展示,根据判分点id和项目", notes = "实验任务表格信息的展示,根据判分点id和项目") |
|
|
|
@ApiOperation(value = "实验任务列表", notes = "实验任务列表") |
|
|
|
@GetMapping("/getByjudgmentPointsId") |
|
|
|
@GetMapping("/getByjudgmentPointsId") |
|
|
|
Response getByjudgmentPointsId(@RequestParam List<Integer> judgmentPointsIds,Integer projectId,Integer userId) { |
|
|
|
Response getByjudgmentPointsId(@ApiParam(name = "judgmentPointsIds", value = "判分点主键id", required = true) @RequestParam List<Integer> judgmentPointsIds, |
|
|
|
|
|
|
|
@ApiParam(name = "projectId", value = "项目主键ID", required = false) @RequestParam(required = false) Integer projectId, |
|
|
|
|
|
|
|
@ApiParam(name = "userId", value = "用户主键ID", required = false) @RequestParam(required = false) Integer userId) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.getByjudgmentPointsId(judgmentPointsIds, projectId, userId); |
|
|
|
HashMap<String, Object> ret = service.getByjudgmentPointsId(judgmentPointsIds, projectId, userId); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -194,12 +216,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 平均分配分值 |
|
|
|
* 平均分配分值 |
|
|
|
|
|
|
|
* |
|
|
|
* @param number 判分点数量 |
|
|
|
* @param number 判分点数量 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "平均分配分值", notes = "平均分配分值") |
|
|
|
@ApiOperation(value = "平均分配分值", notes = "平均分配分值") |
|
|
|
@GetMapping("/avgValues") |
|
|
|
@GetMapping("/avgValues") |
|
|
|
Response avgValues(Integer number) { |
|
|
|
Response avgValues(@ApiParam(name = "number", value = "判分点数量", required = true) Integer number) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.avgValues(number); |
|
|
|
HashMap<String, Object> ret = service.avgValues(number); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -216,12 +239,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加角色 |
|
|
|
* 添加角色 |
|
|
|
|
|
|
|
* |
|
|
|
* @param role 角色 |
|
|
|
* @param role 角色 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "添加角色", notes = "添加角色") |
|
|
|
@ApiOperation(value = " 新增案例数据对象", notes = " 新增案例数据对象") |
|
|
|
@PostMapping("/addRole") |
|
|
|
@PostMapping("/addRole") |
|
|
|
Response addRole(@RequestBody Role role) { |
|
|
|
Response addRole(@ApiParam(name = "Role", value = "角色对象,传入json格式", required = true) @RequestBody Role role) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.insertRole(role); |
|
|
|
HashMap<String, Object> ret = service.insertRole(role); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -238,12 +262,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 实验数据表格信息的展示,根据角色id |
|
|
|
* 实验数据表格信息的展示,根据角色id |
|
|
|
|
|
|
|
* |
|
|
|
* @param roleId 角色Id |
|
|
|
* @param roleId 角色Id |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "实验数据表格信息的展示,根据角色id", notes = "实验数据表格信息的展示,根据角色id") |
|
|
|
@ApiOperation(value = "实验数据列表", notes = "实验数据列表") |
|
|
|
@GetMapping("/getByRoleId") |
|
|
|
@GetMapping("/getByRoleId") |
|
|
|
Response getByRoleId(@RequestParam List<Integer> roleId) { |
|
|
|
Response getByRoleId(@ApiParam(name = "roleId", value = "角色id", required = true) @RequestParam List<Integer> roleId) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
HashMap<String, Object> ret = service.getByRoleId(roleId); |
|
|
|
HashMap<String, Object> ret = service.getByRoleId(roleId); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
int status = (int) ret.get("retcode"); |
|
|
@ -259,12 +284,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加创建项目管理信息 |
|
|
|
* 添加创建项目管理信息 |
|
|
|
|
|
|
|
* |
|
|
|
* @param vo 项目管理信息 |
|
|
|
* @param vo 项目管理信息 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "新增项目管理信息", notes = "新增项目管理信息") |
|
|
|
@ApiOperation(value = "创建项目", notes = "创建项目") |
|
|
|
@PostMapping("/addProjectManagement") |
|
|
|
@PostMapping("/addProjectManagement") |
|
|
|
Response insertProjectManagement(@RequestBody ManagementAndPointVo vo) { |
|
|
|
Response insertProjectManagement(@RequestBody @ApiParam(name = "新建项目管理所需类", value = "传入json格式", required = true) ManagementAndPointVo vo) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
Project_Management pro = vo.getManagement(); |
|
|
|
Project_Management pro = vo.getManagement(); |
|
|
|
List<Judgment_Points> points = vo.getPooints(); |
|
|
|
List<Judgment_Points> points = vo.getPooints(); |
|
|
@ -302,12 +328,13 @@ public class Project_ManagementController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 修改项目管理信息 |
|
|
|
* 修改项目管理信息 |
|
|
|
|
|
|
|
* |
|
|
|
* @param vo |
|
|
|
* @param vo |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "修改项目管理信息", notes = "修改项目管理信息") |
|
|
|
@ApiOperation(value = "编辑项目", notes = "编辑项目") |
|
|
|
@PostMapping("/updateProjectManagement") |
|
|
|
@PostMapping("/updateProjectManagement") |
|
|
|
Response updateProjectManagement(@RequestBody ManagementAndPointVo vo) { |
|
|
|
Response updateProjectManagement(@ApiParam(name = "新建项目管理所需类", value = "传入json格式", required = true) @RequestBody ManagementAndPointVo vo) { |
|
|
|
Response resp = new Response(); |
|
|
|
Response resp = new Response(); |
|
|
|
Project_Management pro = vo.getManagement(); |
|
|
|
Project_Management pro = vo.getManagement(); |
|
|
|
List<Judgment_Points> points = vo.getPooints(); |
|
|
|
List<Judgment_Points> points = vo.getPooints(); |
|
|
|