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