更新代码

hehai
zhiyong.ning 4 years ago
parent d069a94f21
commit 2f4a5627ea
  1. 40
      src/main/java/com/msdw/tms/api/AchievementManagementApi.java
  2. 3
      src/main/java/com/msdw/tms/api/ClassTeachingApi.java
  3. 5
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  4. 3
      src/main/java/com/msdw/tms/api/StudentControllerApi.java
  5. 3
      src/main/java/com/msdw/tms/api/UserInfoControllerApi.java
  6. 2
      src/main/java/com/msdw/tms/config/SendSMS.java
  7. 143
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  8. 7
      src/main/java/com/msdw/tms/controller/ClassTeachingController.java
  9. 21
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  10. 13
      src/main/java/com/msdw/tms/controller/StudentController.java
  11. 2
      src/main/java/com/msdw/tms/controller/UserController.java
  12. 10
      src/main/java/com/msdw/tms/controller/UserInfoController.java
  13. 47
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  14. 2
      src/main/java/com/msdw/tms/dao/ExperimentalReportDao.java
  15. 8
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  16. 2
      src/main/java/com/msdw/tms/dao/StudentDao.java
  17. 1
      src/main/java/com/msdw/tms/dao/UserInfoDao.java
  18. 83
      src/main/java/com/msdw/tms/entity/ExperimentalReportEntity.java
  19. 2
      src/main/java/com/msdw/tms/entity/ProjectRecordEntity.java
  20. 39
      src/main/java/com/msdw/tms/entity/ReportEntity.java
  21. 53
      src/main/java/com/msdw/tms/entity/ResultsEntity.java
  22. 4
      src/main/java/com/msdw/tms/entity/vo/AchievementManagementVO.java
  23. 30
      src/main/java/com/msdw/tms/entity/vo/AchievementVO.java
  24. 26
      src/main/java/com/msdw/tms/entity/vo/AchievementVo.java
  25. 2
      src/main/java/com/msdw/tms/entity/vo/ExperimentalReportVo.java
  26. 25
      src/main/java/com/msdw/tms/entity/vo/JudgmentPointsRuleVO.java
  27. 8
      src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java
  28. 23
      src/main/java/com/msdw/tms/entity/vo/RecordVo.java
  29. 43
      src/main/java/com/msdw/tms/entity/vo/ResultsVo.java
  30. 23
      src/main/java/com/msdw/tms/entity/vo/UserScoreVO.java
  31. 23
      src/main/java/com/msdw/tms/service/AchievementManagementService.java
  32. 6
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  33. 2
      src/main/java/com/msdw/tms/service/StudentService.java
  34. 2
      src/main/java/com/msdw/tms/service/UserInfoService.java
  35. 145
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  36. 10
      src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java
  37. 16
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  38. 12
      src/main/java/com/msdw/tms/service/impl/SignatureServiceImpl.java
  39. 10
      src/main/java/com/msdw/tms/service/impl/StudentServiceImpl.java
  40. 6
      src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java
  41. 127
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  42. 31
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  43. 16
      src/main/resources/mapper/tms/StudentDao.xml
  44. 3
      src/main/resources/mapper/tms/UserInfoDao.xml

