修改学生端实验记录

hehai
zhiyong.ning 4 years ago
parent 23be438192
commit 74ef0ce875
  1. 2
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  2. 4
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  3. 2
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  4. 9
      src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java
  5. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  6. 4
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  7. 4
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -18,7 +18,7 @@ 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,Integer projectPermissions); R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录") @ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid); R getUserExperimentscore(Integer page,Integer size,Integer userid);

@ -63,8 +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,@RequestParam Integer projectPermissions){ 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); PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions,systemId);
return R.ok().put("data", page1); return R.ok().put("data", page1);
} }

@ -23,7 +23,7 @@ import java.util.List;
@Mapper @Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> { public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions); 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);

@ -22,6 +22,15 @@ public class GetByUserRecordResp {
private String submitTime; private String submitTime;
private Integer timeSum; private Integer timeSum;
private Integer userId; private Integer userId;
private Integer systemId;
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public String getProjectName() { public String getProjectName() {
return projectName; return projectName;

@ -17,7 +17,7 @@ import java.util.List;
*/ */
public interface ProjectRecordService extends IService<ProjectRecordEntity> { public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions); 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);

@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Override @Override
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions) { public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId) {
/*GetByUserRecordResp projectRecord = new GetByUserRecordResp(); /*GetByUserRecordResp projectRecord = new GetByUserRecordResp();
projectRecord.setUserId(userId);*/ projectRecord.setUserId(userId);*/
@ -46,7 +46,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象 //分页对象
Page<T> page1 = new Page<>(page, size); Page<T> page1 = new Page<>(page, size);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions); IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions,systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos); PageUtils questionsPage = new PageUtils(projectRecordVos);

@ -52,13 +52,15 @@
r.startingTime, r.startingTime,
r.submitTime, r.submitTime,
r.timeSum, r.timeSum,
c.userId c.userId,
t.systemId
FROM hr_experiment_code c FROM hr_experiment_code c
INNER JOIN hr_project_management t ON t.projectId = c.projectId INNER JOIN hr_project_management t ON t.projectId = c.projectId
INNER JOIN tms_project_record r ON r.recordId = c.recordId INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId} WHERE c.userId = #{userId}
and r.isdel = 0 and r.isdel = 0
and projectPermissions = #{projectPermissions} and projectPermissions = #{projectPermissions}
and t.systemId = #{systemId}
GROUP BY c.recordId desc GROUP BY c.recordId desc
</select> </select>

Loading…
Cancel
Save