diff --git a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java index 3a43f0e..92d05d4 100644 --- a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java +++ b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java @@ -85,4 +85,8 @@ public interface AchievementManagementApi { @ApiOperation(value = "成绩管理:虚拟仿真实验成绩管理", notes = "成绩管理:虚拟仿真实验成绩管理") R getImitationAchievement(@ApiParam(value = "projectId", required = false) Integer projectId); + + @ApiOperation(value = "成绩管理:实验教学成绩管理", notes = "成绩管理:实验教学成绩管理") + R getTeachAchievement(@RequestParam(required = true) Integer id); + } diff --git a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java index 1d4e48f..05a12ef 100644 --- a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java +++ b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java @@ -287,4 +287,14 @@ public class AchievementManagementController implements AchievementManagementApi List result = service.getImitationAchievement(projectId); return R.ok().put("data", result); } + + /** + * 成绩管理:实验教学成绩管理 + */ + @Override + @GetMapping("/getTeachAchievement") + public R getTeachAchievement(@RequestParam(required = true) Integer id) { + List result = service.getTeachAchievement(id); + return R.ok().put("data", result); + } } diff --git a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java index 959ce8a..27286ba 100644 --- a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java +++ b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java @@ -77,4 +77,6 @@ public interface AchievementManagementDao extends BaseMapper getImitationAchievement(Integer projectId); + + List getTeachAchievement(Integer id); } diff --git a/src/main/java/com/msdw/tms/service/AchievementManagementService.java b/src/main/java/com/msdw/tms/service/AchievementManagementService.java index 2aad068..b3a8ea7 100644 --- a/src/main/java/com/msdw/tms/service/AchievementManagementService.java +++ b/src/main/java/com/msdw/tms/service/AchievementManagementService.java @@ -47,4 +47,6 @@ public interface AchievementManagementService extends IService getImitationAchievement(Integer projectId); + + List getTeachAchievement(Integer id); } diff --git a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java index 5b51925..a51cf8c 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -299,4 +299,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl getTeachAchievement(Integer id) { + return achievementManagementDao.getTeachAchievement(id); + } + } diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index b629038..669e2a1 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -82,10 +82,9 @@ - UPDATE tms_project_record tpr,hr_experimental_report tcr - SET tpr.isdel = 1, tcr.isdel = 1 - WHERE tpr.recordId = #{recordId} - AND tcr.reportId = #{reportId} + UPDATE tms_project_record tpr,tms_experimental_report ter + SET tpr.isdel = 1, ter.isdel = 1 + WHERE tpr.recordId = #{recordId} AND ter.reportId = #{reportId} UPDATE tms_experimental_report @@ -504,4 +503,23 @@ AND re.isdel = 0; + + \ No newline at end of file diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index 07900c6..b45954e 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -58,7 +58,8 @@ INNER JOIN hr_project_management t ON t.projectId = c.projectId INNER JOIN tms_project_record r ON r.recordId = c.recordId WHERE c.userId = #{userId} - and r.isdel = 0 +-- 教师端逻辑删除,学生端不做判断 +-- and r.isdel = 0 and projectPermissions = #{projectPermissions} and t.systemId = #{systemId} GROUP BY c.recordId desc @@ -82,7 +83,8 @@ LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id WHERE tpr.userId = #{pro.userid} - AND tpr.isdel = #{pro.isdel} +-- 教师端逻辑删除,学生端不做判断(下面这行删掉报错,用>=来表示不管0,1都让通过) + AND tpr.isdel >= #{pro.isdel} AND tp.projectPermissions !=0 AND ter.eventId = tpr.recordId