@ -2,24 +2,50 @@ package com.msdw.tms.api;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.AchievementManagementVo;
import com.msdw.tms.entity.vo.AchievementVo;
import com.msdw.tms.entity.vo.SearchAchievementVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Api(value = "成绩管理",tags = "成绩管理") @Api(value = "成绩管理",tags = "成绩管理")
public interface AchievementManagementApi { public interface AchievementManagementApi {
@ApiOperation(value = "查询指导老师",notes = "查询指导老师")
R getTeacher(Integer projectId);
@ApiOperation(value = "查询用户实验报告",notes = "查询用户实验报告")
R getReport(Integer userId,Integer reportId);
@ApiOperation(value = "成绩管理列表",notes = "查询成绩管理列表")
R list(@RequestParam(value = "系统id",required = true) Integer systemId,
@RequestParam(value = "分类",required = false) Integer projectPermissions,
@RequestParam(value = "搜索内容",required = false) String searchContant,
@RequestParam(value = "开始时间",required = false) String startTime,
@RequestParam(value = "结束时间",required = false) String endTime,
@RequestParam(value = "月份",required = false) Integer month,
@RequestParam(value = "页码",required = true) Integer page,
@RequestParam(value = "页数大小",required = true) Integer size);
@ApiOperation(value = "查询实验教学列表",notes = "查询实验教学列表")
R newList(@RequestParam(value = "用户id",required = true) Integer userId,
@RequestParam(value = "搜索内容",required = false) String searchContant,
@RequestParam(value = "开始时间",required = false) String startTime,
@RequestParam(value = "结束时间",required = false) String endTime,
@RequestParam(value = "月份",required = false) Integer month,
@RequestParam(value = "页码",required = true) Integer page,
@RequestParam(value = "页数大小",required = true) Integer size);
@ApiOperation(value = "成绩管理列表",notes = "查询成绩管理列表")
R reportList(@RequestParam(value = "系统id",required = true) Integer systemId,
@RequestParam(value = "项目id",required = true) Integer projectId,
@RequestParam(value = "搜索内容",required = false) String searchContant,
@RequestParam(value = "页码",required = true) Integer page,
@RequestParam(value = "页数大小",required = true) Integer size);
@ApiOperation(value = "川大新增实验记录",notes = "川大新增实验记录") @ApiOperation(value = "川大新增实验记录",notes = "川大新增实验记录")
R addReport(AchievementVo vo); R addReport(ExperimentalReportEntity entity);
@ApiOperation(value = "查询实验记录",notes = "查询实验记录") @ApiOperation(value = "查询实验记录",notes = "查询实验记录")
R queryReport(@ApiParam(value = "实验报告主键id",required = true) Integer reportId); R queryReport(@ApiParam(value = "实验报告主键id",required = true) Integer reportId);

@ -19,9 +19,6 @@ public interface ClassTeachingApi {
R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime, R queryTestRecord(Integer page, Integer size, Integer month, String startTime, String endTime,
String condition, Integer status,Integer schoolId); String condition, Integer status,Integer schoolId);
@ApiOperation(value = "查看成绩",notes = "查看成绩")
R queryAchievement();
@ApiOperation(value = "查看虚拟仿真课程列表",notes = "查看虚拟仿真课程列表") @ApiOperation(value = "查看虚拟仿真课程列表",notes = "查看虚拟仿真课程列表")
R querySimulationPlayList(Integer page,Integer size); R querySimulationPlayList(Integer page,Integer size);

@ -18,11 +18,14 @@ public interface ProjectRcordControllerApi {
Integer recordState,String condition); Integer recordState,String condition);
@ApiOperation(value = "用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录") @ApiOperation(value = "用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录")
R queryUserRecord(Integer page,Integer size,Integer userid); R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录") @ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid); R getUserExperimentscore(Integer page,Integer size,Integer userid);
@ApiOperation(value = "个人实验概览",notes = "个人实验概览")
R queryScore(Integer userId);
@ApiOperation(value = "个人实验概览",notes = "个人实验概览") @ApiOperation(value = "个人实验概览",notes = "个人实验概览")
R getUserScore(Integer userid); R getUserScore(Integer userid);

@ -21,6 +21,9 @@ public interface StudentControllerApi {
@ApiOperation(value = "学生列表信息",notes = "学生列表信息") @ApiOperation(value = "学生列表信息",notes = "学生列表信息")
public R queryStudent(Integer schoolId, String seachContent, Integer page, Integer size); public R queryStudent(Integer schoolId, String seachContent, Integer page, Integer size);
@ApiOperation(value = "查询学生详情",notes = "查询学生详情")
public R queryStudentDetails(Integer userId);
@ApiOperation(value = "删除学生",notes = "删除学生") @ApiOperation(value = "删除学生",notes = "删除学生")
public R daleteStudent(List<Integer> studentId); public R daleteStudent(List<Integer> studentId);

@ -20,6 +20,9 @@ public interface UserInfoControllerApi {
// @ApiOperation(value = "个人中心信息修改",notes = "个人中心信息修改") // @ApiOperation(value = "个人中心信息修改",notes = "个人中心信息修改")
// R update(UserInfoEntity userEntity); // R update(UserInfoEntity userEntity);
@ApiOperation(value = "根据token获取用户id",notes = "根据token获取用户id")
R getUserId(String token);
@ApiOperation(value = "注册",notes = "注册") @ApiOperation(value = "注册",notes = "注册")
R save(UserInfoEntity entity); R save(UserInfoEntity entity);

@ -16,7 +16,7 @@ public class SendSMS {
private static final String PHONSMSTEMPLATE = "SMS_204155294"; private static final String PHONSMSTEMPLATE = "SMS_204155294";
public static void main(String[] args){ public static void main(String[] args){
String mobile="17376370737";//需要接受短信验证码的手机号 String mobile="17722612183";//需要接受短信验证码的手机号
// String sendTemplate="SMS_204155294";//短信模板ID,需要去阿里云平台申请,审核通过后方能使用,通常是以"SMS_"开头字符串 // String sendTemplate="SMS_204155294";//短信模板ID,需要去阿里云平台申请,审核通过后方能使用,通常是以"SMS_"开头字符串
String code = (int)((Math.random() * 9 + 1) * 100000)+ "";//要发送给用户的短信验证码,行业通常使用六位纯数字 String code = (int)((Math.random() * 9 + 1) * 100000)+ "";//要发送给用户的短信验证码,行业通常使用六位纯数字

@ -2,10 +2,8 @@ package com.msdw.tms.controller;
import com.msdw.tms.api.AchievementManagementApi; import com.msdw.tms.api.AchievementManagementApi;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.*;
import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.vo.ResultsVo;
import com.msdw.tms.entity.vo.AchievementManagementVo;
import com.msdw.tms.entity.vo.AchievementVo;
import com.msdw.tms.service.AchievementManagementService; import com.msdw.tms.service.AchievementManagementService;
import com.msdw.tms.service.ProjectRecordService; import com.msdw.tms.service.ProjectRecordService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -13,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* 成绩管理 * 成绩管理
@ -26,17 +25,145 @@ public class AchievementManagementController implements AchievementManagementApi
@Autowired @Autowired
private ProjectRecordService projectRecordService; private ProjectRecordService projectRecordService;
/**
* 查询用户实验报告
* @param projectId
* @param
* @return
*/
@Override
@GetMapping("/getTeacher")
public R getTeacher(@RequestParam Integer projectId){
R data = service.getTeacher(projectId);
return data;
}
/**
* 查询用户实验报告
* @param userId
* @param reportId
* @param
* @return
*/
@Override
@GetMapping("/getReport")
public R getReport(@RequestParam Integer reportId,@RequestParam Integer userId){
R data = service.getReport(userId,reportId);
return data;
}
/**
* 查询实验记录
*/
@Override
@GetMapping("/list")
public R list(@RequestParam(required = true) Integer systemId,
@RequestParam(required = false) Integer projectPermissions,
@RequestParam(required = false) String searchContant,
@RequestParam(required = false) String startTime,
@RequestParam(required = false) String endTime,
@RequestParam(required = false) Integer month,
@RequestParam(required = true) Integer page,
@RequestParam(required = true) Integer size){
ResultsVo vo = new ResultsVo();
if (systemId==null){
return R.error("系统id不能为空!");
}else{
vo.setSystemId(systemId);
}
if (projectPermissions!=null){
vo.setProjectPermissions(projectPermissions);
}
if (searchContant!=null){
vo.setSearchContant(searchContant);
}
if (startTime!=null){
vo.setStartTime(startTime);
}
if (endTime!=null){
vo.setEndTime(endTime);
}
List<ResultsEntity> result = service.list(vo,page,size);
return R.ok().put("data",result);
}
/**
* 查询实验教学记录
*/
@Override
@GetMapping("/newList")
public R newList(@RequestParam(required = true) Integer userId,
@RequestParam(required = false) String searchContant,
@RequestParam(required = false) String startTime,
@RequestParam(required = false) String endTime,
@RequestParam(required = false) Integer month,
@RequestParam(required = true) Integer page,
@RequestParam(required = true) Integer size){
ResultsVo vo = new ResultsVo();
if (userId==null){
return R.error("用户id不能为空!");
}else{
vo.setUserId(userId);
}
if (searchContant!=null){
vo.setSearchContant(searchContant);
}
if (startTime!=null){
vo.setStartTime(startTime);
}
if (endTime!=null){
vo.setEndTime(endTime);
}
List<ResultsEntity> result = service.newList(vo,page,size);
return R.ok().put("data",result);
}
/**
* 查询实验记录
*/
@Override
@GetMapping("/reportList")
public R reportList(@RequestParam(required = true) Integer systemId,
@RequestParam(required = true) Integer projectId,
@RequestParam(required = false) String searchContant,
@RequestParam(required = true) Integer page,
@RequestParam(required = true) Integer size){
ResultsVo vo = new ResultsVo();
if (systemId==null||projectId==null){
return R.error("系统或项目数据不能为空!");
}else{
vo.setSystemId(systemId);
vo.setProjectId(projectId);
}
if (searchContant!=null){
vo.setSearchContant(searchContant);
}
List<ReportEntity> result = service.reportList(vo,page,size);
return R.ok().put("data",result);
}
/** /**
* 提交实验结果--川大 * 提交实验结果--川大
*/ */
@Override @Override
@PostMapping("/addReport") @PostMapping("/addReport")
public R addReport(@RequestBody AchievementVo vo){ public R addReport(@RequestBody ExperimentalReportEntity entity){
R result = service.addReport(vo); R result = service.addReport(entity);
return result; return R.ok().put("reportId",entity.getReportId());
} }
// /**
// * 提交实验报告
// */
// @Override
// @PostMapping("/add")
// public R add(@RequestBody ExperimentalProjectEntity vo){
// R result = service.addReport(vo);
// return result;
// }
/** /**
* 查询实验记录 * 查询实验记录
*/ */
@ -61,7 +188,7 @@ public class AchievementManagementController implements AchievementManagementApi
/** /**
* 需求删除实验记录====管理端删除但是学生端仍需保留 * 需求删除实验记录====管理端删除但是学生端仍需保留
* 将isdel属性设置为0 * 将isdel属性设置为0
* @param vo (recordid reportId) * @param reportId
* @return * @return
*/ */
@Override @Override

@ -123,13 +123,6 @@ public class ClassTeachingController implements ClassTeachingApi {
} }
} }
//查看成绩
@Override
@GetMapping("/queryAchievement")
public R queryAchievement(){
return R.ok();
}
/** /**
* 查看虚拟仿真课程列表信息 * 查看虚拟仿真课程列表信息
* @param page * @param page

@ -3,6 +3,7 @@ package com.msdw.tms.controller;
import com.msdw.tms.api.ProjectRcordControllerApi; import com.msdw.tms.api.ProjectRcordControllerApi;
import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectEntity; import com.msdw.tms.entity.ProjectEntity;
import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.entity.vo.ProjectRecordVo;
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
@ -61,9 +63,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/ */
@Override @Override
@GetMapping("/user/record") @GetMapping("/user/record")
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId){ public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){
PageUtils page1 = projectRecordService.queryPage(page,size,userId); PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions);
return R.ok().put("data", page1); return R.ok().put("data", page1);
} }
@ -82,6 +83,19 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
return R.ok().put("data", page1); return R.ok().put("data", page1);
} }
/**
* 个人实验预览
* @param userId
* @return
*/
@Override
@GetMapping("/user/queryScore/{userId}")
public R queryScore(@PathVariable("userId") Integer userId){
ProjectRecordVo projectRecord = projectRecordService.queryScore(userId);
return R.ok().put("data", projectRecord);
}
/** /**
* 个人实验预览 * 个人实验预览
* @param userid * @param userid
@ -158,7 +172,6 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
@DeleteMapping("/delete") @DeleteMapping("/delete")
public R delete(@RequestBody Integer[] recordids){ public R delete(@RequestBody Integer[] recordids){
projectRecordService.removeByIds(Arrays.asList(recordids)); projectRecordService.removeByIds(Arrays.asList(recordids));
return R.ok(); return R.ok();
} }

@ -97,6 +97,18 @@ public class StudentController implements StudentControllerApi{
return R.ok().put("data",query); return R.ok().put("data",query);
} }
/**
* 学生列表
* @param userId
* @return
*/
@Override
@GetMapping("/queryStudentDetails")
public R queryStudentDetails(@RequestParam Integer userId){
R query = studentService.queryStudentDetails(userId);
return query;
}
/** /**
* 批量删除学生 * 批量删除学生
* @param studentId * @param studentId
@ -230,7 +242,6 @@ public class StudentController implements StudentControllerApi{
@Override @Override
@GetMapping("/queryAccount") @GetMapping("/queryAccount")
public R queryAccount(String account,Integer schoolId){ public R queryAccount(String account,Integer schoolId){
R result = studentService.queryAccount(account,schoolId); R result = studentService.queryAccount(account,schoolId);
return result; return result;
} }

@ -11,7 +11,7 @@ import com.msdw.tms.entity.vo.UserEntityVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo; import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import com.msdw.tms.service.UserInfoService; import com.msdw.tms.service.UserInfoService;
import com.msdw.tms.service.UserService; import com.msdw.tms.service.UserService;
import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

@ -200,4 +200,14 @@ public class UserInfoController implements UserInfoControllerApi {
R result = userInfoService.queryAccount(); R result = userInfoService.queryAccount();
return result; return result;
} }
/**
* 根据token获取用户id
*/
@Override
@GetMapping("/getUserId")
public R getUserId(@RequestParam String token){
Integer userId = userInfoService.getUserId(token);
return R.ok().put("userId", userId);
}
} }

