From 082afc11bd23f3bc7f1ce573308e601e81d80d46 Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Wed, 3 Mar 2021 16:06:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E7=BB=A9=E7=AE=A1=E7=90=86=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=A0=E9=99=A4=EF=BC=8C=E6=88=90=E7=BB=A9=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=95=B0=E9=87=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msdw/tms/api/AchievementManagementApi.java | 7 ++++++- .../AchievementManagementController.java | 17 +++++++++++++++-- .../msdw/tms/dao/AchievementManagementDao.java | 6 +++++- .../service/AchievementManagementService.java | 5 ++++- .../impl/AchievementManagementServiceImpl.java | 14 ++++++++++++-- .../mapper/tms/AchievementManagementDao.xml | 17 +++++++++++++---- 6 files changed, 55 insertions(+), 11 deletions(-) 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