diff --git a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java index 3375509..0d76854 100644 --- a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java +++ b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java @@ -28,7 +28,7 @@ public interface AchievementManagementApi { // R updateScore(@ApiParam(value = "recordid和score") ProjectRecordEntity entity); @ApiOperation(value = "删除实验报告",notes = "根据实验记录主键reportId和实验报告主键recordId删除实验报告") - R deleteReport(@ApiParam(value = "实验记录主键reportId(此处为ids集合)",required = true) AchievementManagementVo vo); + R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId); @ApiOperation(value = "班级实验报告列表查询",notes = "班级实验报告列表查询") R queryEvaluationReport(@ApiParam(value = "搜索内容(学校名称/学生姓名)",required = false) String searchContant, @@ -41,15 +41,15 @@ public interface AchievementManagementApi { @ApiOperation(value = "成绩管理列表",notes = "成绩管理列表筛选查询") R queryAchievement(@ApiParam(value = "平台id",required = false) Integer systemId, - @ApiParam(value = "项目类型",required = false) Integer projectPermissions, - @ApiParam(value = "搜索内容",required = false) String searchContant, + @ApiParam(value = "项目类型(0练习,1考核)",required = false) Integer projectPermissions, + @ApiParam(value = "搜索内容(项目名称/实验班级)",required = false) String searchContant, @ApiParam(value = "开始时间",required = false) String startingtime, @ApiParam(value = "结束时间",required = false) String endtime, @ApiParam(value = "最近几月",required = false) Integer month); - @ApiOperation(value = "修改教师评语",notes = "修改教师评语:评语comment和实验报告主键reportId") - R updateComment(@ApiParam(value = "评语comment和实验报告主键reportId",required = true) ExperimentalReportEntity entity); +// @ApiOperation(value = "修改教师评语",notes = "修改教师评语:评语comment和实验报告主键reportId") +// R updateComment(@ApiParam(value = "评语comment和实验报告主键reportId",required = true) ExperimentalReportEntity entity); @ApiOperation(value = "发布成绩",notes = "发布成绩--修改教师签名") - R updateSignatrue(@ApiParam(value = "实验报告主键reportId+是否使用教师签名isSignature+教师签名id signatureId") ExperimentalReportEntity entity); + R updateSignatrue(@ApiParam(value = "实验报告主键reportId + 是否使用教师签名isSignature + 教师签名id signatureId + 教师评语comment") ExperimentalReportEntity entity); } diff --git a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java index 7ddc02e..728604c 100644 --- a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java +++ b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java @@ -17,7 +17,7 @@ public interface ClassTeachingApi { @ApiOperation(value = "查询班级实验列表信息",notes = "查询班级实验列表信息") R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime, - String condition, Integer status); + String condition, Integer status,Integer schoolId); @ApiOperation(value = "查看成绩",notes = "查看成绩") R queryAchievement(); diff --git a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java index e5ae595..9a48af1 100644 --- a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java +++ b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java @@ -66,11 +66,12 @@ public class AchievementManagementController implements AchievementManagementApi */ @Override @PostMapping("/deleteReport") - public R deleteReport(@RequestBody AchievementManagementVo vo){ - R result = service.deleteReport(vo); + public R deleteReport(@RequestParam Integer reportId){ + R result = service.deleteReport(reportId); return result; } + /** * 班级实验报告列表查询 * @param searchContant @@ -98,6 +99,7 @@ public class AchievementManagementController implements AchievementManagementApi service.exportAchievement(response,ids);//SearchAchievementVo vo } + //成绩管理列表 @Override @GetMapping("/queryAchievement") public R queryAchievement(@RequestParam(required = false) Integer systemId, @@ -115,13 +117,19 @@ public class AchievementManagementController implements AchievementManagementApi * @param entity * @return */ - @Override +// @Override @PostMapping("/updateComment") public R updateComment(@RequestBody ExperimentalReportEntity entity){ R result = service.updateComment(entity); return result; } + /** + * 发布成绩: + * 修改教师签名+修改教师评语 + * @param entity (isSignature,signatureId,reportId,comment) + * @return + */ @Override @PostMapping("/release") public R updateSignatrue(@RequestBody ExperimentalReportEntity entity){ diff --git a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java index a373260..a4dcd2a 100644 --- a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java @@ -44,7 +44,7 @@ public class ClassTeachingController implements ClassTeachingApi { @Override @GetMapping("userRecord") public R queryTestRecord(@RequestParam Integer page, @RequestParam Integer size, Integer month,String startTime,String endTime, - String condition, @RequestParam Integer status){ + String condition, @RequestParam Integer status,@RequestParam Integer schoolId){ ProjectRecordVo recordVo = new ProjectRecordVo(); if (status==1||status==2||status==3) {//限定实验状态 recordVo.setStatus(status); @@ -64,6 +64,7 @@ public class ClassTeachingController implements ClassTeachingApi { recordVo.setEndTime(endTime); } } + recordVo.setSchoolId(schoolId); PageUtils page1 = classTeachingService.queryClassRecord(page,size,recordVo); return R.ok().put("page", page1); } diff --git a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java index d6bb45b..b85d7b8 100644 --- a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java +++ b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java @@ -22,7 +22,7 @@ public interface AchievementManagementDao extends BaseMapper queryEvaluationReport(Page tPage, String searchContant, Integer projectId); @@ -46,5 +46,5 @@ public interface AchievementManagementDao extends BaseMapper queryPythonTest(Integer eventId); - void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId); + void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment); } diff --git a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java index 09c0fbb..411279e 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java @@ -96,5 +96,9 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable * 学生ID */ private Integer studentId; + /** + * 学校id + */ + private Integer schoolId; } diff --git a/src/main/java/com/msdw/tms/service/AchievementManagementService.java b/src/main/java/com/msdw/tms/service/AchievementManagementService.java index f195256..67d3bd0 100644 --- a/src/main/java/com/msdw/tms/service/AchievementManagementService.java +++ b/src/main/java/com/msdw/tms/service/AchievementManagementService.java @@ -17,7 +17,7 @@ public interface AchievementManagementService extends IService=60&&score<70){ + entity.setCommentId(2);//合格 + }else if (score>=70&&score<90){ + entity.setCommentId(3);//良好 + }else { + entity.setCommentId(4);//优秀 + } + }else { + return R.error("系统异常,成绩为空!"); + } //4.添加实验记录表信息 projectRecordDao.addReport(record);//保存至tms_project_record并返回主键 @@ -105,8 +119,8 @@ public class AchievementManagementServiceImpl extends ServiceImpl -UPDATE tms_experimental_report SET isSignature = #{isSignature} , signatureId = #{signatureId} WHERE reportId = #{reportId} +UPDATE tms_experimental_report SET isSignature = #{isSignature} , signatureId = #{signatureId}, `comment` = #{comment} WHERE reportId = #{reportId} - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE tms_experimental_teaching diff --git a/src/main/resources/mapper/tms/ExperimentalTeachingDao.xml b/src/main/resources/mapper/tms/ExperimentalTeachingDao.xml index 654330e..9add2b8 100644 --- a/src/main/resources/mapper/tms/ExperimentalTeachingDao.xml +++ b/src/main/resources/mapper/tms/ExperimentalTeachingDao.xml @@ -41,6 +41,10 @@ AND DATE_SUB(CURDATE(), INTERVAL #{exp.month} month ) <= date(creation_time) + + AND (user_id in (select userId FROM staff WHERE schoolId = #{exp.schoolId} AND isdel = 0 AND FIND_IN_SET(roleId,'1,2,3') ) + OR user_id IN ( SELECT userId FROM hr_user_info WHERE disableAccount = 0 AND isdel = 0 AND FIND_IN_SET( roleId, '1' ) ) ) + order by creation_time desc diff --git a/src/test/java/com/msdw/tms/service/AchievementManagementTest.java b/src/test/java/com/msdw/tms/service/AchievementManagementTest.java index be68d00..72e8d43 100644 --- a/src/test/java/com/msdw/tms/service/AchievementManagementTest.java +++ b/src/test/java/com/msdw/tms/service/AchievementManagementTest.java @@ -91,7 +91,7 @@ public class AchievementManagementTest { entity.setRecordid(recordId); vo.setReportId(reportId); vo.setEntity(entity); - R r = achievementManagementService.deleteReport(vo); + R r = achievementManagementService.deleteReport(reportId); System.out.println(r); }