@ -3,12 +3,15 @@ package com.msdw.tms.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.ReportEntity;
import com.msdw.tms.entity.ResultsEntity;
import com.msdw.tms.entity.request.AchievementImportRequest; import com.msdw.tms.entity.request.AchievementImportRequest;
import com.msdw.tms.entity.vo.AchievementManagementVo; import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.AchievementVo; import com.msdw.tms.entity.vo.JudgmentPointsRuleVO;
import com.msdw.tms.entity.vo.SearchAchievementVo; import com.msdw.tms.entity.vo.ResultsVo;
import com.msdw.tms.entity.vo.UserScoreVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
@ -17,23 +20,45 @@ import java.util.List;
@Mapper @Mapper
public interface AchievementManagementDao extends BaseMapper<ExperimentalReportEntity> { public interface AchievementManagementDao extends BaseMapper<ExperimentalReportEntity> {
//查询用户答案
List<JudgmentPointsRuleVO> getUserAnswers(Integer tradingJudgmentPointsId);
void addReport(AchievementVo entity); //查询实验报告
ExperimentalReportEntity getReport(ExperimentalReportEntity experimentalReportEntity);
AchievementManagementVo queryReport(Integer reportId); List<Integer> queryTradingJudgmentPointsId(Integer reportId);
//查询实验报告
String getTeacher(Integer projectId);
//查询实验报告
List<UserScoreVO> getScore(UserScoreVO userScoreVO);
//成绩管理列表
List<ResultsEntity> list(ResultsVo vo);
//成绩管理实验教学列表
List<ResultsEntity> newList(ResultsVo vo);
//成绩管理列表
List<ReportEntity> reportList(ResultsVo vo);
void addReport(ExperimentalReportEntity entity);
AchievementManagementVO queryReport(Integer reportId);
void deleteReport(Integer reportId); void deleteReport(Integer reportId);
IPage<AchievementManagementVo> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId); IPage<AchievementManagementVO> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId);
List<AchievementImportRequest> queryAchievement(@Param("ids") List<Integer> ids); List<AchievementImportRequest> queryAchievement(@Param("ids") List<Integer> ids);
List<AchievementManagementVo> queryFictitiousRecord(Integer systemId,String searchContant, String startingtime, String endtime, Integer month,List<Integer> projectIds); List<AchievementManagementVO> queryFictitiousRecord(Integer systemId, String searchContant, String startingtime, String endtime, Integer month, List<Integer> projectIds);
List<AchievementManagementVo> queryEducationRecord(Integer systemId, String searchContant, String startingtime, String endtime, Integer month,List<Integer> projectIds); List<AchievementManagementVO> queryEducationRecord(Integer systemId, String searchContant, String startingtime, String endtime, Integer month, List<Integer> projectIds);
//qiyong //qiyong
List<AchievementManagementVo> queryFictitiousReport(String searchContant, Integer projectId); List<AchievementManagementVO> queryFictitiousReport(String searchContant, Integer projectId);
List<Integer> countEducationProjectId(); List<Integer> countEducationProjectId();
@ -44,7 +69,7 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
void updateComment(ExperimentalReportEntity entity); void updateComment(ExperimentalReportEntity entity);
List<AchievementManagementVo> queryPythonTest(Integer eventId); List<AchievementManagementVO> queryPythonTest(Integer eventId);
void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment); void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment);
} }

@ -1,9 +1,7 @@
package com.msdw.tms.dao; package com.msdw.tms.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.AchievementManagementVo;
import com.msdw.tms.entity.vo.ExperimentalReportVo; import com.msdw.tms.entity.vo.ExperimentalReportVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

@ -3,10 +3,12 @@ package com.msdw.tms.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.msdw.tms.entity.ExperimentalProjectEntity;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.RecordVo;
import com.msdw.tms.entity.vo.ProjectRecordExportVo; import com.msdw.tms.entity.vo.ProjectRecordExportVo;
import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.entity.vo.ProjectRecordVo;
import com.msdw.tms.entity.vo.RecordVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -22,7 +24,7 @@ import java.util.List;
@Mapper @Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> { public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<ProjectRecordVo> getByUserRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity); IPage<ProjectRecordVo> getByUserRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity,Integer projectPermissions);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity); IPage<ProjectRecordVo> getByUserExperimentRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity);
@ -30,6 +32,8 @@ public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
ProjectRecordVo getByUserScore(@Param("userid") Integer userId,@Param("isdel") Integer isdel); ProjectRecordVo getByUserScore(@Param("userid") Integer userId,@Param("isdel") Integer isdel);
ProjectRecordVo queryScore(@Param("userId") Integer userId);
IPage<ProjectRecordVo> getBySchoolRecord(Page page,@Param("pro") ProjectRecordVo projectRecord); IPage<ProjectRecordVo> getBySchoolRecord(Page page,@Param("pro") ProjectRecordVo projectRecord);
boolean updateUserRecord(ProjectRecordEntity projectRecord); boolean updateUserRecord(ProjectRecordEntity projectRecord);

@ -20,6 +20,8 @@ public interface StudentDao extends BaseMapper<StudentEntity> {
IPage<StudentVo> queryStudent(Page<T> tpage,String searchContent,Integer schoolId); IPage<StudentVo> queryStudent(Page<T> tpage,String searchContent,Integer schoolId);
StudentVo queryStudentDetails(Integer userId);
Integer deleteStudent(List<Integer> studentId); Integer deleteStudent(List<Integer> studentId);
Integer updateStudent(StudentVo studentVo); Integer updateStudent(StudentVo studentVo);

@ -65,4 +65,5 @@ public interface UserInfoDao extends BaseMapper<UserInfoEntity> {
List<String> queryStudentName(Integer userId); List<String> queryStudentName(Integer userId);
Integer getUserId(String token);
} }

