|
|
@ -27,21 +27,24 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ProjectRecordService projectRecordService; |
|
|
|
private ProjectRecordService projectRecordService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询用户实验报告 |
|
|
|
* 查询用户实验报告 |
|
|
|
|
|
|
|
* |
|
|
|
* @param projectId |
|
|
|
* @param projectId |
|
|
|
* @param |
|
|
|
* @param |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/getTeacher") |
|
|
|
@GetMapping("/getTeacher") |
|
|
|
public R getTeacher(@RequestParam Integer projectId){ |
|
|
|
public R getTeacher(@RequestParam Integer projectId) { |
|
|
|
R data = service.getTeacher(projectId); |
|
|
|
R data = service.getTeacher(projectId); |
|
|
|
return data; |
|
|
|
return data; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询用户实验报告 |
|
|
|
* 查询用户实验报告 |
|
|
|
|
|
|
|
* |
|
|
|
* @param userId |
|
|
|
* @param userId |
|
|
|
* @param reportId |
|
|
|
* @param reportId |
|
|
|
* @param |
|
|
|
* @param |
|
|
@ -49,13 +52,12 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/getReport") |
|
|
|
@GetMapping("/getReport") |
|
|
|
public R getReport(@RequestParam Integer reportId,@RequestParam Integer userId){ |
|
|
|
public R getReport(@RequestParam Integer reportId, @RequestParam Integer userId) { |
|
|
|
R data = service.getReport(userId,reportId); |
|
|
|
R data = service.getReport(userId, reportId); |
|
|
|
return data; |
|
|
|
return data; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询实验记录 |
|
|
|
* 查询实验记录 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -68,27 +70,27 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
@RequestParam(required = false) String endTime, |
|
|
|
@RequestParam(required = false) String endTime, |
|
|
|
@RequestParam(required = false) Integer month, |
|
|
|
@RequestParam(required = false) Integer month, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer size){ |
|
|
|
@RequestParam(required = true) Integer size) { |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
if (systemId==null){ |
|
|
|
if (systemId == null) { |
|
|
|
return R.error("系统id不能为空!"); |
|
|
|
return R.error("系统id不能为空!"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
vo.setSystemId(systemId); |
|
|
|
vo.setSystemId(systemId); |
|
|
|
} |
|
|
|
} |
|
|
|
if (projectPermissions!=null){ |
|
|
|
if (projectPermissions != null) { |
|
|
|
vo.setProjectPermissions(projectPermissions); |
|
|
|
vo.setProjectPermissions(projectPermissions); |
|
|
|
} |
|
|
|
} |
|
|
|
if (searchContant!=null){ |
|
|
|
if (searchContant != null) { |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
} |
|
|
|
} |
|
|
|
if (startTime!=null){ |
|
|
|
if (startTime != null) { |
|
|
|
vo.setStartTime(startTime); |
|
|
|
vo.setStartTime(startTime); |
|
|
|
} |
|
|
|
} |
|
|
|
if (endTime!=null){ |
|
|
|
if (endTime != null) { |
|
|
|
vo.setEndTime(endTime); |
|
|
|
vo.setEndTime(endTime); |
|
|
|
} |
|
|
|
} |
|
|
|
List<ResultsEntity> result = service.list(vo,page,size); |
|
|
|
List<ResultsEntity> result = service.list(vo, page, size); |
|
|
|
return R.ok().put("data",result); |
|
|
|
return R.ok().put("data", result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -97,29 +99,29 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/newList") |
|
|
|
@GetMapping("/newList") |
|
|
|
public R newList(@RequestParam(required = true) Integer userId, |
|
|
|
public R newList(@RequestParam(required = true) Integer userId, |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = false) String startTime, |
|
|
|
@RequestParam(required = false) String startTime, |
|
|
|
@RequestParam(required = false) String endTime, |
|
|
|
@RequestParam(required = false) String endTime, |
|
|
|
@RequestParam(required = false) Integer month, |
|
|
|
@RequestParam(required = false) Integer month, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer size){ |
|
|
|
@RequestParam(required = true) Integer size) { |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
if (userId==null){ |
|
|
|
if (userId == null) { |
|
|
|
return R.error("用户id不能为空!"); |
|
|
|
return R.error("用户id不能为空!"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
vo.setUserId(userId); |
|
|
|
vo.setUserId(userId); |
|
|
|
} |
|
|
|
} |
|
|
|
if (searchContant!=null){ |
|
|
|
if (searchContant != null) { |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
} |
|
|
|
} |
|
|
|
if (startTime!=null){ |
|
|
|
if (startTime != null) { |
|
|
|
vo.setStartTime(startTime); |
|
|
|
vo.setStartTime(startTime); |
|
|
|
} |
|
|
|
} |
|
|
|
if (endTime!=null){ |
|
|
|
if (endTime != null) { |
|
|
|
vo.setEndTime(endTime); |
|
|
|
vo.setEndTime(endTime); |
|
|
|
} |
|
|
|
} |
|
|
|
List<ResultsEntity> result = service.newList(vo,page,size); |
|
|
|
List<ResultsEntity> result = service.newList(vo, page, size); |
|
|
|
return R.ok().put("data",result); |
|
|
|
return R.ok().put("data", result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -128,22 +130,22 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/reportList") |
|
|
|
@GetMapping("/reportList") |
|
|
|
public R reportList(@RequestParam(required = true) Integer systemId, |
|
|
|
public R reportList(@RequestParam(required = true) Integer systemId, |
|
|
|
@RequestParam(required = true) Integer projectId, |
|
|
|
@RequestParam(required = true) Integer projectId, |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer size){ |
|
|
|
@RequestParam(required = true) Integer size) { |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
ResultsVo vo = new ResultsVo(); |
|
|
|
if (systemId==null||projectId==null){ |
|
|
|
if (systemId == null || projectId == null) { |
|
|
|
return R.error("系统或项目数据不能为空!"); |
|
|
|
return R.error("系统或项目数据不能为空!"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
vo.setSystemId(systemId); |
|
|
|
vo.setSystemId(systemId); |
|
|
|
vo.setProjectId(projectId); |
|
|
|
vo.setProjectId(projectId); |
|
|
|
} |
|
|
|
} |
|
|
|
if (searchContant!=null){ |
|
|
|
if (searchContant != null) { |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
vo.setSearchContant(searchContant); |
|
|
|
} |
|
|
|
} |
|
|
|
List<ReportEntity> result = service.reportList(vo,page,size); |
|
|
|
List<ReportEntity> result = service.reportList(vo, page, size); |
|
|
|
return R.ok().put("data",result); |
|
|
|
return R.ok().put("data", result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -151,9 +153,9 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@PostMapping("/addReport") |
|
|
|
@PostMapping("/addReport") |
|
|
|
public R addReport(@RequestBody ExperimentalReportEntity entity){ |
|
|
|
public R addReport(@RequestBody ExperimentalReportEntity entity) { |
|
|
|
R result = service.addReport(entity); |
|
|
|
R result = service.addReport(entity); |
|
|
|
return R.ok().put("reportId",entity.getReportId()); |
|
|
|
return R.ok().put("reportId", entity.getReportId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
// /**
|
|
|
@ -171,7 +173,7 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/queryReport") |
|
|
|
@GetMapping("/queryReport") |
|
|
|
public R queryReport(@RequestParam(required = true) Integer reportId){ |
|
|
|
public R queryReport(@RequestParam(required = true) Integer reportId) { |
|
|
|
R result = service.queryReport(reportId); |
|
|
|
R result = service.queryReport(reportId); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
@ -180,7 +182,7 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
// @Override
|
|
|
|
// @Override
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
@PostMapping("/updateReport") |
|
|
|
@PostMapping("/updateReport") |
|
|
|
public R updateScore(@RequestBody ProjectRecordEntity entity){ |
|
|
|
public R updateScore(@RequestBody ProjectRecordEntity entity) { |
|
|
|
ProjectRecordEntity vo = new ProjectRecordEntity() |
|
|
|
ProjectRecordEntity vo = new ProjectRecordEntity() |
|
|
|
.setRecordid(entity.getRecordid()).setScore(entity.getScore()); |
|
|
|
.setRecordid(entity.getRecordid()).setScore(entity.getScore()); |
|
|
|
projectRecordService.updateScore(vo); |
|
|
|
projectRecordService.updateScore(vo); |
|
|
@ -189,20 +191,22 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 需求:删除实验记录====管理端删除,但是学生端仍需保留 |
|
|
|
* 需求:删除实验记录====管理端删除,但是学生端仍需保留 |
|
|
|
* 将isdel属性设置为0 |
|
|
|
* 将isdel属性设置为0 |
|
|
|
|
|
|
|
* |
|
|
|
* @param reportId |
|
|
|
* @param reportId |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@PostMapping("/deleteReport") |
|
|
|
@PostMapping("/deleteReport") |
|
|
|
public R deleteReport(@RequestParam Integer reportId,@RequestParam Integer recordId){ |
|
|
|
public R deleteReport(@RequestParam Integer reportId, @RequestParam Integer recordId) { |
|
|
|
R result = service.deleteReport(reportId,recordId); |
|
|
|
R result = service.deleteReport(reportId, recordId); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 班级实验报告列表查询 |
|
|
|
* 班级实验报告列表查询 |
|
|
|
|
|
|
|
* |
|
|
|
* @param searchContant |
|
|
|
* @param searchContant |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -211,21 +215,22 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
public R queryEvaluationReport(@RequestParam(required = false) String searchContant, |
|
|
|
public R queryEvaluationReport(@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = true) Integer projectId, |
|
|
|
@RequestParam(required = true) Integer projectId, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer page, |
|
|
|
@RequestParam(required = true) Integer size){ |
|
|
|
@RequestParam(required = true) Integer size) { |
|
|
|
R result = service.queryEvaluationReport(searchContant,projectId,page,size); |
|
|
|
R result = service.queryEvaluationReport(searchContant, projectId, page, size); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 班级实验成绩导出 |
|
|
|
* 班级实验成绩导出 |
|
|
|
|
|
|
|
* |
|
|
|
* @param response |
|
|
|
* @param response |
|
|
|
* @param ids (ids:recordId) |
|
|
|
* @param ids (ids:recordId) |
|
|
|
* @throws Exception |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@GetMapping("/exportAchievement") |
|
|
|
@GetMapping("/exportAchievement") |
|
|
|
public void exportAchievement(HttpServletResponse response, @RequestParam String ids) throws Exception { |
|
|
|
public void exportAchievement(HttpServletResponse response, @RequestParam String ids) throws Exception { |
|
|
|
service.exportAchievement(response,ids);//SearchAchievementVo vo
|
|
|
|
service.exportAchievement(response, ids);//SearchAchievementVo vo
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//成绩管理列表
|
|
|
|
//成绩管理列表
|
|
|
@ -236,19 +241,20 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = false) String searchContant, |
|
|
|
@RequestParam(required = false) String startingtime, |
|
|
|
@RequestParam(required = false) String startingtime, |
|
|
|
@RequestParam(required = false) String endtime, |
|
|
|
@RequestParam(required = false) String endtime, |
|
|
|
@RequestParam(required = false) Integer month){ |
|
|
|
@RequestParam(required = false) Integer month) { |
|
|
|
R result = service.queryAchievement(systemId,projectPermissions,searchContant,startingtime,endtime,month); |
|
|
|
R result = service.queryAchievement(systemId, projectPermissions, searchContant, startingtime, endtime, month); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 修改评语 |
|
|
|
* 修改评语 |
|
|
|
|
|
|
|
* |
|
|
|
* @param entity |
|
|
|
* @param entity |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
// @Override
|
|
|
|
// @Override
|
|
|
|
@PostMapping("/updateComment") |
|
|
|
@PostMapping("/updateComment") |
|
|
|
public R updateComment(@RequestBody ExperimentalReportEntity entity){ |
|
|
|
public R updateComment(@RequestBody ExperimentalReportEntity entity) { |
|
|
|
R result = service.updateComment(entity); |
|
|
|
R result = service.updateComment(entity); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
@ -256,26 +262,28 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 发布成绩: |
|
|
|
* 发布成绩: |
|
|
|
* 修改教师签名+修改教师评语 |
|
|
|
* 修改教师签名+修改教师评语 |
|
|
|
* @param entity (isSignature,signatureId,reportId,comment) |
|
|
|
* |
|
|
|
|
|
|
|
* @param entity (isSignature,signatureId,reportId,comment) |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@PostMapping("/release") |
|
|
|
@PostMapping("/release") |
|
|
|
public R updateSignatrue(@RequestBody ExperimentalReportEntity entity){ |
|
|
|
public R updateSignatrue(@RequestBody ExperimentalReportEntity entity) { |
|
|
|
service.updateSignatrue(entity); |
|
|
|
service.updateSignatrue(entity); |
|
|
|
return R.ok(); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除成绩管理中的项目 |
|
|
|
* 批量删除成绩管理中的项目 |
|
|
|
* @param projectId |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@PostMapping("/deleteReportById") |
|
|
|
@PostMapping("/deleteReportById") |
|
|
|
public R deleteReportByProjectId(@RequestParam Integer projectId) { |
|
|
|
public R deleteReportByIds(@RequestParam List<Integer> projectIds,@RequestParam Integer projectPermissions, |
|
|
|
return service.deleteReportByProjectId(projectId); |
|
|
|
@RequestParam(required = false) List<Integer> ids) { |
|
|
|
|
|
|
|
return service.deleteReportById(projectIds,projectPermissions,ids); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -297,4 +305,12 @@ public class AchievementManagementController implements AchievementManagementApi |
|
|
|
List<AchievementManagementVO> result = service.getTeachAchievement(id); |
|
|
|
List<AchievementManagementVO> result = service.getTeachAchievement(id); |
|
|
|
return R.ok().put("data", result); |
|
|
|
return R.ok().put("data", result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
@PostMapping("/modify") |
|
|
|
|
|
|
|
public R modify(@RequestBody ExperimentalReportEntity entity) { |
|
|
|
|
|
|
|
Integer code = service.modify(entity); |
|
|
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|