diff --git a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java index 46004bd..c9f48eb 100644 --- a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java +++ b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java @@ -56,7 +56,7 @@ public interface AchievementManagementDao extends BaseMapper queryAchievement(@Param("ids") List ids); //导出考核 - List queryAchievementByAssessment(Integer id); + List queryAchievementByAssessment(@Param("ids") List ids); List queryFictitiousRecord(Integer systemId, String searchContant, String startingtime, String endtime, Integer month, List projectIds); 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 958d62c..7dbd78c 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -247,6 +247,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl assessment = achievementManagementDao.queryAchievementByAssessment(id); + /*List assessment = null; + for (Integer id : list) { + assessment = achievementManagementDao.queryAchievementByAssessment(id); + }*/ + //Integer id = Integer.valueOf(list.get(0)); + List assessment = achievementManagementDao.queryAchievementByAssessment(list); //2.加载模板流数据 ClassPathResource resource1 = new ClassPathResource("excel-template/川大成绩管理实验记录导出模板 (2).xlsx"); diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index 9479928..553bce1 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -239,27 +239,34 @@ - SELECT schoolName, - experimental_class_name, - userName, - workNumber, - r.score, - r.recordId, - report.reportId, - r.submitTime, - stu.studentId, - t.id AS projectId, - experimental_name AS experimentalName + experimental_class_name, + userName, + workNumber, + r.score, + r.recordId, + report.reportId, + r.submitTime, + stu.studentId, + t.id AS projectId, + experimental_name AS experimentalName FROM tms_experimental_teaching t - INNER JOIN tms_experimental_report report ON report.projectId = t.id - INNER JOIN tms_project_record r ON r.recordId = report.eventId - INNER JOIN hr_user_info u ON u.userId = r.userId - INNER JOIN school s ON s.schoolId = u.schoolId - INNER JOIN student stu ON stu.userId = u.userId - WHERE t.id = #{id} - AND report.isdel = 0 + INNER JOIN tms_experimental_report report ON report.projectId = t.id + INNER JOIN tms_project_record r ON r.recordId = report.eventId + INNER JOIN hr_user_info u ON u.userId = r.userId + INNER JOIN school s ON s.schoolId = u.schoolId + INNER JOIN student stu ON stu.userId = u.userId + WHERE + + r.recordId IN ( + + #{recordId} + + ) + + + AND report.isdel = 0