@ -3,6 +3,7 @@ package com.msdw.tms.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@ -10,44 +11,120 @@ import lombok.experimental.Accessors;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class ExperimentalReportEntity { public class ExperimentalReportEntity {
//实验报告主键 //实验报告主键
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ApiModelProperty(value = "实验报告主键",name = "reportId",required = false)
private Integer reportId; private Integer reportId;
//绑定实验id //绑定实验id
@ApiModelProperty(value = "绑定实验id",name = "projectId",required = false)
private Integer projectId; private Integer projectId;
//实验原理 //实验原理
@ApiModelProperty(value = "实验原理",name = "principle",required = false)
private String principle; private String principle;
//实验内容 //实验内容
@ApiModelProperty(value = "实验内容",name = "content",required = false)
private String content; private String content;
//实验步骤 //实验步骤
@ApiModelProperty(value = "实验步骤",name = "step",required = false)
private String step; private String step;
//实验数据 //实验数据
@ApiModelProperty(value = "实验数据",name = "data",required = false)
private String data; private String data;
//实验分析 //实验分析
@ApiModelProperty(value = "实验分析",name = "analysis",required = false)
private String analysis; private String analysis;
//实验结论 //实验结论
@ApiModelProperty(value = "实验结论",name = "conclusion",required = false)
private String conclusion; private String conclusion;
//实验总结 //实验总结
@ApiModelProperty(value = "实验总结",name = "summarize",required = false)
private String summarize; private String summarize;
//实验目的
@ApiModelProperty(value = "实验目的",name = "purpose",required = false)
private String purpose;
//对本实验过程的方法及手段的改进建议 //对本实验过程的方法及手段的改进建议
@ApiModelProperty(value = "对本实验过程的方法及手段的改进建议",name = "improvement",required = false)
private String improvement; private String improvement;
//老师评语 //老师评语
@ApiModelProperty(value = "老师评语",name = "commentId",required = false)
private Integer commentId; private Integer commentId;
//教师评语 //教师评语
@ApiModelProperty(value = "教师评语",name = "comment",required = false)
private String comment; private String comment;
//绑定学生id //绑定学生id
@ApiModelProperty(value = "绑定学生id",name = "studentId",required = false)
private Integer studentId; private Integer studentId;
// 绑定老师id //绑定老师id
// private Integer teacherId; @ApiModelProperty(value = "绑定老师id",name = "teacherId",required = false)
private Integer teacherId;
//指导老师
@ApiModelProperty(value = "指导老师",name = "teacherName",required = false)
private String teacherName;
//学时 //学时
@ApiModelProperty(value = "学时",name = "period",required = false)
private String period; private String period;
//实验室名称 //实验室名称
@ApiModelProperty(value = "实验室名称",name = "laboratory",required = false)
private String laboratory; private String laboratory;
//绑定教师签名id //绑定教师签名id
@ApiModelProperty(value = "绑定教师签名id",name = "signatureId",required = false)
private Integer signatureId; private Integer signatureId;
//是否启用教师签名照 //是否启用教师签名照
@ApiModelProperty(value = "是否启用教师签名照",name = "isSignature",required = false)
private Integer isSignature; private Integer isSignature;
//绑定项目id //绑定项目id
@ApiModelProperty(value = "绑定项目id",name = "eventId",required = false)
private Integer eventId; private Integer eventId;
//实验器材
@ApiModelProperty(value = "实验器材",name = "equipment",required = false)
private String equipment;
@ApiModelProperty(value = "最终得分",name = "score",required = false)
private Integer score;
@ApiModelProperty(value = "耗时/小时",name = "timeConsuming",required = false)
private Integer timeConsuming;
@ApiModelProperty(value = "开始时间",name = "startTime",required = false)
private String startTime;
@ApiModelProperty(value = "创建时间",name = "creationTime",required = false)
private String creationTime;
@ApiModelProperty(value = "班级名称",name = "className",required = false)
private String className;
//步骤1
@ApiModelProperty(value = "步骤1",name = "steps1",required = false)
private String steps1;
//步骤2
@ApiModelProperty(value = "步骤2",name = "steps2",required = false)
private String steps2;
//步骤3
@ApiModelProperty(value = "步骤3",name = "steps3",required = false)
private String steps3;
//步骤4
@ApiModelProperty(value = "步骤4",name = "steps4",required = false)
private String steps4;
//步骤5
@ApiModelProperty(value = "步骤5",name = "steps5",required = false)
private String steps5;
//步骤6
@ApiModelProperty(value = "步骤6",name = "steps6",required = false)
private String steps6;
//步骤7
@ApiModelProperty(value = "步骤7",name = "steps7",required = false)
private String steps7;
//步骤8
@ApiModelProperty(value = "步骤8",name = "steps8",required = false)
private String steps8;
//步骤9
@ApiModelProperty(value = "步骤9",name = "steps9",required = false)
private String steps9;
//步骤10
@ApiModelProperty(value = "步骤10",name = "steps10",required = false)
private String steps10;
private transient String projectName;
private transient String workNumber;
//绑定用户id
private transient Integer userId;
} }

