|
|
|
@ -305,20 +305,24 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R deleteReportById(Integer projectId,Integer projectPermissions, Integer id) { |
|
|
|
|
if (id != null && projectPermissions == 1){ |
|
|
|
|
List<AchievementManagementVO> teachAchievements = achievementManagementDao.getTeachAchievement(id); |
|
|
|
|
for (AchievementManagementVO teachAchievement :teachAchievements) { |
|
|
|
|
Integer reportId = teachAchievement.getReportId(); |
|
|
|
|
Integer recordId = teachAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId,recordId); |
|
|
|
|
public R deleteReportById(List<Integer> projectIds,Integer projectPermissions, List<Integer> ids) { |
|
|
|
|
if (projectPermissions == 1){//实验教学
|
|
|
|
|
for (Integer id: ids) { |
|
|
|
|
List<AchievementManagementVO> teachAchievements = achievementManagementDao.getTeachAchievement(id); |
|
|
|
|
for (AchievementManagementVO teachAchievement : teachAchievements) { |
|
|
|
|
Integer reportId = teachAchievement.getReportId(); |
|
|
|
|
Integer recordId = teachAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId, recordId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
List<AchievementManagementVO> imitationAchievements = achievementManagementDao.getImitationAchievement(projectId); |
|
|
|
|
for (AchievementManagementVO imitationAchievement: imitationAchievements) { |
|
|
|
|
Integer reportId = imitationAchievement.getReportId(); |
|
|
|
|
Integer recordId = imitationAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId,recordId); |
|
|
|
|
for (Integer projectId: projectIds) {//虚仿实验
|
|
|
|
|
List<AchievementManagementVO> imitationAchievements = achievementManagementDao.getImitationAchievement(projectId); |
|
|
|
|
for (AchievementManagementVO imitationAchievement: imitationAchievements) { |
|
|
|
|
Integer reportId = imitationAchievement.getReportId(); |
|
|
|
|
Integer recordId = imitationAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId,recordId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|