diff --git a/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java b/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java index 44f3b3a..2214022 100644 --- a/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java +++ b/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java @@ -18,7 +18,7 @@ public interface ProjectRcordControllerApi { Integer recordState,String condition); @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 = "用户端教学实验记录") R getUserExperimentscore(Integer page,Integer size,Integer userid); diff --git a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java index 0235cb4..9f1d364 100644 --- a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java +++ b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java @@ -63,8 +63,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi { */ @Override @GetMapping("/user/record") - public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){ - PageUtils page1 = projectRecordService.queryPage(page,size,userId,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,systemId); return R.ok().put("data", page1); } diff --git a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java index 4d4f96b..6cfa531 100644 --- a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java +++ b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java @@ -23,7 +23,7 @@ import java.util.List; @Mapper public interface ProjectRecordDao extends BaseMapper { - IPage getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions); + IPage getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions,@Param("systemId") Integer systemId); IPage getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity); diff --git a/src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java b/src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java index 5155336..386b14b 100644 --- a/src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java +++ b/src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java @@ -22,6 +22,15 @@ public class GetByUserRecordResp { private String submitTime; private Integer timeSum; private Integer userId; + private Integer systemId; + + public Integer getSystemId() { + return systemId; + } + + public void setSystemId(Integer systemId) { + this.systemId = systemId; + } public String getProjectName() { return projectName; diff --git a/src/main/java/com/msdw/tms/service/ProjectRecordService.java b/src/main/java/com/msdw/tms/service/ProjectRecordService.java index 780ad3d..377cc13 100644 --- a/src/main/java/com/msdw/tms/service/ProjectRecordService.java +++ b/src/main/java/com/msdw/tms/service/ProjectRecordService.java @@ -17,7 +17,7 @@ import java.util.List; */ public interface ProjectRecordService extends IService { - 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); diff --git a/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java index 211960c..255a4ba 100644 --- a/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java @@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl page1 = new Page<>(page, size); - IPage projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions); + IPage projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions,systemId); PageUtils questionsPage = new PageUtils(projectRecordVos); diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index 5b67e32..07900c6 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -52,13 +52,15 @@ r.startingTime, r.submitTime, r.timeSum, - c.userId + c.userId, + t.systemId FROM hr_experiment_code c INNER JOIN hr_project_management t ON t.projectId = c.projectId INNER JOIN tms_project_record r ON r.recordId = c.recordId WHERE c.userId = #{userId} and r.isdel = 0 and projectPermissions = #{projectPermissions} + and t.systemId = #{systemId} GROUP BY c.recordId desc