From bae32e760552104c060dc0ea564d91351c18f761 Mon Sep 17 00:00:00 2001 From: mzh820631607 Date: Thu, 12 Nov 2020 15:38:54 +0800 Subject: [PATCH] =?UTF-8?q?0.3=E6=95=99=E5=AD=A6=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/msdw/tms/api/ClassTeachingApi.java | 15 ++- .../msdw/tms/api/QuestionsControllerApi.java | 5 - .../msdw/tms/api/StudentControllerApi.java | 3 + .../com/msdw/tms/api/SystemSetttingApi.java | 5 + .../AchievementManagementController.java | 13 +++ .../controller/ClassTeachingController.java | 22 ++++- .../tms/controller/QuestionsController.java | 62 +----------- .../tms/controller/StudentController.java | 19 +++- .../controller/SystemSettingController.java | 15 ++- .../tms/controller/UserInfoController.java | 2 +- .../tms/dao/AchievementManagementDao.java | 7 ++ .../com/msdw/tms/dao/ClassTeachingDao.java | 4 + .../msdw/tms/dao/ExperimentalReportDao.java | 4 +- .../java/com/msdw/tms/dao/QuestionsDao.java | 2 + .../java/com/msdw/tms/dao/StudentDao.java | 2 + .../com/msdw/tms/dao/SystemSetttingDao.java | 2 + .../java/com/msdw/tms/dao/UserInfoDao.java | 6 +- .../entity/AchievementManagementEntity.java | 14 +++ .../tms/entity/vo/ExperimentalReportVo.java | 3 + .../msdw/tms/entity/vo/ProjectRecordVo.java | 41 ++------ .../java/com/msdw/tms/entity/vo/RulesVo.java | 18 ---- .../com/msdw/tms/entity/vo/StaffExportVo.java | 8 +- .../service/AchievementManagementService.java | 4 + .../service/ExperimentalReportService.java | 4 +- .../msdw/tms/service/QuestionsService.java | 15 +-- .../com/msdw/tms/service/StudentService.java | 3 + .../tms/service/SystemSetttingService.java | 2 + .../com/msdw/tms/service/UserInfoService.java | 2 +- .../AchievementManagementServiceImpl.java | 14 +++ .../impl/ClassTeachingServiceImpl.java | 2 + .../impl/ExperimentalReportServiceImpl.java | 15 ++- .../impl/ExperimentalTeachingServiceImpl.java | 4 + .../service/impl/QuestionsServiceImpl.java | 81 ++++++++++++---- .../tms/service/impl/StudentServiceImpl.java | 87 ++++------------- .../impl/SystemSettingServiceImpl.java | 37 +++++-- .../tms/service/impl/UserInfoServiceImpl.java | 6 +- .../虚拟仿真实验报告导出模板.xlsx | Bin 10321 -> 10315 bytes .../mapper/tms/AchievementManagementDao.xml | 5 + .../resources/mapper/tms/ClassTeachingDao.xml | 22 +++++ .../mapper/tms/ExperimentalReportDao.xml | 32 ++++++- .../resources/mapper/tms/ProjectRecordDao.xml | 47 +++++---- .../resources/mapper/tms/QuestionsDao.xml | 4 +- src/main/resources/mapper/tms/StudentDao.xml | 24 ++++- .../resources/mapper/tms/SystemSetting.xml | 90 +++++++++++------- src/main/resources/mapper/tms/UserInfoDao.xml | 14 +-- 45 files changed, 465 insertions(+), 321 deletions(-) create mode 100644 src/main/java/com/msdw/tms/controller/AchievementManagementController.java create mode 100644 src/main/java/com/msdw/tms/dao/AchievementManagementDao.java create mode 100644 src/main/java/com/msdw/tms/entity/AchievementManagementEntity.java delete mode 100644 src/main/java/com/msdw/tms/entity/vo/RulesVo.java create mode 100644 src/main/java/com/msdw/tms/service/AchievementManagementService.java create mode 100644 src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java create mode 100644 src/main/resources/mapper/tms/AchievementManagementDao.xml diff --git a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java index 435b437..4efd927 100644 --- a/src/main/java/com/msdw/tms/api/ClassTeachingApi.java +++ b/src/main/java/com/msdw/tms/api/ClassTeachingApi.java @@ -3,9 +3,12 @@ package com.msdw.tms.api; import com.msdw.tms.common.utils.R; import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity; +import com.msdw.tms.entity.vo.ExperimentalReportVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; @Api(value = "用户端班级实验", tags = "用户端班级实验信息") public interface ClassTeachingApi { @@ -23,8 +26,14 @@ public interface ClassTeachingApi { R querySimulationPlayList(Integer page,Integer size); @ApiOperation(value = "校验是否需要邀请码",notes = "校验是否需要邀请码") - R check(Integer userId,Integer projectId); + R check(@ApiParam(value = "用户id",required = true) Integer userId,@ApiParam(value = "项目id",required = true) Integer projectId); - @ApiOperation(value = "查看实验报告",notes = "查看实验报告") - R queryExperimentalReport(ExperimentalReportEntity entity); + @ApiOperation(value = "查看教学实验报告",notes = "查看教学实验报告") + R queryExperimentalReport(@ApiParam(value = "学生id",required = true) Integer studentId, + @ApiParam(value = "项目id",required = true) Integer projectId, + @ApiParam(value = "实验记录主键",required = true) Integer recordId, + @ApiParam(value = "实验报告主键",required = true) Integer reportId); + + @ApiOperation(value = "查看虚拟实验报告",notes = "查看虚拟实验报告") + R queryVirtualReport(@ApiParam(value = "实验记录主键",required = true) Integer recordId); } diff --git a/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java b/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java index 2d67884..452ea20 100644 --- a/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java +++ b/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java @@ -4,7 +4,6 @@ import com.msdw.tms.common.utils.R; import com.msdw.tms.entity.request.QuestionsAddRequest; import com.msdw.tms.entity.request.QuestionsQueryRequest; import com.msdw.tms.entity.request.QuestionsUpdateRequest; -import com.msdw.tms.entity.vo.RulesVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -52,12 +51,8 @@ public interface QuestionsControllerApi { /** * 是否禁用试题 */ -// @ApiOperation(value = "是否禁用试题", notes = "是否禁用试题") -// R isNable(RulesVo rulesVo); @ApiOperation(value = "是否禁用试题", notes = "是否禁用试题") R isNable(@ApiParam(name = "id", value = "试题主键", required = true) List idList); -// 2020.09.18 -// R isNable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id); /** * 删除 diff --git a/src/main/java/com/msdw/tms/api/StudentControllerApi.java b/src/main/java/com/msdw/tms/api/StudentControllerApi.java index 9efac77..8289ad3 100644 --- a/src/main/java/com/msdw/tms/api/StudentControllerApi.java +++ b/src/main/java/com/msdw/tms/api/StudentControllerApi.java @@ -41,4 +41,7 @@ public interface StudentControllerApi { @ApiOperation(value = "导入学生失败原因导出",notes = "导入学生失败原因导出") public void exportFailureRecord(HttpServletResponse response, String token) throws Exception; + + @ApiOperation(value = "查询账号信息",notes = "查询账号信息") + public R queryAccount(String account,Integer schoolId); } diff --git a/src/main/java/com/msdw/tms/api/SystemSetttingApi.java b/src/main/java/com/msdw/tms/api/SystemSetttingApi.java index c4300d4..85fe3c9 100644 --- a/src/main/java/com/msdw/tms/api/SystemSetttingApi.java +++ b/src/main/java/com/msdw/tms/api/SystemSetttingApi.java @@ -45,4 +45,9 @@ public interface SystemSetttingApi { @ApiOperation(value = "导入员工失败原因导出",notes = "导入员工失败原因导出") public void exportFailureRecord(HttpServletResponse response, String token) throws Exception; + + @ApiOperation(value = "查询账号信息",notes = "查询账号信息") + public R queryAccount(String account,Integer schoolId); } + + diff --git a/src/main/java/com/msdw/tms/controller/AchievementManagementController.java b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java new file mode 100644 index 0000000..e35cb28 --- /dev/null +++ b/src/main/java/com/msdw/tms/controller/AchievementManagementController.java @@ -0,0 +1,13 @@ +package com.msdw.tms.controller; + +import com.msdw.tms.service.AchievementManagementService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +@RestController +@RequestMapping("/Achievement") +public class AchievementManagementController { + + @Autowired + private AchievementManagementService achievementManagementService; +} diff --git a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java index 98de3b0..fea92d9 100644 --- a/src/main/java/com/msdw/tms/controller/ClassTeachingController.java +++ b/src/main/java/com/msdw/tms/controller/ClassTeachingController.java @@ -6,6 +6,7 @@ import com.msdw.tms.common.utils.R; import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalStudentEntity; import com.msdw.tms.entity.ExperimentalTeachingEntity; +import com.msdw.tms.entity.vo.ExperimentalReportVo; import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.service.ClassTeachingService; import com.msdw.tms.service.ExperimentalReportService; @@ -151,11 +152,24 @@ public class ClassTeachingController implements ClassTeachingApi { * @return */ @Override - @PostMapping("/queryExperimentalReport") - public R queryExperimentalReport(@RequestBody ExperimentalReportEntity entity){ + @GetMapping("/queryExperimentalReport") + public R queryExperimentalReport(@RequestParam Integer studentId,@RequestParam Integer projectId,@RequestParam Integer recordId,@RequestParam Integer reportId){ +// public R queryExperimentalReport(@RequestBody ExperimentalReportVo entity){ + ExperimentalReportVo entity = new ExperimentalReportVo(); + R result = experimentalReportService.queryReport(studentId,projectId,recordId,reportId); - R result = experimentalReportService.queryReport(entity); + return result; + } - return R.ok().put("data",result); + /** + * 学生查看虚拟实验报告 + * @param entity + * @return + */ + @Override + @GetMapping("/queryVirtualReport") + public R queryVirtualReport(@RequestParam Integer recordId){ + R result = experimentalReportService.queryVirtualReport(recordId); + return result; } } diff --git a/src/main/java/com/msdw/tms/controller/QuestionsController.java b/src/main/java/com/msdw/tms/controller/QuestionsController.java index b4402e2..1e223b6 100644 --- a/src/main/java/com/msdw/tms/controller/QuestionsController.java +++ b/src/main/java/com/msdw/tms/controller/QuestionsController.java @@ -1,20 +1,13 @@ package com.msdw.tms.controller; import com.msdw.tms.api.QuestionsControllerApi; -import com.msdw.tms.common.exception.ExceptionCast; -import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.FilesResult; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; -import com.msdw.tms.entity.EvaluationRulesEntity; -import com.msdw.tms.entity.QuestionsEntity; import com.msdw.tms.entity.request.QuestionsAddRequest; import com.msdw.tms.entity.request.QuestionsQueryRequest; import com.msdw.tms.entity.request.QuestionsUpdateRequest; -import com.msdw.tms.entity.response.CommonCode; -import com.msdw.tms.entity.vo.EvaluationVO; import com.msdw.tms.entity.vo.QuestionsDetailVO; -import com.msdw.tms.entity.vo.RulesVo; import com.msdw.tms.service.QuestionsService; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; @@ -98,62 +91,11 @@ public class QuestionsController implements QuestionsControllerApi { */ @Override @PutMapping("/isenable") -// public R isNable(@RequestBody Integer id) { public R isNable(@RequestBody List idList) { Integer id = idList.get(0); - boolean b = questionsService.isEnable(id); - - return b ? R.ok() : R.error(); + R result = questionsService.isEnable(id); + return result; } - -// /** -// * 是否禁用试题 -// */ -// @Override -// @PutMapping("/isenable") -//// 2020.09.18 -//// @RequiresPermissions("qms:questions:isenable") -//// public R isNable(@RequestBody Integer id) { -// public R isNable(@RequestBody RulesVo rules) { -//// public R isNable(@RequestBody List idList) { -//// Integer id = idList.get(0); -// QuestionsEntity questionsEntity = new QuestionsEntity(); -// Integer id = rules.getQuestionId(); -// questionsEntity.setId(id); -// QuestionsEntity byId = questionsService.getById(id); -// int rulesNumber = rules.getQuestionsNumber(); -// if (byId.getIsEnable().equals(Constant.IsEnable.ENABLE.getType())) { -// Integer types = rules.getTypes(); -//// String questionsTypes= types==1 ? "single_num" : (types==2 ? "multiple_num":"judgment_num");//根据题型获取数据库字段名 -// EvaluationRulesEntity rule = questionsService.queryNumberOfTatolQuestions(); -// int num = 0; -// if (types==1){ -// num += rule.getSingleNum(); -// }else if (types==2){ -// num += rule.getMultipleNum(); -// }else if (types==3){ -// num += rule.getJudgmentNum(); -// } -// if (num querySimulationPlayList(Page page1); void updateSurplusTimeUp(ProjectRecordVo recordVo); + + void updateSurplusTimeLe(ProjectRecordVo recordVo); + + void updateSurplusTimeGt(ProjectRecordVo recordVo); } diff --git a/src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java b/src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java index 387daf4..f30aa92 100644 --- a/src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java +++ b/src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java @@ -9,5 +9,7 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ExperimentalReportDao extends BaseMapper { - ExperimentalReportVo queryReport(ExperimentalReportEntity entity); + ExperimentalReportVo queryReport(ExperimentalReportVo entity); + + ExperimentalReportVo queryVirtualReport(Integer recordId); } diff --git a/src/main/java/com/msdw/tms/dao/QuestionsDao.java b/src/main/java/com/msdw/tms/dao/QuestionsDao.java index a5399e1..56b05db 100644 --- a/src/main/java/com/msdw/tms/dao/QuestionsDao.java +++ b/src/main/java/com/msdw/tms/dao/QuestionsDao.java @@ -30,4 +30,6 @@ public interface QuestionsDao extends BaseMapper { EvaluationRulesEntity queryNumberOfTatolQuestions(); + Integer queryQuestionNumber(Integer number); + } diff --git a/src/main/java/com/msdw/tms/dao/StudentDao.java b/src/main/java/com/msdw/tms/dao/StudentDao.java index ba5f2ee..5964c93 100644 --- a/src/main/java/com/msdw/tms/dao/StudentDao.java +++ b/src/main/java/com/msdw/tms/dao/StudentDao.java @@ -33,4 +33,6 @@ public interface StudentDao extends BaseMapper { int bacthAddStudents(List students); int querySchoolAppellationName(String schoolAppellationName); + + List queryAccount(String account,Integer schoolId); } diff --git a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java index 5c8612f..7e6848d 100644 --- a/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java +++ b/src/main/java/com/msdw/tms/dao/SystemSetttingDao.java @@ -55,4 +55,6 @@ public interface SystemSetttingDao { Integer queryDepartmentNameOrganization(String staffProfessionalArchitectureName,Integer schoolId); List judgmentGrade(String name,Integer schoolId); + + List queryAccount(String account,Integer schoolId); } diff --git a/src/main/java/com/msdw/tms/dao/UserInfoDao.java b/src/main/java/com/msdw/tms/dao/UserInfoDao.java index 4840745..02353c3 100644 --- a/src/main/java/com/msdw/tms/dao/UserInfoDao.java +++ b/src/main/java/com/msdw/tms/dao/UserInfoDao.java @@ -25,9 +25,9 @@ public interface UserInfoDao extends BaseMapper { Integer disableAccount(StudentVo studentIds); - List queryStudentAccount(String account, Integer schoolId); + List queryStudentAccount(String account); - List queryStudentPhone(String phone, Integer schoolId); + List queryStudentPhone(String phone); // int bacthAddStudents(List students); @@ -39,8 +39,6 @@ public interface UserInfoDao extends BaseMapper { List queryPhone(String phone); -// List queryAccount(String account); - List queryAccount(String account); StaffVo queryAccountUpdate(Integer userId); diff --git a/src/main/java/com/msdw/tms/entity/AchievementManagementEntity.java b/src/main/java/com/msdw/tms/entity/AchievementManagementEntity.java new file mode 100644 index 0000000..35523c2 --- /dev/null +++ b/src/main/java/com/msdw/tms/entity/AchievementManagementEntity.java @@ -0,0 +1,14 @@ +package com.msdw.tms.entity; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 成绩管理/川大 + */ +@Data +@Accessors(chain = true) +public class AchievementManagementEntity { + + +} diff --git a/src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java b/src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java index 4142b39..1ad85b2 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java @@ -28,4 +28,7 @@ public class ExperimentalReportVo extends ExperimentalReportEntity { private String submitTime; //实验成绩 private Integer score; + //试验记录id(实验记录表主键) + private Integer recordId; + } diff --git a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java index b35683b..2ed4e36 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java @@ -1,6 +1,5 @@ package com.msdw.tms.entity.vo; -import com.msdw.tms.entity.ExperimentalTeachingEntity; import com.msdw.tms.entity.ProjectRecordEntity; import lombok.Data; import lombok.experimental.Accessors; @@ -12,8 +11,17 @@ import java.util.List; @Accessors(chain = true) public class ProjectRecordVo extends ProjectRecordEntity implements Serializable { + + /** + * 实验项目id + */ + private Integer id; + /** + * 教学实验主键id + */ + private Integer reportId; /** - * 实验项目名称 + * 项目名称 */ private String projectName; /** @@ -89,33 +97,4 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable */ private Integer studentId; -// /** -// * 班级实验状态,0 不限,1 未发布,2 进行中,3 已完成 -// */ -// private Integer experimentStartus; -// /** -// /** -// * 实验项目id -// */ -// private Integer projectid; -// /** -// * 实验项目名称 -// */ -// private String projectname; -// /** -// * 实验目标 -// */ -// private String projecttarget; -// /** -// * 实验描述 -// */ -// private String projectdescribe; -// /** -// * 实验描述(0开启 1未开启) -// */ -// private Integer isprojectdata; -// /** -// * 实验提示 -// */ -// private String projecttips; } diff --git a/src/main/java/com/msdw/tms/entity/vo/RulesVo.java b/src/main/java/com/msdw/tms/entity/vo/RulesVo.java deleted file mode 100644 index 8fb7d77..0000000 --- a/src/main/java/com/msdw/tms/entity/vo/RulesVo.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.msdw.tms.entity.vo; - -import lombok.Data; -import lombok.experimental.Accessors; - -@Data -@Accessors(chain = true) -public class RulesVo { - //题型(1单选2多选3判断) - private Integer types; - //试题数量 - private Integer questionsNumber; - //测评对应该试题数量 -// private int rulesNumber; - //试题id - private Integer questionId; - -} diff --git a/src/main/java/com/msdw/tms/entity/vo/StaffExportVo.java b/src/main/java/com/msdw/tms/entity/vo/StaffExportVo.java index 6c149ef..cb8bc10 100644 --- a/src/main/java/com/msdw/tms/entity/vo/StaffExportVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/StaffExportVo.java @@ -30,19 +30,19 @@ public class StaffExportVo { private String workNumber; //管理员专业名称 - @ExcelAttribute(sort = 4) + @ExcelAttribute(sort = 5) private String staffGradeName; //管理员组织架构名称 - @ExcelAttribute(sort = 5) + @ExcelAttribute(sort = 4) private String staffProfessionalArchitectureName; //老师专业组织名称 - @ExcelAttribute(sort = 6) + @ExcelAttribute(sort = 7) private String staffGradeNameTwo; //老师组织架构名称 - @ExcelAttribute(sort = 7) + @ExcelAttribute(sort = 6) private String staffProfessionalArchitectureNameTwo; //手机号码 diff --git a/src/main/java/com/msdw/tms/service/AchievementManagementService.java b/src/main/java/com/msdw/tms/service/AchievementManagementService.java new file mode 100644 index 0000000..77109c5 --- /dev/null +++ b/src/main/java/com/msdw/tms/service/AchievementManagementService.java @@ -0,0 +1,4 @@ +package com.msdw.tms.service; + +public interface AchievementManagementService { +} diff --git a/src/main/java/com/msdw/tms/service/ExperimentalReportService.java b/src/main/java/com/msdw/tms/service/ExperimentalReportService.java index 74f2f5a..716c5fb 100644 --- a/src/main/java/com/msdw/tms/service/ExperimentalReportService.java +++ b/src/main/java/com/msdw/tms/service/ExperimentalReportService.java @@ -8,5 +8,7 @@ import com.msdw.tms.entity.vo.ExperimentalReportVo; public interface ExperimentalReportService extends IService { - R queryReport(ExperimentalReportEntity entity); + R queryReport(Integer studentId,Integer projectId,Integer recordId,Integer reportId); + + R queryVirtualReport(Integer recordId); } diff --git a/src/main/java/com/msdw/tms/service/QuestionsService.java b/src/main/java/com/msdw/tms/service/QuestionsService.java index 54698a4..40164f1 100644 --- a/src/main/java/com/msdw/tms/service/QuestionsService.java +++ b/src/main/java/com/msdw/tms/service/QuestionsService.java @@ -4,15 +4,12 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.msdw.tms.common.utils.FilesResult; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; -import com.msdw.tms.entity.EvaluationRulesEntity; import com.msdw.tms.entity.QuestionsEntity; import com.msdw.tms.entity.request.QuestionsAddRequest; import com.msdw.tms.entity.request.QuestionsQueryRequest; import com.msdw.tms.entity.request.QuestionsUpdateRequest; import com.msdw.tms.entity.vo.EvaluationVO; import com.msdw.tms.entity.vo.QuestionsDetailVO; -import com.msdw.tms.entity.vo.RulesVo; -import org.apache.tomcat.util.digester.Rules; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -37,7 +34,7 @@ public interface QuestionsService extends IService { boolean updateQuestionById(QuestionsUpdateRequest questions); - boolean isEnable(Integer id); +// boolean isEnable(Integer id); Map importQuestion(MultipartFile file) throws IOException; @@ -53,14 +50,8 @@ public interface QuestionsService extends IService { void exportFailureRecord(HttpServletResponse response, String token) throws Exception; + boolean deleteByIds(List asList); - - -// EvaluationRulesEntity queryNumberOfQuestions(); -// boolean isEnable(RulesVo rules,QuestionsEntity questionsEntity); -boolean deleteByIds(List asList); -//测评设置是否禁用试题 -// EvaluationRulesEntity queryNumberOfTatolQuestions(); - + R isEnable(Integer id); } diff --git a/src/main/java/com/msdw/tms/service/StudentService.java b/src/main/java/com/msdw/tms/service/StudentService.java index 58259c6..c9f1a46 100644 --- a/src/main/java/com/msdw/tms/service/StudentService.java +++ b/src/main/java/com/msdw/tms/service/StudentService.java @@ -35,4 +35,7 @@ public interface StudentService extends IService{ Map upload(MultipartFile file, Integer schoolId) throws IOException; void exportFailureRecord(HttpServletResponse response,String token) throws Exception; + + R queryAccount(String account,Integer schoolId); + } diff --git a/src/main/java/com/msdw/tms/service/SystemSetttingService.java b/src/main/java/com/msdw/tms/service/SystemSetttingService.java index 67d3f2d..6bd9838 100644 --- a/src/main/java/com/msdw/tms/service/SystemSetttingService.java +++ b/src/main/java/com/msdw/tms/service/SystemSetttingService.java @@ -32,4 +32,6 @@ public interface SystemSetttingService { void exportFailureRecord(HttpServletResponse response, String token) throws Exception; void downloadFiles(HttpServletResponse response) throws IOException; + + R queryAccount(String account,Integer schoolId); } diff --git a/src/main/java/com/msdw/tms/service/UserInfoService.java b/src/main/java/com/msdw/tms/service/UserInfoService.java index 24631dc..98dd39d 100644 --- a/src/main/java/com/msdw/tms/service/UserInfoService.java +++ b/src/main/java/com/msdw/tms/service/UserInfoService.java @@ -29,7 +29,7 @@ public interface UserInfoService extends IService { Integer queryStudentAccount(String account,Integer schoolId); - Integer queryStudentPhone(String phone,Integer schoolId); + Integer queryStudentPhone(String phone); HashMap queryUserInfo(Integer id); diff --git a/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java new file mode 100644 index 0000000..f699b41 --- /dev/null +++ b/src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java @@ -0,0 +1,14 @@ +package com.msdw.tms.service.impl; + +import com.msdw.tms.dao.AchievementManagementDao; +import com.msdw.tms.service.AchievementManagementService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AchievementManagementServiceImpl implements AchievementManagementService { + + @Autowired + private AchievementManagementDao achievementManagementDao; + +} diff --git a/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java index 2b64460..db7039c 100644 --- a/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java @@ -42,6 +42,8 @@ public class ClassTeachingServiceImpl implements ClassTeachingService { this.classMapper.updateSurplusTimeNull(recordVo);//将已结束的实验的倒计时重置为0 this.classMapper.updateSurplusTime(recordVo);//倒计时:设定倒计时的剩余时间 this.classMapper.updateSurplusTimeUp(recordVo);//倒计时:设定距离实验开始的剩余时间 + this.classMapper.updateSurplusTimeLe(recordVo); + this.classMapper.updateSurplusTimeGt(recordVo); IPage schoolRecord = this.classMapper.getByClassRecord(page1, recordVo); PageUtils pageUtils = new PageUtils(schoolRecord); return pageUtils; diff --git a/src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java index 111f075..3ce92b1 100644 --- a/src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java @@ -9,6 +9,7 @@ import com.msdw.tms.dao.ExperimentalTeachingDao; import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.vo.ExperimentalReportVo; import com.msdw.tms.service.ExperimentalReportService; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,13 +20,17 @@ public class ExperimentalReportServiceImpl extends ServiceImpl30天" + classTeachingDao.updateSurplusTimeGt(recordVo);//将剩余时间大于30天的记录的倒计时设置为'838:00:00',前端转为">30天" + Page page1 = new Page<>(page, size); ExperimentalTeachingDao userDao = this.getBaseMapper(); diff --git a/src/main/java/com/msdw/tms/service/impl/QuestionsServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/QuestionsServiceImpl.java index ab1195f..12f500c 100644 --- a/src/main/java/com/msdw/tms/service/impl/QuestionsServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/QuestionsServiceImpl.java @@ -56,6 +56,9 @@ public class QuestionsServiceImpl extends ServiceImpl im StudentVo studentVo = new StudentVo(); String schoolAppellationName = student.getSchoolAppellationName(); List result1 = studentDao.queryStudentIdNumber(workNumber,schoolId); - List result4 = userInfoDao.queryStudentAccount(account, schoolId); + List result4 = userInfoDao.queryStudentAccount(account); String email = student.getEmail(); if (phone!=null&&phone!=""){ - List result2 = userInfoDao.queryStudentPhone(phone, schoolId); - if (result2.size()==1){ + List result2 = userInfoDao.queryStudentPhone(phone); + if (result2.size()>=1){ log.error("该号码已被使用"); StudentImportFailureVo vo = new StudentImportFailureVo(); ++ii; @@ -182,7 +183,7 @@ public class StudentServiceImpl extends ServiceImpl im ; studentVo.setAccount(student.getAccount()).setSchoolAppellationName(schoolAppellationName).setUserName(student.getUserName()).setIsdel(Constant.IsDel.NOT_DEL.getType()); - if (result1.size()==1){ + if (result1.size()>=1){ log.error("该学号已存在"); StudentImportFailureVo vo = new StudentImportFailureVo(); ++ii; @@ -195,7 +196,7 @@ public class StudentServiceImpl extends ServiceImpl im students.remove(i); i--; continue; - }else if(result4.size()==1){ + }else if(result4.size()>=1){ log.error("账号已存在"); StudentImportFailureVo vo = new StudentImportFailureVo(); ++ii; @@ -283,67 +284,19 @@ public class StudentServiceImpl extends ServiceImpl im export(response, inputStream, parse, "学生信息导入失败表.xlsx"); } -// public HashMap readStudent(Integer schoolId, MultipartFile file) { -// HashMap resp = new HashMap(); -// try { -// // 读取excel文件中的学生信息 -// List students = ExcelImportHelper.readStudent(file); -// List users = new ArrayList(); -// // 循环员工信息,将员工信息与用户信息进行对比 -// for (int i = 0; i < students.size(); i++) { -// Student student = students.get(i); -// // 学校id -// student.setSchoolId(schoolId); -// -// Student stu=studentMapper.getStudent(student); -// -// if(stu!=null) { -// // 专业id -// student.setProfessionalId(stu.getProfessionalId()); -// // 年级 -// student.setGradeId(stu.getGradeId()); -// //班级 -// student.setClassId(stu.getClassId()); -// -// UserM user = new UserM(); -// // 用户名称 -// user.setName(student.getStudentName()); -// // 用户密码 -// user.setPassword("huoran123"); -// // 用户角色 -// user.setAccountRole(student.getRoleId()); -// // 工号 -// user.setWorkNumber(student.getWorkNumber()); -// // 手机号 -// user.setPhone(student.getPhone()); -// // 邮箱 -// user.setEmail(student.getEmail()); -// // 唯一标识性账号 -// user.setUniqueIdentificationAccount(student.getUniqueIdentificationAccount()); -// // 学校id -// user.setSchoolId(schoolId); -// -// users.add(user); -// -// }else { -// students.remove(i); -// i--; -// } -// } -// if (!students.isEmpty() && students.size() > 0) { -// // 批量添加学生 -// studentMapper.bacthAddStudent(students); -// // 批量添加用户 -// userMapper.addUserM(users); -// } -// resp.put("retcode", 200); -// } catch (RuntimeException e) { -// logger.error(e.getMessage()); -// resp.put("retcode", 500); -// resp.put("retvalue", "Inquiry Failed"); -// return resp; -// } -// return resp; -// } + + @Override + public R queryAccount(String account,Integer schoolId) { + List result = studentDao.queryAccount(account,schoolId); + List vos = userInfoDao.queryAccount(account); + if (result.size()>1){ + return R.error("系统存在多个相同的账号:"+account); + }else if (result.size()==1){return R.ok().put("data",result); + }else if (vos.size()>0){ + return R.error("账号已存在"); + } + return R.ok(); + + } } diff --git a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java index 168de75..9898295 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -2,6 +2,7 @@ package com.msdw.tms.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.msdw.tms.common.exception.ExceptionCast; @@ -10,6 +11,8 @@ import com.msdw.tms.common.utils.poi.ExcelExportUtil; import com.msdw.tms.dao.SystemSetttingDao; import com.msdw.tms.dao.UserInfoDao; import com.msdw.tms.entity.StaffEntity; +import com.msdw.tms.entity.StudentEntity; +import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.XlsxTemplateEntity; import com.msdw.tms.entity.response.CommonCode; import com.msdw.tms.entity.vo.StaffExportVo; @@ -130,7 +133,6 @@ public class SystemSettingServiceImpl implements SystemSetttingService { String email = staffVo.getEmail(); String workNumber = staffVo.getWorkNumber(); List staff = staffVo.getStaff();//获取员工数据 - StaffVo result = userInfoDao.queryAccountUpdate(staffVo.getUserId()); String roleIds = result.getRoleId(); String[] splitOld = staffVo.getRoleId().split(","); @@ -320,7 +322,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService { if (architectureName!=null&&architectureName!=""){ if (gradeName==null|gradeName==""){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("二级部门不能为空"); + vo.setFailureMsg("二级部门不能为空(管理员)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -330,7 +332,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService { Integer b = systemSetttingDao.queryDepartmentNameOrganization(architectureName, ConstantUtils.Keda_schoolId); if (b==null){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("不存在的一级部门"); + vo.setFailureMsg("不存在的一级部门(管理员)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -340,7 +342,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService { List a = systemSetttingDao.judgmentGrade(architectureName,ConstantUtils.Keda_schoolId); if (a.size()==0){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("不存在此子级部门"); + vo.setFailureMsg("不存在此子级部门(管理员)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -349,11 +351,12 @@ public class SystemSettingServiceImpl implements SystemSetttingService { } } } - }else if (s.indexOf("3")!=-1){ + } + if (s.indexOf("3")!=-1){ if (architectureNameTwo!=null&&architectureNameTwo!=""){ if (gradeNameTwo==null|gradeNameTwo==""){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("二级部门不能为空"); + vo.setFailureMsg("二级部门不能为空(老师)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -363,7 +366,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService { Integer b = systemSetttingDao.queryDepartmentNameOrganization(architectureNameTwo, ConstantUtils.Keda_schoolId); if (b==null){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("不存在的一级部门"); + vo.setFailureMsg("不存在此的一级部门(老师)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -373,7 +376,7 @@ public class SystemSettingServiceImpl implements SystemSetttingService { List a = systemSetttingDao.judgmentGrade(architectureNameTwo,ConstantUtils.Keda_schoolId); if (a.size()==0){ StaffExportVo vo = new StaffExportVo(); - vo.setFailureMsg("不存在此子级部门"); + vo.setFailureMsg("不存在的子级部门(老师)"); vo.setIndex(ii).setUserName(staffVo.getUserName()).setAccount(staffVo.getAccount()).setRole(staffVo.getRole()).setWorkNumber(staffVo.getWorkNumber()).setStaffGradeName(staffVo.getStaffGradeName()).setStaffProfessionalArchitectureName(staffVo.getStaffProfessionalArchitectureName()).setStaffGradeNameTwo(staffVo.getStaffGradeNameTwo()).setStaffProfessionalArchitectureNameTwo(staffVo.getStaffProfessionalArchitectureNameTwo()).setPhone(staffVo.getPhone()).setEmail(staffVo.getEmail()).setSchoolAppellationName(staffVo.getSchoolAppellationName()); staffs.remove(i); i--; @@ -476,4 +479,22 @@ public class SystemSettingServiceImpl implements SystemSetttingService { XlsxTemplateEntity xlsxTemplate = xlsxTemplateService.getById(ConstantUtils.XLSX_TEMPLATE_ID3); ossService.downloadFiles(response, xlsxTemplate.getFileName()); } + + @Override + public R queryAccount(String account,Integer schoolId) { + HashMap map = new HashMap<>(); + List result = systemSetttingDao.queryAccount(account,schoolId); + List vos = userInfoDao.queryAccount(account); + if (result.size()>1){return R.error("系统存在多个相同的账号:"+account); + }else if (result.size()==1){ + StaffVo staffVo = result.get(0); + map.put("user",staffVo); + List staffVos = systemSetttingDao.queryStaffInfo(staffVo.getUserId()); + map.put("staff",staffVos); + return R.ok().put("data",map); + }else if (vos.size()>0){ + return R.error("账号已存在"); + } + return R.ok(); + } } \ No newline at end of file diff --git a/src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java index 4513374..68ce1f5 100644 --- a/src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java @@ -97,7 +97,7 @@ public class UserInfoServiceImpl extends ServiceImpl result = userInfoDao.queryStudentAccount(account,schoolId); + List result = userInfoDao.queryStudentAccount(account); if (result.size()==1){ return 1; }else{ @@ -106,8 +106,8 @@ public class UserInfoServiceImpl extends ServiceImpl result = userInfoDao.queryStudentPhone(phone,schoolId); + public Integer queryStudentPhone(String phone) { + List result = userInfoDao.queryStudentPhone(phone); if (result.size()==1){ return 1; }else{ diff --git a/src/main/resources/excel-template/虚拟仿真实验报告导出模板.xlsx b/src/main/resources/excel-template/虚拟仿真实验报告导出模板.xlsx index d4eb76ef8cda3193e15e73e863f7c0bd014c5606..2ab5031ebe2bb5aa6615254e3d209917c02448a7 100644 GIT binary patch delta 4085 zcmZ9PRa6v=x5a1Z770aKx;q^thVB6zItP&M&H<%{hLP?L=?)QT_~-ych z*8i@1&%=2+XYIB3+x|^MMj>^%KnxF%pgOV;$PM?h3==_5c`Hs_#r8FP$C*>aPN{J1 zvCCj_9`PYzMEt6AA7#XI)uArgb5klvUieA|mtwhM(2?_xaqSGIN+7WUqD2r=fbQG0 zv#3|nq~=XTYhu$Ajul9vJSb?#*@WLC5Zm=V^o3*$5$S;XeiP35VapQU4Npsm2Y63k zmKd&r5t{IAPD4(JAtgKUvacCkTA6^`maoS$Q|tZ*;YQO_qd9~py8{=S%7${=v>`f1j#0*D z2vLDCdPjTdnnrit`G@;zxF;veXHMFK4cLSGaQryWmxUL8>pkbGn^EQ*4L;WQ%3EkP^_Uo}9*7^ko8e&(A?b|@pV7_}1K}|9K_nr-n5&qrr2@4{Jijn}i37H_`By)Gj5= zrYDb*leR@o^Tvjv4xuNg#*O3)sr=wf`JpCN4 zJ$QVb9OsQ45?1wJJ;wLL>x_FMqcg5kV>*%SIb-@@!zmSR5|Vrlq?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z{@oYP?oZ$Q<@rY+awdPG-Z7)ZPoTw3G*V4O<%BV*;Rkl&T&7=~h1#OFhTRUM2uUn> zbwfJTkTN>_ux?yRBUM*4j%G{@{8(k2%lzN>&L2FV{W^*W-blizq%nN?hv(qk+21}4 z)x}#97!iJCD=umJ#pm<0ug@Qzz5M9iMX4fmq;8%4^DpP8A4Gp5Md*Oq64xgB2*eS{ z;?XD5ye5Uk?32^;Pk*lf^eB-CCGv<^+}`<*g1dv8MtP4=W$G&2&1|bN7Ohd0Ms}UHn55-5lD$5H{yj<=0;5l^u%aHvhf5J zV*`^c$+B715wU**olpr;qUd+viC$X(#Y(%`(r0`DECW1>% z#2a~uOT1bpYQxyXP$!4MlHLh4*1U5;Es0ko(TOSqw4gi#*hna0kmwJ_M#Lv5Sf(OSnrWf+6O&&QUhJpo!yPP(cRhIHQQCa+I<`98G7m5)nm + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/tms/ClassTeachingDao.xml b/src/main/resources/mapper/tms/ClassTeachingDao.xml index c715161..8621c41 100644 --- a/src/main/resources/mapper/tms/ClassTeachingDao.xml +++ b/src/main/resources/mapper/tms/ClassTeachingDao.xml @@ -65,6 +65,7 @@ AND stop_time >= now( ) AND is_del = 0 AND `status` !=3 + AND 30 >= DATEDIFF( stop_time, now( ) ) UPDATE tms_experimental_teaching @@ -80,6 +81,27 @@ start_time > now() AND is_del = 0 AND `status` !=3 + AND 30 >= DATEDIFF( start_time,now( ) ) + AND DATEDIFF( start_time,now( ) ) >=0 + + + UPDATE tms_experimental_teaching + SET surplus_time = '838:00:00' + WHERE + now( ) >= start_time + AND stop_time >= now( ) + AND is_del = 0 + AND `status` !=3 + AND DATEDIFF( stop_time, now( ) ) > 30 + + + UPDATE tms_experimental_teaching + SET surplus_time = '838:00:00' + WHERE + start_time > now( ) + AND is_del = 0 + AND `status` != 3 + AND DATEDIFF( start_time, now( ) ) > 30 + \ No newline at end of file diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index a3ab716..c256b36 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -3,7 +3,7 @@ - + @@ -19,6 +19,7 @@ - + - + SELECT - recordId, - tpr.projectId, - projectName, - schoolName, - userName, - score, - recordState, - submitTime, - COUNT(DISTINCT CASE WHEN recordState = '1' THEN recordState END) as complete, - COUNT(DISTINCT CASE WHEN recordState = '0' THEN recordState END) as tobescored + recordId, + tpr.projectId, + projectName, + schoolName, + userName, + score, + recordState, + submitTime, + COUNT(DISTINCT CASE WHEN recordState = '1' THEN recordState END) as complete, + COUNT(DISTINCT CASE WHEN recordState = '0' THEN recordState END) as tobescored FROM - tms_project_record tpr - LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId - LEFT JOIN hr_user_info u ON tpr.userId = u.userId - LEFT JOIN school sc ON u.schoolId = sc.schoolId + tms_project_record tpr + LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId + LEFT JOIN hr_user_info u ON tpr.userId = u.userId + LEFT JOIN school sc ON u.schoolId = sc.schoolId WHERE - tpr.isdel = #{pro.isdel} + tpr.isdel = #{pro.isdel} and - tp.isdel = #{pro.isdel} + tp.isdel = #{pro.isdel} and - u.isdel = #{pro.isdel} + u.isdel = #{pro.isdel} and - sc.isdel = #{pro.isdel} + sc.isdel = #{pro.isdel} and DATE_SUB(CURDATE(), INTERVAL #{pro.month} month ) <= date(submitTime) and submitTime between #{pro.startTime} and #{pro.endTime} and recordState=#{pro.recordState} diff --git a/src/main/resources/mapper/tms/QuestionsDao.xml b/src/main/resources/mapper/tms/QuestionsDao.xml index ffdfec9..85dfa11 100644 --- a/src/main/resources/mapper/tms/QuestionsDao.xml +++ b/src/main/resources/mapper/tms/QuestionsDao.xml @@ -59,6 +59,8 @@ - + \ No newline at end of file diff --git a/src/main/resources/mapper/tms/StudentDao.xml b/src/main/resources/mapper/tms/StudentDao.xml index 4cbd992..2ff0cad 100644 --- a/src/main/resources/mapper/tms/StudentDao.xml +++ b/src/main/resources/mapper/tms/StudentDao.xml @@ -30,7 +30,7 @@ AND s.isdel = 0 AND (u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%')) ORDER BY - lastLoginTime DESC,studentId + lastLoginTime DESC,studentId DESC SELECT schoolId FROM school WHERE schoolName = #{schoolAppellationName} + - + INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId ) VALUES ( #{schoolId},#{userId},#{workNumber},#{roleId},#{isdel},#{platformId} diff --git a/src/main/resources/mapper/tms/SystemSetting.xml b/src/main/resources/mapper/tms/SystemSetting.xml index e513654..a48e684 100644 --- a/src/main/resources/mapper/tms/SystemSetting.xml +++ b/src/main/resources/mapper/tms/SystemSetting.xml @@ -2,7 +2,7 @@ - + INSERT INTO staff (userId,schoolId,workNumber,staffGradeId,staffProfessionalArchitectureId,staffGradeName,staffProfessionalArchitectureName,platformId,roleId) VALUES (#{userId},#{schoolId},#{workNumber},#{staffGradeId},#{staffProfessionalArchitectureId},#{staffGradeName},#{staffProfessionalArchitectureName},#{platformId},#{roleId}) @@ -48,22 +48,22 @@ roleId=#{roleId} WHERE - staffId = #{staffId} + staffId = #{staffId} update staff s,hr_user_info u set s.isdel = 1 ,u.isdel = 1 where s.userId = u.userId and s.userId = #{userId} UPDATE staff s, - hr_user_info u + hr_user_info u SET s.isdel = 1, - u.isdel = 1 + u.isdel = 1 WHERE - s.userId = u.userId + s.userId = u.userId AND s.userId IN ( - #{userId} - ) + #{userId} + ) UPDATE staff @@ -85,35 +85,35 @@ delete from staff where userId = #{userId} and roleId = (select max(roleId) from staff where userId = #{userId}) - + + \ No newline at end of file diff --git a/src/main/resources/mapper/tms/UserInfoDao.xml b/src/main/resources/mapper/tms/UserInfoDao.xml index 4fcbef4..65911ec 100644 --- a/src/main/resources/mapper/tms/UserInfoDao.xml +++ b/src/main/resources/mapper/tms/UserInfoDao.xml @@ -49,7 +49,10 @@ schoolId = #{schoolId}, - phone = #{phone} + phone = #{phone}, + + + updateTime = now() WHERE userId = #{userId}; @@ -66,8 +69,6 @@ hr_user_info WHERE account = #{account} - and - schoolId = #{schoolId}