|
|
|
@ -7,10 +7,7 @@ import com.msdw.tms.common.utils.Constant; |
|
|
|
|
import com.msdw.tms.common.utils.PageUtils; |
|
|
|
|
import com.msdw.tms.common.utils.R; |
|
|
|
|
import com.msdw.tms.common.utils.poi.ExcelExportUtil; |
|
|
|
|
import com.msdw.tms.dao.AchievementManagementDao; |
|
|
|
|
import com.msdw.tms.dao.ExperimentalTeachingDao; |
|
|
|
|
import com.msdw.tms.dao.ProjectRecordDao; |
|
|
|
|
import com.msdw.tms.dao.UserInfoDao; |
|
|
|
|
import com.msdw.tms.dao.*; |
|
|
|
|
import com.msdw.tms.entity.*; |
|
|
|
|
import com.msdw.tms.entity.request.AchievementImportRequest; |
|
|
|
|
import com.msdw.tms.entity.request.ImportAssessmentRequest; |
|
|
|
@ -46,6 +43,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
@Autowired |
|
|
|
|
private UserInfoDao userInfoDao; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ProjectHiddenDao projectHiddenDao; |
|
|
|
|
|
|
|
|
|
//查询实验报告
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
@ -327,6 +327,11 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R deleteReportById(List<Integer> projectIds, Integer projectPermissions, List<Integer> ids) { |
|
|
|
|
|
|
|
|
|
ProjectHiddenEntity projectHiddenEntity = new ProjectHiddenEntity(); |
|
|
|
|
//projectHiddenEntity.setId(null);
|
|
|
|
|
int num = 0; |
|
|
|
|
|
|
|
|
|
if (projectPermissions == 1) {//实验教学
|
|
|
|
|
for (Integer id : ids) { |
|
|
|
|
List<AchievementManagementVO> teachAchievements = achievementManagementDao.getTeachAchievement(id); |
|
|
|
@ -335,6 +340,15 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
Integer recordId = teachAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId, recordId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//将教学实验隐藏
|
|
|
|
|
projectHiddenEntity.setTeachId(id); |
|
|
|
|
projectHiddenEntity.setIsHidden(1); |
|
|
|
|
num = projectHiddenDao.insert(projectHiddenEntity); |
|
|
|
|
if ( num <= 0){ |
|
|
|
|
R.error(400,"删除失败!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
for (Integer projectId : projectIds) {//虚仿实验
|
|
|
|
@ -344,6 +358,16 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan |
|
|
|
|
Integer recordId = imitationAchievement.getRecordId(); |
|
|
|
|
achievementManagementDao.deleteReport(reportId, recordId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//将虚仿项目隐藏
|
|
|
|
|
|
|
|
|
|
projectHiddenEntity.setProjectId(projectId); |
|
|
|
|
projectHiddenEntity.setIsHidden(1); |
|
|
|
|
num = projectHiddenDao.insert(projectHiddenEntity); |
|
|
|
|
if ( num <= 0){ |
|
|
|
|
R.error(400,"删除失败!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|