学生端实验记录考核列表增加系统筛选

hehai
rong.liu 4 years ago
parent 197bf12d25
commit 201b6f5b35
  1. 2
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  2. 69
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  3. 6
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  4. 13
      src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java
  5. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  6. 12
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  7. 39
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -25,7 +25,7 @@ public interface ProjectRcordControllerApi {
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid);
R getUserExperimentscore(Integer page,Integer size,Integer userid, Integer systemId);
@ApiOperation(value = "个人实验概览",notes = "个人实验概览")
R queryScore(Integer userId);

@ -18,8 +18,6 @@ import java.util.HashMap;
import java.util.List;
/**
*
*
* @author
* @email
* @date 2020-08-19 16:07:02
@ -35,27 +33,32 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/schoolRecord")
public R list(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer month,@RequestParam String startTime,@RequestParam String endTime,
@RequestParam Integer recordState,@RequestParam String condition ){
public R list(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer month, @RequestParam String startTime, @RequestParam String endTime,
@RequestParam Integer recordState, @RequestParam String condition) {
ProjectRecordVo recordVo = new ProjectRecordVo();
if(!StringUtils.isEmpty(month)) {
if (!StringUtils.isEmpty(month)) {
recordVo.setMonth(month);
}if(!StringUtils.isEmpty(startTime)) {
}
if (!StringUtils.isEmpty(startTime)) {
recordVo.setStartTime(startTime);
}if(!StringUtils.isEmpty(endTime)) {
}
if (!StringUtils.isEmpty(endTime)) {
recordVo.setEndTime(endTime);
}if(!StringUtils.isEmpty(recordState)) {
}
if (!StringUtils.isEmpty(recordState)) {
recordVo.setRecordstate(recordState);
}if(!StringUtils.isEmpty(condition)){
}
if (!StringUtils.isEmpty(condition)) {
recordVo.setCondition(condition);
}
PageUtils page1 = projectRecordService.querySchoolRecord(page,size,recordVo);
PageUtils page1 = projectRecordService.querySchoolRecord(page, size, recordVo);
return R.ok().put("page", page1);
}
/**
* 用户端虚拟仿真实验记录
*
* @param page
* @param size
* @param
@ -63,13 +66,14 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/record")
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions,@RequestParam Integer systemId){
PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions,systemId);
public R queryUserRecord(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer userId, @RequestParam Integer projectPermissions, @RequestParam Integer systemId) {
PageUtils page1 = projectRecordService.queryPage(page, size, userId, projectPermissions, systemId);
return R.ok().put("data", page1);
}
/**
* 科大用户端虚拟仿真实验记录
*
* @param page
* @param size
* @param
@ -77,13 +81,14 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/kdRecord")
public R kdRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions,@RequestParam Integer systemId){
PageUtils page1 = projectRecordService.getByKDUserRecord(page,size,userId,projectPermissions,systemId);
public R kdRecord(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer userId, @RequestParam Integer projectPermissions, @RequestParam Integer systemId) {
PageUtils page1 = projectRecordService.getByKDUserRecord(page, size, userId, projectPermissions, systemId);
return R.ok().put("data", page1);
}
/**
* 用户端教学实验记录
*
* @param page
* @param size
* @param userid
@ -91,20 +96,21 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/experimentRecord")
public R getUserExperimentscore(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userid){
PageUtils page1 = projectRecordService.queryExperimentPage(page,size,userid);
public R getUserExperimentscore(@RequestParam Integer page, @RequestParam Integer size, @RequestParam Integer userid, @RequestParam Integer systemId) {
PageUtils page1 = projectRecordService.queryExperimentPage(page, size, userid, systemId);
return R.ok().put("data", page1);
}
/**
* 个人实验预览
*
* @param userId
* @return
*/
@Override
@GetMapping("/user/queryScore/{userId}")
public R queryScore(@PathVariable("userId") Integer userId){
public R queryScore(@PathVariable("userId") Integer userId) {
ProjectRecordVo projectRecord = projectRecordService.queryScore(userId);
return R.ok().put("data", projectRecord);
@ -112,12 +118,13 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 个人实验预览
*
* @param userid
* @return
*/
@Override
@GetMapping("/user/score/{userId}")
public R getUserScore(@PathVariable("userId") Integer userid){
public R getUserScore(@PathVariable("userId") Integer userid) {
ProjectRecordVo projectRecord = projectRecordService.queryUserScore(userid);
return R.ok().put("data", projectRecord);
@ -125,35 +132,37 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
/**
* 导出个人虚拟仿真实验记录
*
* @param response
* @param userId
* @throws Exception
*/
@Override
@GetMapping("/user/exportProjectRecord")
public void exportProjectRecord(HttpServletResponse response,@RequestParam("userId") Integer userId)throws Exception{
projectRecordService.exportProjectRecord(response,userId);
public void exportProjectRecord(HttpServletResponse response, @RequestParam("userId") Integer userId) throws Exception {
projectRecordService.exportProjectRecord(response, userId);
}
/**
* 导出个人教学实验记录
*
* @param response
* @param userId
* @throws Exception
*/
@Override
@GetMapping("/user/exportExperimentProjectRecord")
public void exportExperimentProjectRecord(HttpServletResponse response,@RequestParam("userId") Integer userId)throws Exception{
projectRecordService.exportExperimentProjectRecord(response,userId);
public void exportExperimentProjectRecord(HttpServletResponse response, @RequestParam("userId") Integer userId) throws Exception {
projectRecordService.exportExperimentProjectRecord(response, userId);
}
/**
* 信息
*/
@GetMapping("/info/{recordid}")
public R info(@PathVariable("recordid") Integer recordid){
ProjectRecordEntity projectRecord = projectRecordService.getById(recordid);
public R info(@PathVariable("recordid") Integer recordid) {
ProjectRecordEntity projectRecord = projectRecordService.getById(recordid);
return R.ok().put("projectRecord", projectRecord);
}
@ -162,8 +171,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody ProjectRecordEntity projectRecord){
projectRecordService.save(projectRecord);
public R save(@RequestBody ProjectRecordEntity projectRecord) {
projectRecordService.save(projectRecord);
return R.ok();
}
@ -173,10 +182,10 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@PutMapping("/update")
public R update(@RequestBody ProjectRecordEntity projectRecord){
public R update(@RequestBody ProjectRecordEntity projectRecord) {
boolean result = projectRecordService.updateUserRecord(projectRecord);
return R.ok().put("data",result);
return R.ok().put("data", result);
}
/**
@ -184,8 +193,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@DeleteMapping("/delete")
public R delete(@RequestBody Integer[] recordids){
projectRecordService.removeByIds(Arrays.asList(recordids));
public R delete(@RequestBody Integer[] recordids) {
projectRecordService.removeByIds(Arrays.asList(recordids));
return R.ok();
}

@ -23,11 +23,11 @@ import java.util.List;
@Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<ProjectRecordVo> getByKDUserRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity,Integer projectPermissions);
IPage<ProjectRecordVo> getByKDUserRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity, Integer projectPermissions);
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions,@Param("systemId") Integer systemId);
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions, @Param("systemId") Integer systemId);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity, Integer systemId);
List<ProjectRecordExportVo> getByUserRecordImport(ProjectRecordEntity projectRecordEntity);

@ -51,7 +51,7 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
/**
* 平均分
*/
private double avgScore;
private double avgScore;
/**
* 几个月
*/
@ -59,7 +59,7 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
/**
* 查询条件
*/
private String condition;
private String condition;
/**
* 开始时间
*/
@ -76,7 +76,9 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 待评分
*/
private Integer tobescored;
/** 记录状态(0 未修改,1 已修改)*/
/**
* 记录状态0 未修改1 已修改
*/
private Integer recordState;
// =====================================记录实验项目信息
/**
@ -109,4 +111,9 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
*/
private Integer schoolId;
/**
* 系统id
*/
private Integer systemId;
}

@ -20,7 +20,7 @@ public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid,Integer systemId);
ProjectRecordVo queryUserScore(Integer userId);

@ -38,14 +38,14 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Override
public PageUtils getByKDUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId) {
public PageUtils getByKDUserRecord(Integer page, Integer size, Integer userId, Integer projectPermissions, Integer systemId) {
ProjectRecordEntity projectRecord = new ProjectRecordEntity().setUserid(userId);
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByKDUserRecord(page1,projectRecord,projectPermissions);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByKDUserRecord(page1, projectRecord, projectPermissions);
PageUtils questionsPage = new PageUtils(projectRecordVos);
@ -53,7 +53,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
}
@Override
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId) {
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions, Integer systemId) {
/*GetByUserRecordResp projectRecord = new GetByUserRecordResp();
projectRecord.setUserId(userId);*/
@ -61,7 +61,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions,systemId);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions, systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos);
@ -69,14 +69,14 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
}
@Override
public PageUtils queryExperimentPage(Integer page, Integer size, Integer userid) {
public PageUtils queryExperimentPage(Integer page, Integer size, Integer userid, Integer systemId) {
ProjectRecordEntity projectRecord = new ProjectRecordEntity().setUserid(userid).setIsdel(Constant.IsDel.NOT_DEL.getType());
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserExperimentRecord(page1, projectRecord);
IPage<ProjectRecordVo> projectRecordVos = this.baseMapper.getByUserExperimentRecord(page1, projectRecord, systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos);

@ -22,26 +22,21 @@
</insert>
<select id="getByKDUserRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT
her.reportId as reportId,
her.projectId,
projectName,
her.score,
her.timeConsuming,
her.startTime,
her.creationTime as endTime,
her.className
FROM
hr_experimental_report her
LEFT JOIN hr_project_management tp ON her.projectId = tp.projectId
WHERE
her.studentId = #{pro.userid}
AND
her.isdel = 0
AND
tp.projectPermissions = #{projectPermissions}
order by her.creationTime desc
<select id="getByKDUserRecord" resultType="com.msdw.tms.entity.vo.ProjectRecordVo">
SELECT her.reportId as reportId,
her.projectId,
projectName,
her.score,
her.timeConsuming,
her.startTime,
her.creationTime as endTime,
her.className
FROM hr_experimental_report her
LEFT JOIN hr_project_management tp ON her.projectId = tp.projectId
WHERE her.studentId = #{pro.userid}
AND her.isdel = 0
AND tp.projectPermissions = #{projectPermissions}
order by her.creationTime desc
</select>
@ -81,12 +76,14 @@
startingTime as startTime,
endTime,
recordState,
tet.experimental_class_name as experimentalClassName
tet.experimental_class_name as experimentalClassName,
systemId
FROM tms_project_record tpr
LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid}
and systemId = #{systemId}
AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0
AND

Loading…
Cancel
Save