diff --git a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java index d0f8240..2278016 100644 --- a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java +++ b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java @@ -51,8 +51,6 @@ public interface AchievementManagementDao extends BaseMapper queryEvaluationReport(Page tPage, String searchContant, Integer projectId); - //实验成绩管理查看成绩 统计平均分 - String getAVG(Integer projectId); List queryAchievement(@Param("ids") List ids); 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 f4cab69..bd56f57 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -182,12 +182,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl data = achievementManagementDao.queryEvaluationReport(tPage, searchContant, projectId); - String avg = achievementManagementDao.getAVG(projectId); - - PageUtils result = new PageUtils(data); - return R.ok().put("data", result).put("avg", avg); + return R.ok().put("data", result); } @Override diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index 2f1ce13..2c92eaf 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -132,8 +132,9 @@ LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId WHERE reportId = #{reportId} - + SELECT + r.reportId, + re.recordId, + sch.schoolName, + s.workNumber, + u.userName, + re.score, + re.submitTime, + r.eventId + FROM + tms_experimental_report r + INNER JOIN tms_experimental_teaching t ON t.id = r.projectId + INNER JOIN student s ON s.studentId = r.studentId + INNER JOIN school sch ON sch.schoolId = s.schoolId + INNER JOIN hr_user_info u ON u.userId = s.userId + INNER JOIN tms_project_record re ON re.projectId = t.project_id + WHERE + t.id = r.projectId + and r.eventId = re.recordId + AND r.projectId = #{projectId} + AND r.isdel = 0 + AND t.is_del = 0 + AND u.isdel = 0 + + AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%') + OR u.userName LIKE CONCAT('%',#{searchContant},'%') ) + + GROUP BY r.reportId DESC -