diff --git a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java index ac17681..8d9fff4 100644 --- a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java +++ b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java @@ -54,7 +54,7 @@ public interface AchievementManagementApi { // R updateScore(@ApiParam(value = "recordid和score") ProjectRecordEntity entity); @ApiOperation(value = "删除实验报告",notes = "根据实验记录主键reportId和实验报告主键recordId删除实验报告") - R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId); + R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId,@ApiParam(value = "实验报告主键",required = true) @RequestParam Integer recordId); @ApiOperation(value = "班级实验报告列表查询",notes = "班级实验报告列表查询") R queryEvaluationReport(@ApiParam(value = "搜索内容(学校名称/学生姓名)",required = false) String searchContant, @@ -78,4 +78,9 @@ public interface AchievementManagementApi { @ApiOperation(value = "发布成绩",notes = "发布成绩--修改教师签名") R updateSignatrue(@ApiParam(value = "实验报告主键reportId + 是否使用教师签名isSignature + 教师签名id signatureId + 教师评语comment") ExperimentalReportEntity entity); + + @ApiOperation(value = "成绩管理删除项目",notes = "将项目管理表isdel置1") + R deleteReportByProjectId(@ApiParam(value = "项目id",required = true) Integer projectId); + + } diff --git a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java index 066e934..932bf2f 100644 --- a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java +++ b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java @@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; /** @@ -193,8 +194,8 @@ public class AchievementManagementController implements AchievementManagementApi */ @Override @PostMapping("/deleteReport") - public R deleteReport(@RequestParam Integer reportId){ - R result = service.deleteReport(reportId); + public R deleteReport(@RequestParam Integer reportId,@RequestParam Integer recordId){ + R result = service.deleteReport(reportId,recordId); return result; } @@ -263,4 +264,16 @@ public class AchievementManagementController implements AchievementManagementApi service.updateSignatrue(entity); return R.ok(); } + + + /** + * 删除成绩管理中的项目 + * @param projectId + * @return + */ + @Override + @PostMapping("/deleteReportById") + public R deleteReportByProjectId(@RequestParam Integer projectId) { + return service.deleteReportByProjectId(projectId); + } } diff --git a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java index 08ff0f9..83b5ab9 100644 --- a/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java +++ b/src/main/java/com/msdw/tms/dao/AchievementManagementDao.java @@ -16,6 +16,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.poi.ss.formula.functions.T; +import java.util.ArrayList; import java.util.List; @Mapper @@ -47,7 +48,7 @@ public interface AchievementManagementDao extends BaseMapper queryEvaluationReport(Page tPage, String searchContant, Integer projectId); @@ -72,4 +73,7 @@ public interface AchievementManagementDao extends BaseMapper queryPythonTest(Integer eventId); void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment); + + + void deleteReportById(Integer projectId); } diff --git a/src/main/java/com/msdw/tms/service/AchievementManagementService.java b/src/main/java/com/msdw/tms/service/AchievementManagementService.java index 761809e..ebeb83d 100644 --- a/src/main/java/com/msdw/tms/service/AchievementManagementService.java +++ b/src/main/java/com/msdw/tms/service/AchievementManagementService.java @@ -9,6 +9,7 @@ import com.msdw.tms.entity.ResultsEntity; import com.msdw.tms.entity.vo.ResultsVo; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; public interface AchievementManagementService extends IService { @@ -30,7 +31,7 @@ public interface AchievementManagementService extends IService UPDATE tms_project_record tpr,hr_experimental_report tcr SET tpr.isdel = 1, tcr.isdel = 1 - WHERE tpr.recordId = tcr.eventId AND tcr.reportId = #{reportId} + WHERE tpr.recordId = #{recordId} AND tcr.reportId = #{reportId} UPDATE tms_experimental_report @@ -359,8 +359,9 @@ + + + + UPDATE hr_project_management + SET hr_project_management.isdel = 1 + WHERE hr_project_management.projectId = #{projectId} + + \ No newline at end of file