@ -64,7 +64,7 @@ public class ProjectRecordEntity implements Serializable {
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date submittime; private Date submitTime;
/** /**
* 删除(0未删除 1已删除) * 删除(0未删除 1已删除)
*/ */

@ -0,0 +1,39 @@
package com.msdw.tms.entity;
import lombok.Data;
import lombok.experimental.Accessors;
/**
*
*
* @author
* @email
* @date 2020-08-19 16:07:02
*/
@Accessors(chain = true)
@Data
public class ReportEntity {
private static final long serialVersionUID = 1L;
//学校名称
private String schoolName;
//学生名称
private String studentName;
//学号
private String workNumber;
//创建时间
private String creationTime;
//分数
private Integer score;
//报告id
private Integer reportId;
//用户id
private Integer userId;
}

@ -0,0 +1,53 @@
package com.msdw.tms.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
*
*
* @author
* @email
* @date 2020-08-19 16:07:02
*/
@Accessors(chain = true)
@Data
public class ResultsEntity{
private static final long serialVersionUID = 1L;
//实验教学id
private Integer id;
//项目名称
private String projectName;
//分类(0、虚拟仿真实验(练习) 1、实验教学(考核))
private Integer projectPermissions;
//成绩报告数量
private Integer number;
//创建时间
private String creationTime;
//绑定系统id
private Integer systemId;
//绑定系统id
private Integer projectId;
//实验班级名称
private String experimentalClassName;
//实验名称
private String experimentalName;
}

@ -8,7 +8,7 @@ import lombok.experimental.Accessors;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class AchievementManagementVo extends ExperimentalReportEntity { public class AchievementManagementVO extends ExperimentalReportEntity {
//=========================================================== 返回参数 //=========================================================== 返回参数
// //
@ -27,7 +27,7 @@ public class AchievementManagementVo extends ExperimentalReportEntity {
private String workNumber; private String workNumber;
//分数 //分数
private String score; private Integer score;
//提交时间 //提交时间
private String submitTime; private String submitTime;

@ -0,0 +1,30 @@
package com.msdw.tms.entity.vo;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectRecordEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class AchievementVO extends ExperimentalReportEntity {
private RecordVo entity;
//指导老师姓名
@ApiModelProperty(value = "指导老师姓名",name = "teacherName",required = false)
private String teacherName;
//学生姓名
@ApiModelProperty(value = "学生姓名",name = "userName",required = false)
private String userName;
//学号
@ApiModelProperty(value = "学号",name = "workNumber",required = false)
private String workNumber;
//项目id
@ApiModelProperty(value = "项目id",name = "eventId",required = false)
private Integer eventId;
}

@ -1,26 +0,0 @@
package com.msdw.tms.entity.vo;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.RecordVo;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class AchievementVo extends ExperimentalReportEntity {
private RecordVo entity;
//指导老师姓名
private String teacherName;
//学生姓名
private String userName;
//学号
private String workNumber;
//
private Integer eventId;
}

@ -9,7 +9,7 @@ import lombok.experimental.Accessors;
public class ExperimentalReportVo extends ExperimentalReportEntity { public class ExperimentalReportVo extends ExperimentalReportEntity {
//学生用户id //学生用户id
private int userId; private Integer userId;
//学生姓名 //学生姓名
private String userName; private String userName;
//学号 //学号

@ -0,0 +1,25 @@
package com.msdw.tms.entity.vo;
import lombok.Data;
/**
* 交易类判分点规则实体类
*
* @author Ning
*
*/
@Data
public class JudgmentPointsRuleVO {
private Integer id; // 交易类判分点规则主键id
private Integer type;//类型(1.选择题2.填空题3.问答题4.指标结果)
private String levelOne;// 一级栏目
private String levelTwo;// 二级栏目
private String levelThree;// 三级栏目
private String levelFour;// 四级栏目
private Integer tradingJudgmentPointsId;//绑定交易类判分点id
private String judgmentPointsName;//绑定交易类判分点id
private Integer operatorOne;//一级运算符 1为且 2为或
private Integer operatorTwo;//二级运算符 1为且 2为或
}

@ -28,6 +28,10 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 学校名称 * 学校名称
*/ */
private String SchoolName; private String SchoolName;
/**
* 学校名称
*/
private String className;
/** /**
* 用户名称 * 用户名称
*/ */
@ -40,6 +44,10 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 总耗时 * 总耗时
*/ */
private Double totalTime; private Double totalTime;
/**
* 总耗时
*/
private Integer timeConsuming;
/** /**
* 平均分 * 平均分
*/ */

@ -1,9 +1,10 @@
package com.msdw.tms.entity; package com.msdw.tms.entity.vo;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -26,49 +27,55 @@ public class RecordVo implements Serializable {
/** /**
* 记录id * 记录id
*/ */
@ApiModelProperty(value = "记录id",name = "recordid",required = false)
private Integer recordid; private Integer recordid;
/** /**
* 用户id * 用户id
*/ */
@ApiModelProperty(value = "用户id",name = "userid",required = false)
private Integer userid; private Integer userid;
/** /**
* 实验项目id * 实验项目id
*/ */
@ApiModelProperty(value = "实验项目id",name = "projectid",required = false)
private Integer projectid; private Integer projectid;
/** /**
* 得分 * 得分
*/ */
@ApiModelProperty(value = "得分",name = "score",required = false)
private Integer score; private Integer score;
/** /**
* 记录状态 * 记录状态
*/ */
@ApiModelProperty(value = "记录状态",name = "recordstate",required = false)
private Integer recordstate; private Integer recordstate;
/** /**
* 起始时间 * 起始时间
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "起始时间",name = "startingtime",required = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String startingtime;
private Date startingtime;
/** /**
* 结束时间 * 结束时间
*/ */
private Date endtime; @ApiModelProperty(value = "结束时间",name = "endtime",required = false)
private String endtime;
/** /**
* 耗时 * 耗时
*/ */
@ApiModelProperty(value = "耗时",name = "timeSum",required = false)
private Integer timeSum; private Integer timeSum;
/** /**
* 提交时间 * 提交时间
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "提交时间",name = "submittime",required = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String submittime;
private Date submittime;
/** /**
* 删除(0未删除 1已删除) * 删除(0未删除 1已删除)
*/ */
@TableLogic(value = "0",delval = "1") @TableLogic(value = "0",delval = "1")
private Integer isdel; private Integer isdel;
@ApiModelProperty(value = "项目id",name = "eventId",required = false)
private Integer eventId; private Integer eventId;
} }

@ -0,0 +1,43 @@
package com.msdw.tms.entity.vo;
import com.msdw.tms.entity.ExperimentalReportEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class ResultsVo {
//搜索内容
@ApiModelProperty(value = "搜索内容",name = "searchContant",required = false)
private String searchContant;
//结束时间
@ApiModelProperty(value = "结束时间",name = "endTime",required = false)
private String endTime;
//开始时间
@ApiModelProperty(value = "开始时间",name = "startTime",required = false)
private String startTime;
//月份
@ApiModelProperty(value = "月份",name = "month",required = false)
private Integer month;
//项目权限(0、练习 1、考核 2、竞赛)
@ApiModelProperty(value = "项目权限(0、练习 1、考核 2、竞赛)",name = "projectPermissions",required = false)
private Integer projectPermissions;
//系统id
@ApiModelProperty(value = "系统id",name = "systemId",required = true)
private Integer systemId;
//项目id
@ApiModelProperty(value = "项目id",name = "projectId",required = true)
private Integer projectId;
//用户id
private Integer userId;
}

@ -0,0 +1,23 @@
package com.msdw.tms.entity.vo;
import lombok.Data;
/**
* 交易类判分点实体类
*
* @author Ning
*
*/
@Data
public class UserScoreVO {
private Integer id; // 判分点主键Id
private Integer score; // 分数
private Integer tradingJudgmentPointsId;// 判分点id
private Integer projectId;// 绑定项目管理Id
private Integer systemId;//绑定系统id
private Integer userId;//绑定用户id
private Integer isCorrect;//是否正确(0、未作答 1、正确 2、不正确)
private Integer reportId;//实验报告id
private String userAnswers;//用户答案
}

@ -3,17 +3,30 @@ package com.msdw.tms.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.AchievementManagementVo; import com.msdw.tms.entity.ExperimentalTeachingEntity;
import com.msdw.tms.entity.vo.AchievementVo; import com.msdw.tms.entity.ReportEntity;
import com.msdw.tms.entity.vo.SearchAchievementVo; import com.msdw.tms.entity.ResultsEntity;
import com.msdw.tms.entity.vo.ResultsVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List; import java.util.List;
public interface AchievementManagementService extends IService<ExperimentalReportEntity> { public interface AchievementManagementService extends IService<ExperimentalReportEntity> {
R addReport(AchievementVo entity); //查询实验报告
R getReport(Integer userId, Integer reportId);
//查询知道老师
R getTeacher(Integer projectId);
List<ResultsEntity> list(ResultsVo vo, Integer page, Integer size);
//查询实验教学列表
List<ResultsEntity> newList(ResultsVo vo, Integer page, Integer size);
List<ReportEntity> reportList(ResultsVo vo, Integer page, Integer size);
R addReport(ExperimentalReportEntity entity);
R queryReport(Integer reportId ); R queryReport(Integer reportId );

@ -2,10 +2,12 @@ package com.msdw.tms.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.vo.ProjectRecordVo; import com.msdw.tms.entity.vo.ProjectRecordVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
@ -17,12 +19,14 @@ import java.util.List;
*/ */
public interface ProjectRecordService extends IService<ProjectRecordEntity> { public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page,Integer size,Integer userid); PageUtils queryPage(Integer page,Integer size,Integer userId,Integer projectPermissions);
PageUtils queryExperimentPage(Integer page,Integer size,Integer userid); PageUtils queryExperimentPage(Integer page,Integer size,Integer userid);
ProjectRecordVo queryUserScore(Integer userId); ProjectRecordVo queryUserScore(Integer userId);
ProjectRecordVo queryScore(Integer userId);
void exportProjectRecord(HttpServletResponse response, Integer userId)throws Exception; void exportProjectRecord(HttpServletResponse response, Integer userId)throws Exception;
void exportExperimentProjectRecord(HttpServletResponse response, Integer userId)throws Exception; void exportExperimentProjectRecord(HttpServletResponse response, Integer userId)throws Exception;

@ -22,6 +22,8 @@ public interface StudentService extends IService<StudentEntity>{
PageUtils queryStudent(Integer schoolId,String searchContent, Integer page, Integer size); PageUtils queryStudent(Integer schoolId,String searchContent, Integer page, Integer size);
R queryStudentDetails(Integer userId);
boolean deleteStudent(List<Integer> studentId); boolean deleteStudent(List<Integer> studentId);
boolean updateStudent(StudentVo studentVo); boolean updateStudent(StudentVo studentVo);

@ -48,4 +48,6 @@ public interface UserInfoService extends IService<UserInfoEntity> {
R queryAccount(); R queryAccount();
Integer getUserId(String token);
} }

@ -11,13 +11,12 @@ import com.msdw.tms.dao.AchievementManagementDao;
import com.msdw.tms.dao.ExperimentalTeachingDao; import com.msdw.tms.dao.ExperimentalTeachingDao;
import com.msdw.tms.dao.ProjectRecordDao; import com.msdw.tms.dao.ProjectRecordDao;
import com.msdw.tms.dao.UserInfoDao; import com.msdw.tms.dao.UserInfoDao;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.*;
import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.RecordVo;
import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.request.AchievementImportRequest; import com.msdw.tms.entity.request.AchievementImportRequest;
import com.msdw.tms.entity.vo.AchievementManagementVo; import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.AchievementVo; import com.msdw.tms.entity.vo.JudgmentPointsRuleVO;
import com.msdw.tms.entity.vo.ResultsVo;
import com.msdw.tms.entity.vo.UserScoreVO;
import com.msdw.tms.service.AchievementManagementService; import com.msdw.tms.service.AchievementManagementService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
@ -45,50 +44,102 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
@Autowired @Autowired
private UserInfoDao userInfoDao; private UserInfoDao userInfoDao;
//查询实验报告
@Override @Override
@Transactional @Transactional
public R addReport(AchievementVo entity) { public R getReport(Integer userId, Integer reportId) {
RecordVo record = entity.getEntity(); HashMap<String, Object> obj = new HashMap<String, Object>();
//1.信息校验 HashMap<String, Object> map = new HashMap<String, Object>();
String userName = entity.getUserName(); UserScoreVO userScoreVO = new UserScoreVO();
Integer userid = record.getUserid(); userScoreVO.setUserId(userId);
String teacherName = entity.getTeacherName(); userScoreVO.setReportId(reportId);
//获取学生id和用户id ExperimentalReportEntity experimentalReportEntity = new ExperimentalReportEntity();
StudentEntity student = userInfoDao.queryStudentId(userName,userid); experimentalReportEntity.setStudentId(userId);
//获取学生姓名 experimentalReportEntity.setReportId(reportId);
List<String> studentName = userInfoDao.queryStudentName(userid); ExperimentalReportEntity experimentalReportEntity1 = baseMapper.getReport(experimentalReportEntity);
if (studentName.size()==0){ List<UserScoreVO> score = baseMapper.getScore(userScoreVO);
return R.error("不存在的学生姓名"); obj.put("score",score);
}else if (student==null){ obj.put("experimentalReportEntity",experimentalReportEntity1);
log.info("学生姓名和用户id不匹配!!!"); List<Integer> tradingJudgmentPointsIds = baseMapper.queryTradingJudgmentPointsId(reportId);
return R.error("错误的个人信息!"); Integer size = tradingJudgmentPointsIds.size();
for (int i = 0;i<size; i++){
Integer tradingJudgmentPointsId = tradingJudgmentPointsIds.get(i);
List<JudgmentPointsRuleVO> judgmentPointsRuleList = baseMapper.getUserAnswers(tradingJudgmentPointsId);
map.put("judgmentPointsRuleList"+i,judgmentPointsRuleList);
}
obj.put("userAnswersList",map);
return R.ok().put("data",obj);
}
@Override
public R getTeacher(Integer projectId) {
String name = baseMapper.getTeacher(projectId);
return R.ok().put("name",name);
} }
@Override
public List<ResultsEntity> list(ResultsVo vo,Integer page,Integer size) {
List<ResultsEntity> list = achievementManagementDao.list(vo);
return list;
}
@Override
public List<ReportEntity> reportList(ResultsVo vo,Integer page,Integer size) {
List<ReportEntity> reportList = achievementManagementDao.reportList(vo);
return reportList;
}
@Override
public List<ResultsEntity> newList(ResultsVo vo,Integer page,Integer size) {
List<ResultsEntity> newList = achievementManagementDao.newList(vo);
return newList;
}
@Override
@Transactional
public R addReport(ExperimentalReportEntity entity) {
// RecordVo record = entity.getEntity();
// //1.信息校验
// String userName = entity.getUserName();
// Integer userid = record.getUserid();
// String teacherName = entity.getTeacherName();
// //获取学生id和用户id
// StudentEntity student = userInfoDao.queryStudentId(userName,userid);
// //获取学生姓名
// List<String> studentName = userInfoDao.queryStudentName(userid);
// if (studentName.size()==0){
// return R.error("不存在的学生姓名");
// }else if (student==null){
// log.info("学生姓名和用户id不匹配!!!");
// return R.error("错误的个人信息!");
// }
//2.根据实验得分 自动获取评语信息 //2.根据实验得分 自动获取评语信息
//3.将评语对应的commentId放入entity以便一齐存入实验报告表 //3.将评语对应的commentId放入entity以便一齐存入实验报告表
//(无判分系统暂写score=100) //(无判分系统暂写score=100)
record.setScore(100); // record.setScore(100);
//根据成绩取出对应的评语和评语id // //根据成绩取出对应的评语和评语id
Integer score = record.getScore(); // Integer score = record.getScore();
if (score!=null) { // if (score!=null) {
if (score<60){ // if (score<60){
entity.setCommentId(1);//成绩不合格 // entity.setCommentId(1);//成绩不合格
}else if (score>=60&&score<70){ // }else if (score>=60&&score<70){
entity.setCommentId(2);//合格 // entity.setCommentId(2);//合格
}else if (score>=70&&score<90){ // }else if (score>=70&&score<90){
entity.setCommentId(3);//良好 // entity.setCommentId(3);//良好
}else { // }else {
entity.setCommentId(4);//优秀 // entity.setCommentId(4);//优秀
} // }
}else { // }else {
return R.error("系统异常,成绩为空!"); // return R.error("系统异常,成绩为空!");
} // }
//4.添加实验记录表信息 //4.添加实验记录表信息
projectRecordDao.addReport(record);//保存至tms_project_record并返回主键 // projectRecordDao.addReport(record);//保存至tms_project_record并返回主键
//5.添加实验报告表信息 //5.添加实验报告表信息
entity.setStudentId(student.getStudentId()).setEventId(record.getEventId()); // entity.setStudentId(student.getStudentId()).setEventId(record.getEventId());
achievementManagementDao.addReport(entity); achievementManagementDao.addReport(entity);
return R.ok(); return R.ok();
@ -97,7 +148,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
@Override @Override
public R queryReport(Integer reportId) { public R queryReport(Integer reportId) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
AchievementManagementVo report = achievementManagementDao.queryReport(reportId); AchievementManagementVO report = achievementManagementDao.queryReport(reportId);
Integer eventId = report.getEventId(); Integer eventId = report.getEventId();
ProjectRecordEntity record = projectRecordDao.queryReport(eventId); ProjectRecordEntity record = projectRecordDao.queryReport(eventId);
String userName = userInfoDao.queryUserReport(record.getUserid()); String userName = userInfoDao.queryUserReport(record.getUserid());
@ -108,7 +159,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
//python实验数据 //python实验数据
Integer systemId = report.getSystemId(); Integer systemId = report.getSystemId();
if (systemId==1|systemId==4|systemId==5) { if (systemId==1|systemId==4|systemId==5) {
List<AchievementManagementVo> data = achievementManagementDao.queryPythonTest(eventId); List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(eventId);
map.put("data", data); map.put("data", data);
} }
report.setUserName(userName); report.setUserName(userName);
@ -127,7 +178,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
@Override @Override
public R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size) { public R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size) {
Page<T> tPage = new Page<>(page,size); Page<T> tPage = new Page<>(page,size);
IPage<AchievementManagementVo> data = achievementManagementDao.queryEvaluationReport(tPage,searchContant,projectId); IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage,searchContant,projectId);
PageUtils result = new PageUtils(data); PageUtils result = new PageUtils(data);
return R.ok().put("data",result); return R.ok().put("data",result);
@ -157,9 +208,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
public R queryAchievement(Integer systemId,Integer projectPermissions, String searchContant, String startingtime, public R queryAchievement(Integer systemId,Integer projectPermissions, String searchContant, String startingtime,
String endtime, Integer month) { String endtime, Integer month) {
try { try {
List<AchievementManagementVo> fictitious; List<AchievementManagementVO> fictitious;
List<AchievementManagementVo> education; List<AchievementManagementVO> education;
List<AchievementManagementVo> vo = new ArrayList<>(); List<AchievementManagementVO> vo = new ArrayList<>();
List<Integer> educationResult = achievementManagementDao.countEducationProjectId();//获取教学实验的主键id List<Integer> educationResult = achievementManagementDao.countEducationProjectId();//获取教学实验的主键id
List<Integer> fictitiousResult = achievementManagementDao.countFictitiousProjectId();//获取教学实验的主键id List<Integer> fictitiousResult = achievementManagementDao.countFictitiousProjectId();//获取教学实验的主键id
if (projectPermissions==null){projectPermissions=-9999;} if (projectPermissions==null){projectPermissions=-9999;}
@ -184,9 +235,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
vo.add(fictitious.get(i)); vo.add(fictitious.get(i));
} }
//按创建时间时间排序 //按创建时间时间排序
Collections.sort(vo, new Comparator<AchievementManagementVo>() { Collections.sort(vo, new Comparator<AchievementManagementVO>() {
@Override @Override
public int compare(AchievementManagementVo o1, AchievementManagementVo o2) { public int compare(AchievementManagementVO o1, AchievementManagementVO o2) {
int flag = o2.getCreationTime().compareTo(o1.getCreationTime()); int flag = o2.getCreationTime().compareTo(o1.getCreationTime());
return flag; return flag;
} }

@ -1,17 +1,13 @@
package com.msdw.tms.service.impl; package com.msdw.tms.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.dao.AchievementManagementDao; import com.msdw.tms.dao.AchievementManagementDao;
import com.msdw.tms.dao.ExperimentalReportDao; import com.msdw.tms.dao.ExperimentalReportDao;
import com.msdw.tms.dao.ExperimentalTeachingDao;
import com.msdw.tms.entity.ExperimentalReportEntity; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.vo.AchievementManagementVo; import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.ExperimentalReportVo; import com.msdw.tms.entity.vo.ExperimentalReportVo;
import com.msdw.tms.service.ExperimentalReportService; import com.msdw.tms.service.ExperimentalReportService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -37,7 +33,7 @@ public class ExperimentalReportServiceImpl extends ServiceImpl<ExperimentalRepor
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("report",result); map.put("report",result);
if(systemId==1|systemId==4|systemId==5){ if(systemId==1|systemId==4|systemId==5){
List<AchievementManagementVo> data = achievementManagementDao.queryPythonTest(recordId); List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(recordId);
map.put("data",data); map.put("data",data);
return R.ok().put("data",map); return R.ok().put("data",map);
} }
@ -51,7 +47,7 @@ public class ExperimentalReportServiceImpl extends ServiceImpl<ExperimentalRepor
//python实验 //python实验
if(systemId==1|systemId==4|systemId==5){ if(systemId==1|systemId==4|systemId==5){
List<AchievementManagementVo> data = achievementManagementDao.queryPythonTest(recordId); List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(recordId);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("data",data); map.put("data",data);
map.put("report",result); map.put("report",result);

@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.Constant;
import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R;
import com.msdw.tms.common.utils.poi.ExcelExportUtil; import com.msdw.tms.common.utils.poi.ExcelExportUtil;
import com.msdw.tms.dao.ProjectRecordDao; import com.msdw.tms.dao.ProjectRecordDao;
import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectRecordEntity; import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.request.ExperimentProjectRecordImportRequest; import com.msdw.tms.entity.request.ExperimentProjectRecordImportRequest;
import com.msdw.tms.entity.request.ProjectRecordImportRequest; import com.msdw.tms.entity.request.ProjectRecordImportRequest;
@ -22,6 +24,7 @@ import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -32,15 +35,16 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Autowired @Autowired
private ProjectRecordDao baseMapper; private ProjectRecordDao baseMapper;
@Override @Override
public PageUtils queryPage(Integer page,Integer size,Integer userid) { public PageUtils queryPage(Integer page,Integer size,Integer userId,Integer projectPermissions) {
ProjectRecordEntity projectRecord = new ProjectRecordEntity().setUserid(userid).setIsdel(Constant.IsDel.NOT_DEL.getType()); ProjectRecordEntity projectRecord = new ProjectRecordEntity().setUserid(userId);
//分页对象 //分页对象
Page<T> page1 = new Page<>(page, size); Page<T> page1 = new Page<>(page, size);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserRecord(page1,projectRecord); IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserRecord(page1,projectRecord,projectPermissions);
PageUtils questionsPage = new PageUtils(projectRecordVos); PageUtils questionsPage = new PageUtils(projectRecordVos);
@ -79,6 +83,12 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
return projectRecordVo; return projectRecordVo;
} }
@Override
public ProjectRecordVo queryScore(Integer userId) {
ProjectRecordVo projectRecordVo = this.baseMapper.queryScore(userId);
return projectRecordVo;
}
@Override @Override
public void exportProjectRecord(HttpServletResponse response,Integer userId)throws Exception{ public void exportProjectRecord(HttpServletResponse response,Integer userId)throws Exception{
//获取数据 //获取数据

@ -33,12 +33,12 @@ public class SignatureServiceImpl extends ServiceImpl<SignatureDao, SignatureEnt
@Override @Override
@Transactional @Transactional
public R uploadSignature(MultipartFile file, Integer userId) throws IOException { public R uploadSignature(MultipartFile file, Integer userId) throws IOException {
String roleIds = signatureDao.queryRoleIds(userId); // String roleIds = signatureDao.queryRoleIds(userId);
if (roleIds==null){ // if (roleIds==null){
return R.error("不存在的角色"); // return R.error("不存在的角色");
}else if (!roleIds.contains("3")){ // }else if (!roleIds.contains("3")){
return R.error("您的身份不是老师,不能进行此操作!"); // return R.error("您的身份不是老师,不能进行此操作!");
} // }
//图片格式校验 //图片格式校验
// String reg = ".+(.JPEG|.jpeg|.JPG|.jpg|.GIF|.gif|.BMP|.bmp|.PNG|.png)$"; // String reg = ".+(.JPEG|.jpeg|.JPG|.jpg|.GIF|.gif|.BMP|.bmp|.PNG|.png)$";
// if (StringUtils.isBlank(file.getOriginalFilename()) // if (StringUtils.isBlank(file.getOriginalFilename())

@ -82,6 +82,16 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao,StudentEntity> im
return pageUtils; return pageUtils;
} }
@Override
public R queryStudentDetails(Integer userId) {
StudentVo saveStudent = studentDao.queryStudentDetails(userId);
if (saveStudent!=null){
return R.ok().put("data",saveStudent);
}else {
return R.error(300,"用户不存在!");
}
}
@Transactional @Transactional
@Override @Override
public boolean deleteStudent(List<Integer> studentId) { public boolean deleteStudent(List<Integer> studentId) {

@ -221,4 +221,10 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoDao, UserInfoEntity
UserInfoEntity result = userInfoDao.queryUserAccount();//取一个账号 UserInfoEntity result = userInfoDao.queryUserAccount();//取一个账号
return R.ok().put("data",result); return R.ok().put("data",result);
} }
@Override
public Integer getUserId(String token) {
Integer userId = userInfoDao.getUserId(token);
return userId;
}
} }

@ -2,17 +2,67 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.msdw.tms.dao.AchievementManagementDao"> <mapper namespace="com.msdw.tms.dao.AchievementManagementDao">
<resultMap id="achievementMap" type="com.msdw.tms.entity.ExperimentalReportEntity"> <!-- 通用查询映射结果 -->
<result property="experimentalClassName" column="experimental_class_name"></result> <resultMap id="BaseResultMap" type="com.msdw.tms.entity.ExperimentalReportEntity">
<id column="reportId" property="reportId"/>
<result column="projectId" property="projectId"/>
<result column="principle" property="principle"/>
<result column="content" property="content"/>
<result column="data" property="data"/>
<result column="analysis" property="analysis"/>
<result column="conclusion" property="conclusion"/>
<result column="summarize" property="summarize"/>
<result column="purpose" property="purpose"/>
<result column="improvement" property="improvement"/>
<result column="comment" property="comment"/>
<result column="studentId" property="studentId"/>
<result column="teacherName" property="teacherName"/>
<result column="period" property="period"/>
<result column="laboratory" property="laboratory"/>
<result column="equipment" property="equipment"/>
<result column="score" property="score"/>
<result column="timeConsuming" property="timeConsuming"/>
<result column="startTime" property="startTime"/>
<result column="creationTime" property="creationTime"/>
<result column="className" property="className"/>
<result column="steps1" property="steps1"/>
<result column="steps2" property="steps2"/>
<result column="steps3" property="steps3"/>
<result column="steps4" property="steps4"/>
<result column="steps5" property="steps5"/>
<result column="steps6" property="steps6"/>
<result column="steps7" property="steps7"/>
<result column="steps8" property="steps8"/>
<result column="steps9" property="steps9"/>
<result column="steps10" property="steps10"/>
<result column="projectName" property="projectName"/>
<result column="workNumber" property="workNumber"/>
</resultMap> </resultMap>
<insert id="addReport"> <select id="getReport" resultMap="BaseResultMap" parameterType="com.msdw.tms.entity.ExperimentalReportEntity">
INSERT INTO tms_experimental_report ( projectId, content, principle, step, analysis, summarize, improvement, commentId, studentId, teacherName, period, laboratory,eventId ) SELECT her.*,pm.projectName,s.workNumber FROM
VALUES hr_experimental_report her,hr_project_management pm,student s
(#{projectId},#{content}, #{principle}, #{step}, #{analysis}, #{summarize}, #{improvement}, #{commentId}, #{studentId}, #{teacherName}, #{period}, #{laboratory},#{eventId}) WHERE her.reportId = #{reportId} and her.studentId = #{studentId} and her.projectId = pm.projectId and her.studentId = s.userId
</select>
<select id="getScore" resultType="com.msdw.tms.entity.vo.UserScoreVO" parameterType="com.msdw.tms.entity.vo.UserScoreVO">
SELECT id,score,tradingJudgmentPointsId,projectId,systemId,userId,isCorrect,reportId,userAnswers
FROM hr_user_score WHERE reportId = #{reportId} and userId = #{userId}
</select>
<!-- <resultMap id="achievementMap" type="com.msdw.tms.entity.ExperimentalReportEntity">-->
<!-- <result property="experimentalClassName" column="experimental_class_name"></result>-->
<!-- </resultMap>-->
<insert id="addReport" useGeneratedKeys="true" keyProperty="reportId">
INSERT INTO hr_experimental_report( projectId, content, principle, step, analysis, summarize, improvement,
commentId, studentId, period,laboratory,className,steps1,steps2,steps3,steps4,steps5,steps6,steps7,steps8,steps9,steps10,timeConsuming,startTime,creationTime,purpose,teacherName)
VALUES
(#{projectId},#{content}, #{principle}, #{step}, #{analysis}, #{summarize}, #{improvement}, #{commentId}, #{studentId},
#{period}, #{laboratory},#{className},#{steps1},#{steps2},#{steps3},#{steps4},#{steps5},#{steps6},#{steps7},#{steps8},#{steps9},#{steps10},#{timeConsuming},#{startTime},#{creationTime},#{purpose},#{teacherName})
</insert> </insert>
<update id="deleteReport"> <update id="deleteReport">
UPDATE tms_project_record tpr,tms_experimental_report tcr SET tpr.isdel = 1 , tcr.isdel = 1 WHERE tpr.recordid = tcr.eventId AND tcr.reportId = #{reportId} 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}
</update> </update>
<update id="updateComment"> <update id="updateComment">
UPDATE tms_experimental_report SET `comment` = #{comment} WHERE reportId = #{reportId} UPDATE tms_experimental_report SET `comment` = #{comment} WHERE reportId = #{reportId}
@ -21,7 +71,7 @@ VALUES
<update id="updateSignatrue"> <update id="updateSignatrue">
UPDATE tms_experimental_report SET isSignature = #{isSignature} , signatureId = #{signatureId}, `comment` = #{comment} WHERE reportId = #{reportId} UPDATE tms_experimental_report SET isSignature = #{isSignature} , signatureId = #{signatureId}, `comment` = #{comment} WHERE reportId = #{reportId}
</update> </update>
<select id="queryReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
ter.reportId, ter.reportId,
IFNULL( ter.`comment`, ( SELECT `comment` FROM tms_comment WHERE id = commentId ) ) AS comment, IFNULL( ter.`comment`, ( SELECT `comment` FROM tms_comment WHERE id = commentId ) ) AS comment,
@ -57,7 +107,7 @@ FROM
WHERE WHERE
reportId = #{reportId} reportId = #{reportId}
</select> </select>
<select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
u.userName, u.userName,
sch.schoolName, sch.schoolName,
@ -125,7 +175,7 @@ WHERE
tcr.reportId tcr.reportId
ORDER BY tpr.submitTime DESC ORDER BY tpr.submitTime DESC
</select> </select>
<select id="queryFictitiousRecord" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryFictitiousRecord" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
hpm.projectName, hpm.projectName,
hpm.creationTime AS creationtime, hpm.creationTime AS creationtime,
@ -157,7 +207,7 @@ WHERE
ORDER BY ORDER BY
creationtime DESC,tcr.reportId DESC creationtime DESC,tcr.reportId DESC
</select> </select>
<select id="queryEducationRecord" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryEducationRecord" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
hpm.projectName, hpm.projectName,
hpm.creationTime AS creationtime, hpm.creationTime AS creationtime,
@ -191,7 +241,7 @@ WHERE
ORDER BY ORDER BY
creationtime DESC,tcr.reportId DESC creationtime DESC,tcr.reportId DESC
</select> </select>
<select id="queryFictitiousReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryFictitiousReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
u.userName, u.userName,
sch.schoolName, sch.schoolName,
@ -251,7 +301,7 @@ GROUP BY
<select id="queryEvaluationName" resultType="java.lang.String"> <select id="queryEvaluationName" resultType="java.lang.String">
SELECT project_name AS evaluationName FROM tms_experimental_teaching WHERE project_id = #{projectId} SELECT project_name AS evaluationName FROM tms_experimental_teaching WHERE project_id = #{projectId}
</select> </select>
<select id="queryPythonTest" resultType="com.msdw.tms.entity.vo.AchievementManagementVo"> <select id="queryPythonTest" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT SELECT
hec.`code` AS userAnswer, hec.`code` AS userAnswer,
hec.codeId, hec.codeId,
@ -275,4 +325,55 @@ GROUP BY
ORDER BY ORDER BY
hec.codeId ASC hec.codeId ASC
</select> </select>
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity">
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM hr_experimental_report her where hpm.projectId = her.projectId ) as number
FROM hr_project_management hpm WHERE systemId = #{systemId}
AND hpm.isdel = 0
<if test="projectPermissions!=null and projectPermissions!=''"> AND hpm.projectPermissions = #{projectPermissions} </if>
<if test="searchContant!=null and searchContant!=''"> and hpm.projectName like concat('%',#{searchContant},'%')</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''"> and hpm.creationTime between #{endTime} and #{startTime}</if>
<if test="month!=null and month != ''">and DATE_SUB(CURDATE(), INTERVAL #{month} month ) &lt;= date(hpm.creationTime)</if>
ORDER BY hpm.creationTime DESC
</select>
<select id="newList" resultType="com.msdw.tms.entity.ResultsEntity">
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as experimentalName,et.project_id as projectId,
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM hr_experimental_report her where et.project_id = her.projectId ) as number
FROM tms_experimental_teaching et,hr_project_management pm
WHERE user_id = #{userId}
AND et.project_id = pm.projectId
AND pm.isdel = 0
<if test="searchContant!=null and searchContant!=''"> and et.experimental_class_name like concat('%',#{searchContant},'%') or et.experimental_name like concat('%',#{searchContant},'%') or pm.projectName like concat('%',#{searchContant},'%') </if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''"> and et.creation_time between #{endTime} and #{startTime}</if>
<if test="month!=null and month != ''">and DATE_SUB(CURDATE(), INTERVAL #{month} month ) &lt;= date(et.creation_time)</if>
ORDER BY et.creation_time DESC
</select>
<select id="reportList" resultType="com.msdw.tms.entity.ReportEntity">
SELECT hui.userId,her.reportId,hui.userName as studentName,s.schoolName,stu.workNumber,her.score,her.creationTime
FROM hr_experimental_report her,hr_user_info hui,school s,student stu
WHERE her.projectId = #{projectId}
AND her.studentId = hui.userId
AND her.studentId = stu.userId
AND hui.schoolId = s.schoolId
AND her.isdel = 0
<if test="searchContant!=null and searchContant!=''"> AND (hui.userName LIKE CONCAT('%',#{searchContant},'%') OR s.schoolName LIKE CONCAT('%',#{searchContant},'%') )</if>
ORDER BY her.creationTime desc
</select>
<select id="getTeacher" resultType="java.lang.String">
SELECT hui.userName FROM hr_project_management pm,hr_user_info hui
WHERE pm.projectId = #{projectId} and pm.userId = hui.userId
</select>
<select id="queryTradingJudgmentPointsId" resultType="java.lang.Integer">
SELECT tradingJudgmentPointsId FROM hr_user_score
WHERE reportId = #{reportId}
</select>
<select id="getUserAnswers" resultType="com.msdw.tms.entity.vo.JudgmentPointsRuleVO">
SELECT tjp.judgment_points_name as judgmentPointsName,ru.type,ru.id,ru.level_one as levelOne,ru.level_two as levelTwo,ru.level_three as levelThree,ru.level_four as levelFour,ru.trading_judgment_points_id as tradingJudgmentPointsId
FROM hr_trading_judgment_points_rule ru,hr_trading_judgment_points tjp
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId} and ru.trading_judgment_points_id = tjp.id
</select>
</mapper> </mapper>

@ -14,7 +14,7 @@
<result property="endtime" column="endTime"/> <result property="endtime" column="endTime"/>
<result property="submitTime" column="submitTime"/> <result property="submitTime" column="submitTime"/>
<result property="isdel" column="isdel"/> <result property="isdel" column="isdel"/>
<result property="experimental_class_name" column="experimentalClassName"/> <!-- <result property="experimental_class_name" column="experimentalClassName"/>-->
</resultMap> </resultMap>
<insert id="addReport" useGeneratedKeys="true" keyProperty="eventId" keyColumn="recordId"> <insert id="addReport" useGeneratedKeys="true" keyProperty="eventId" keyColumn="recordId">
INSERT INTO tms_project_record ( userId, projectId, score, startingTime, endTime, timeSum, submitTime ) INSERT INTO tms_project_record ( userId, projectId, score, startingTime, endTime, timeSum, submitTime )
@ -24,23 +24,24 @@ VALUES
<select id="getByUserRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo"> <select id="getByUserRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT SELECT
tpr.recordId, her.reportId as reportId,
tpr.projectId, her.projectId,
projectName, projectName,
score, her.score,
timeSum, her.timeConsuming,
startingTime as startTime, her.startTime,
endTime, her.creationTime as endTime,
recordState her.className
FROM FROM
tms_project_record tpr hr_experimental_report her
LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON her.projectId = tp.projectId
WHERE WHERE
tpr.userId = #{pro.userid} her.studentId = #{pro.userid}
AND AND
tpr.isdel = #{pro.isdel} her.isdel = 0
AND AND
tp.projectPermissions =0 tp.projectPermissions = #{projectPermissions}
order by her.creationTime desc
</select> </select>
<!-- --> <!-- -->
@ -117,6 +118,10 @@ VALUES
and and
u.isdel = #{isdel} u.isdel = #{isdel}
</select> </select>
<!-- 个人实验预览-->
<select id="queryScore" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT count(*) as experimentNumber,sum(timeConsuming) as totalTime, avg(score) as avgScore FROM hr_experimental_report where studentId = 547
</select>
<select id="getBySchoolRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo"> <select id="getBySchoolRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT SELECT

@ -2,6 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.msdw.tms.dao.StudentDao"> <mapper namespace="com.msdw.tms.dao.StudentDao">
<select id="queryStudentDetails" resultType="com.msdw.tms.entity.vo.StudentVo">
SELECT
u.userId,
u.userName,
s.workNumber
FROM
hr_user_info u,
student s
WHERE
u.userId = #{userId}
AND u.userId = s.userId
AND u.isdel = 0
AND s.isdel = 0
</select>
<select id="queryStudent" resultType="com.msdw.tms.entity.vo.StudentVo"> <select id="queryStudent" resultType="com.msdw.tms.entity.vo.StudentVo">
SELECT SELECT
l.schoolId, l.schoolId,
@ -72,6 +87,7 @@ WHERE
AND s.isdel = 0 AND s.isdel = 0
</select> </select>
<insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId"> <insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId">
INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId ) INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId )
VALUES VALUES

@ -287,5 +287,8 @@
<select id="queryStudentName" resultType="java.lang.String"> <select id="queryStudentName" resultType="java.lang.String">
SELECT userName FROM hr_user_info WHERE userId = #{userId} AND isdel = 0 SELECT userName FROM hr_user_info WHERE userId = #{userId} AND isdel = 0
</select> </select>
<select id="getUserId" resultType="java.lang.Integer">
SELECT userId FROM hr_user_info where token = #{token} and isdel = 0
</select>
</mapper> </mapper>
Loading…
Cancel
Save