|
|
|
@ -301,9 +301,24 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R deleteReportByProjectId(Integer projectId) { |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
List<AchievementManagementVO> imitationAchievements = achievementManagementDao.getImitationAchievement(projectId); |
|
|
|
|
for (AchievementManagementVO imitationAchievement: imitationAchievements) { |
|
|
|
|
Integer reportId = imitationAchievement.getReportId(); |
|
|
|
|
Integer recordId = imitationAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId,recordId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
achievementManagementDao.deleteReportById(projectId); |
|
|
|
|
return R.ok(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|