diff --git a/src/main/java/com/msdw/tms/controller/ProjectController.java b/src/main/java/com/msdw/tms/controller/ProjectController.java index a7847a7..406952e 100644 --- a/src/main/java/com/msdw/tms/controller/ProjectController.java +++ b/src/main/java/com/msdw/tms/controller/ProjectController.java @@ -15,8 +15,7 @@ import java.util.Map; /** * - * - * @author + * @author * @email * @date 2020-08-19 16:07:02 */ diff --git a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java index 156fac3..2b07bea 100644 --- a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java +++ b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java @@ -3,6 +3,7 @@ package com.msdw.tms.controller; import com.msdw.tms.api.ProjectRcordControllerApi; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; +import com.msdw.tms.entity.ProjectEntity; import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.service.ProjectRecordService; @@ -49,8 +50,81 @@ public class ProjectRecordController implements ProjectRcordControllerApi { return R.ok().put("page", page1); } +// /** +// * 用户端查看班级实验列表 +// * @param page +// * @param size +// * @param month +// * @param startTime +// * @param endTime +// * @param experimentStartus +// * @param condition +// * @return +// */ +// @GetMapping("user/Record") +// public R userList(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer month,@RequestParam String startTime,@RequestParam String endTime, +// @RequestParam String condition, @RequestParam Integer experimentStartus){ +// ProjectRecordVo recordVo = new ProjectRecordVo(); +// if (experimentStartus==0){//不限定 +// if(!StringUtils.isEmpty(month)) { +// recordVo.setMonth(month); +// }if(!StringUtils.isEmpty(startTime)) { +// recordVo.setStartTime(startTime); +// }if(!StringUtils.isEmpty(endTime)) { +// recordVo.setEndTime(endTime); +// }if(!StringUtils.isEmpty(condition)){ +// recordVo.setCondition(condition); +// } +// PageUtils page1 = projectRecordService.queryUserRecord(page,size,recordVo); +// }if (experimentStartus==1){//实验未发布 +// recordVo.setProjectstate(1); +// if(!StringUtils.isEmpty(condition)){ +// recordVo.setCondition(condition); +// } +// PageUtils page1 = projectRecordService.queryUserRecord(page,size,recordVo); +// }if (experimentStartus==2){//实验进行中 +// if(!StringUtils.isEmpty(month)) { +// recordVo.setMonth(month); +// }if(!StringUtils.isEmpty(condition)){ +// recordVo.setCondition(condition); +// } +// recordVo.setStartTime(startTime); +// recordVo.setEndtime(null); +// PageUtils page1 = projectRecordService.queryUserRecord(page,size,recordVo); +// }if (experimentStartus==3){//实验已完成 +// if(!StringUtils.isEmpty(month)) { +// recordVo.setMonth(month); +// }if(!StringUtils.isEmpty(startTime)){ +// recordVo.setStartTime(startTime); +// }if(!StringUtils.isEmpty(endTime)) { +// recordVo.setEndTime(endTime); +// }if(!StringUtils.isEmpty(condition)){ +// recordVo.setCondition(condition); +// } +// PageUtils page1 = projectRecordService.queryUserRecord(page,size,recordVo); +// } +// if(!StringUtils.isEmpty(month)) { +// recordVo.setMonth(month); +// }if(!StringUtils.isEmpty(startTime)) { +// recordVo.setStartTime(startTime); +// }if(!StringUtils.isEmpty(endTime)) { +// recordVo.setEndTime(endTime); +// }if(!StringUtils.isEmpty(condition)){ +// recordVo.setCondition(condition); +// } +// PageUtils page1 = projectRecordService.queryUserRecord(page,size,recordVo); +// +// +// return R.ok().put("page", page1); +// } - + /** + * 用户实验记录 + * @param page + * @param size + * @param userid + * @return + */ @GetMapping("/user/record") public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userid){ PageUtils page1 = projectRecordService.queryPage(page,size,userid); @@ -58,6 +132,11 @@ public class ProjectRecordController implements ProjectRcordControllerApi { return R.ok().put("data", page1); } + /** + * 个人实验预览 + * @param userid + * @return + */ @GetMapping("/user/score/{userId}") public R getUserScore(@PathVariable("userId") Integer userid){ ProjectRecordVo projectRecord = projectRecordService.queryUserScore(userid); @@ -65,6 +144,12 @@ public class ProjectRecordController implements ProjectRcordControllerApi { return R.ok().put("data", projectRecord); } + /** + * 导出个人项目记录 + * @param response + * @param userId + * @throws Exception + */ @GetMapping("/user/exportProjectRecord") public void exportProjectRecord(HttpServletResponse response,@RequestParam("userId") Integer userId)throws Exception{ projectRecordService.exportProjectRecord(response,userId); @@ -91,7 +176,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi { } /** - * 修改 + * 修改实验分数 */ @PutMapping("/update") public R update(@RequestBody ProjectRecordEntity projectRecord){ @@ -101,7 +186,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi { } /** - * 删除 + * 删除实验报告 */ @DeleteMapping("/delete") public R delete(@RequestBody Integer[] recordids){ 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 8cc25c8..87bce36 100644 --- a/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java +++ b/src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java @@ -56,4 +56,40 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable * 待评分 */ private Integer tobescored; + /** 记录状态(0 未修改,1 已修改)*/ + private Integer recordState; +// =====================================记录实验项目信息 +// /** +// * 班级实验状态,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; +// /** +// * 实验状态(0已发布 1未发布) +// */ +// private Integer projectstate; } diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index 280f230..d875883 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -33,6 +33,9 @@ AND tpr.isdel = #{pro.isdel} + + + +