From a0bcfb01bb62e3738f1b33c290f39672c1ae6997 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 5 Mar 2021 11:04:08 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/tms/AchievementManagementDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index e20f17d..719e3cf 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -397,7 +397,7 @@ FROM hr_project_management hpm WHERE systemId = #{systemId} AND hpm.isdel = 0 - AND hpm.projectPer missions = + AND hpm.projectPermissions = #{projectPermissions} and hpm.projectName like concat('%',#{searchContant},'%') @@ -538,7 +538,7 @@ report.reportId, r.submitTime, stu.studentId, - t.id as projectId + t.id as projectId FROM tms_experimental_teaching t INNER JOIN tms_experimental_report report ON report.projectId = t.id INNER JOIN tms_project_record r ON r.recordId = report.eventId From 624b42785393140cb91c3c4edf605581c809315d Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 5 Mar 2021 14:07:50 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=88=90=E7=BB=A9=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/request/AchievementImportRequest.java | 12 ++++++------ .../impl/AchievementManagementServiceImpl.java | 2 +- ...成绩管理实验记录导出模板 (1).xlsx | Bin 0 -> 8911 bytes 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/excel-template/川大成绩管理实验记录导出模板 (1).xlsx diff --git a/src/main/java/com/msdw/tms/entity/request/AchievementImportRequest.java b/src/main/java/com/msdw/tms/entity/request/AchievementImportRequest.java index eb3bf1f..8c4751f 100644 --- a/src/main/java/com/msdw/tms/entity/request/AchievementImportRequest.java +++ b/src/main/java/com/msdw/tms/entity/request/AchievementImportRequest.java @@ -15,24 +15,24 @@ public class AchievementImportRequest { @ExcelAttribute(sort = 0) private String schoolName; - //实验班级 + /* //实验班级 @ExcelAttribute(sort = 1) - private String experimentalClassName; + private String experimentalClassName;*/ //学生姓名 - @ExcelAttribute(sort = 2) + @ExcelAttribute(sort = 1) private String userName; //学号 - @ExcelAttribute(sort = 3) + @ExcelAttribute(sort = 2) private String workNumber; //分数 - @ExcelAttribute(sort = 4) + @ExcelAttribute(sort = 3) private String score; //提交时间 - @ExcelAttribute(sort = 5) + @ExcelAttribute(sort = 4) private String submitTime; } diff --git a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java index bfc6608..7eae17b 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -199,7 +199,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl achievement = achievementManagementDao.queryAchievement(list); //2.加载模板流数据 - ClassPathResource resource = new ClassPathResource("excel-template/川大成绩管理实验记录导出模板.xlsx"); + ClassPathResource resource = new ClassPathResource("excel-template/川大成绩管理实验记录导出模板 (1).xlsx"); InputStream inputStream = resource.getInputStream(); //3、通过工具类下载文件 diff --git a/src/main/resources/excel-template/川大成绩管理实验记录导出模板 (1).xlsx b/src/main/resources/excel-template/川大成绩管理实验记录导出模板 (1).xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d5a57eb63313a93438e18d54e88a29af4c78e192 GIT binary patch literal 8911 zcmaJ{1yG#J(p}sM5ZocSI|K;siwD=B!QF!e_u%fXAwh$?dvJGmclaTB_vR+={%@*Q zYO8yC=FD_|UFW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ca212ec6f63 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 5 Mar 2021 14:30:11 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/tms/AchievementManagementDao.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index 719e3cf..8151688 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -397,9 +397,8 @@ FROM hr_project_management hpm WHERE systemId = #{systemId} AND hpm.isdel = 0 - AND hpm.projectPermissions = - #{projectPermissions} - + AND hpm.projectPermissions = #{projectPermissions} + and hpm.projectName like concat('%',#{searchContant},'%') and hpm.creationTime between @@ -548,10 +547,6 @@ WHERE t.id = #{id} AND t.is_del = 0 AND report.isdel = 0 - AND r.isdel = 0 - AND u.isdel = 0 - AND s.isdel = 0 - AND stu.isdel = 0; From cdf31a09f875d362d22227f168b26f603d50a138 Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Fri, 5 Mar 2021 15:08:29 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=95=99=E5=AD=A6=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=81=87=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tms/api/AchievementManagementApi.java | 6 ++++-- .../AchievementManagementController.java | 5 +++-- .../ExperimentalTeachingController.java | 3 ++- .../com/msdw/tms/dao/ClassTeachingDao.java | 2 ++ .../com/msdw/tms/entity/ResultsEntity.java | 2 ++ .../com/msdw/tms/entity/vo/ResultsVo.java | 2 ++ .../service/AchievementManagementService.java | 2 +- .../service/ExperimentalTeachingService.java | 1 + .../AchievementManagementServiceImpl.java | 19 +++++++++++++++++-- .../impl/ExperimentalTeachingServiceImpl.java | 10 ++++++++++ .../mapper/tms/AchievementManagementDao.xml | 14 ++++++-------- .../resources/mapper/tms/ClassTeachingDao.xml | 7 +++++++ .../mapper/tms/ExperimentalTeachingDao.xml | 2 +- 13 files changed, 58 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java index b6a7e74..4d36616 100644 --- a/src/main/java/com/msdw/tms/api/AchievementManagementApi.java +++ b/src/main/java/com/msdw/tms/api/AchievementManagementApi.java @@ -79,8 +79,10 @@ 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); + @ApiOperation(value = "成绩管理删除项目", notes = "将项目管理下的成绩管理删除") + R deleteReportById(@ApiParam(value = "项目id", required = true) Integer projectId, + @ApiParam(value = "项目类型(0练习,1考核)", required = true) Integer projectPermissions, + @ApiParam(value = "教学实验id",required = false) Integer id); @ApiOperation(value = "成绩管理:虚拟仿真实验成绩管理", notes = "成绩管理:虚拟仿真实验成绩管理") diff --git a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java index 4b027b8..d34e9bc 100644 --- a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java +++ b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java @@ -282,8 +282,9 @@ public class AchievementManagementController implements AchievementManagementApi */ @Override @PostMapping("/deleteReportById") - public R deleteReportByProjectId(@RequestParam Integer projectId) { - return service.deleteReportByProjectId(projectId); + public R deleteReportById(@RequestParam Integer projectId,@RequestParam Integer projectPermissions, + @RequestParam(required = false) Integer id) { + return service.deleteReportById(projectId,projectPermissions,id); } /** diff --git a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java index f070234..9b0d5ac 100644 --- a/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ExperimentalTeachingController.java @@ -124,7 +124,8 @@ public class ExperimentalTeachingController implements ExperimentalTeachingContr @Override @PostMapping("/delete") public R delete(@RequestBody Integer[] ids){ - experimentalTeachingService.removeByIds(Arrays.asList(ids)); + //改为假删除tms_experimental_teaching + experimentalTeachingService.deleteTeachByIds(Arrays.asList(ids)); return R.ok(); } diff --git a/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java b/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java index 5cbc435..3ad2f27 100644 --- a/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java +++ b/src/main/java/com/msdw/tms/dao/ClassTeachingDao.java @@ -26,4 +26,6 @@ public interface ClassTeachingDao { int updateExperimentalNumber(Integer number, Integer id); + + void updateIsDel(Integer id); } diff --git a/src/main/java/com/msdw/tms/entity/ResultsEntity.java b/src/main/java/com/msdw/tms/entity/ResultsEntity.java index 715cd3a..4ec085d 100644 --- a/src/main/java/com/msdw/tms/entity/ResultsEntity.java +++ b/src/main/java/com/msdw/tms/entity/ResultsEntity.java @@ -48,6 +48,8 @@ public class ResultsEntity{ //实验名称 private String experimentalName; + private Integer isdel; + } diff --git a/src/main/java/com/msdw/tms/entity/vo/ResultsVo.java b/src/main/java/com/msdw/tms/entity/vo/ResultsVo.java index 791c06e..cb68385 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ResultsVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ResultsVo.java @@ -40,4 +40,6 @@ public class ResultsVo { //用户id private Integer userId; + private Integer isdel; + } diff --git a/src/main/java/com/msdw/tms/service/AchievementManagementService.java b/src/main/java/com/msdw/tms/service/AchievementManagementService.java index 4b78743..b72c3d8 100644 --- a/src/main/java/com/msdw/tms/service/AchievementManagementService.java +++ b/src/main/java/com/msdw/tms/service/AchievementManagementService.java @@ -44,7 +44,7 @@ public interface AchievementManagementService extends IService getImitationAchievement(Integer projectId); diff --git a/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java b/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java index 3bea116..491c511 100644 --- a/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java +++ b/src/main/java/com/msdw/tms/service/ExperimentalTeachingService.java @@ -16,4 +16,5 @@ public interface ExperimentalTeachingService extends IService asList); } diff --git a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java index 7eae17b..545112a 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -284,9 +284,24 @@ public class AchievementManagementServiceImpl extends ServiceImpl teachAchievements = achievementManagementDao.getTeachAchievement(id); + for (AchievementManagementVO teachAchievement :teachAchievements) { + Integer reportId = teachAchievement.getReportId(); + Integer recordId = teachAchievement.getRecordId(); + achievementManagementDao.deleteReport(reportId,recordId); + } + }else { + List 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(); } diff --git a/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java index 0e6843f..73df989 100644 --- a/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ExperimentalTeachingServiceImpl.java @@ -15,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + @Service("experimentalTeachingService") public class ExperimentalTeachingServiceImpl extends ServiceImpl implements ExperimentalTeachingService { @@ -50,4 +52,12 @@ public class ExperimentalTeachingServiceImpl extends ServiceImpl asList) { + int size = asList.size(); + for (int i = 0; i < size; i++) { + classTeachingDao.updateIsDel(asList.get(i)); + } + } + } diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index 719e3cf..09d7a0f 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -393,13 +393,11 @@ + SELECT - id, - experimental_class_name, - experimental_name, - project_id, - project_name, - (select count(*) - from tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0) as experimental_number, - experiment_duration, - type, - start_time, - stop_time, - status, - invitation_code, - is_code, - user_id, - creation_time, - surplus_time + id, + experimental_class_name, + experimental_name, + project_id, + project_name, + ( SELECT count( * ) FROM tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0 ) AS experimental_number, + experiment_duration, + type, + start_time, + stop_time, + STATUS, + invitation_code, + is_code, + user_id, + creation_time, + surplus_time , + systemId FROM - tms_experimental_teaching + tms_experimental_teaching t + inner join hr_project_management m on m.projectId = t.project_id WHERE - is_del = 0 + t.is_del = 0 AND `type`=#{exp.type,jdbcType=INTEGER} From da395c66d796bc224e5eaedb706f6752e116d1cd Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Fri, 5 Mar 2021 16:19:29 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=95=99=E5=AD=A6=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E6=8A=A5=E5=91=8A=E6=95=B0=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AchievementManagementServiceImpl.java | 4 ++ .../mapper/tms/AchievementManagementDao.xml | 57 ++++++++++++++++++- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java index 3d2fa02..cae8f16 100644 --- a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -110,6 +110,10 @@ public class AchievementManagementServiceImpl extends ServiceImpl newList(ResultsVo vo, Integer page, Integer size) { List newList = achievementManagementDao.newList(vo); + for (ResultsEntity entity : newList) { + Integer number = achievementManagementDao.getTeachAchievement(entity.getId()).size(); + entity.setNumber(number); + } return newList; } diff --git a/src/main/resources/mapper/tms/AchievementManagementDao.xml b/src/main/resources/mapper/tms/AchievementManagementDao.xml index 5db3b8f..6be9400 100644 --- a/src/main/resources/mapper/tms/AchievementManagementDao.xml +++ b/src/main/resources/mapper/tms/AchievementManagementDao.xml @@ -432,6 +432,37 @@ ORDER BY hpm.creationTime DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - SELECT schoolName, experimental_class_name, @@ -568,7 +620,6 @@ INNER JOIN school s ON s.schoolId = u.schoolId INNER JOIN student stu ON stu.userId = u.userId WHERE t.id = #{id} - AND t.is_del = 0 AND report.isdel = 0 From c8e8056c217863e0cbc6338897f3f9fca1e59abf Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 5 Mar 2021 16:32:31 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E7=AB=AF=E5=AE=9E=E9=AA=8C=E6=80=BB=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/tms/ProjectRecordDao.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index 7695449..faa324a 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -113,6 +113,15 @@ tpr.submitTime DESC +