From e38007d54ef318c909b5dcb23655ff63ce6f0fb9 Mon Sep 17 00:00:00 2001 From: "zhiyong.ning" <354350178@qq.com> Date: Wed, 10 Mar 2021 14:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msdw/tms/api/ProjectRcordControllerApi.java | 4 ++++ .../tms/controller/ProjectRecordController.java | 14 ++++++++++++++ .../java/com/msdw/tms/dao/ProjectRecordDao.java | 2 ++ .../msdw/tms/service/ProjectRecordService.java | 1 + .../service/impl/ProjectRecordServiceImpl.java | 15 +++++++++++++++ .../resources/mapper/tms/ProjectRecordDao.xml | 8 +++++--- 6 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java b/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java index 2214022..06eb889 100644 --- a/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java +++ b/src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java @@ -17,6 +17,10 @@ public interface ProjectRcordControllerApi { R list( Integer page, Integer size,Integer month,String startTime,String endTime, Integer recordState,String condition); + @ApiOperation(value = "科大用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录") + R kdRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId); + + @ApiOperation(value = "用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录") R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId); diff --git a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java index 9f1d364..55374c2 100644 --- a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java +++ b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java @@ -68,6 +68,20 @@ public class ProjectRecordController implements ProjectRcordControllerApi { return R.ok().put("data", page1); } + /** + * 科大用户端虚拟仿真实验记录 + * @param page + * @param size + * @param + * @return + */ + @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); + return R.ok().put("data", page1); + } + /** * 用户端教学实验记录 * @param page diff --git a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java index 6cfa531..ef3a655 100644 --- a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java +++ b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java @@ -23,6 +23,8 @@ import java.util.List; @Mapper public interface ProjectRecordDao extends BaseMapper { + IPage getByKDUserRecord(Page page,@Param("pro") ProjectRecordEntity projectRecordEntity,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/service/ProjectRecordService.java b/src/main/java/com/msdw/tms/service/ProjectRecordService.java index 377cc13..5da29f2 100644 --- a/src/main/java/com/msdw/tms/service/ProjectRecordService.java +++ b/src/main/java/com/msdw/tms/service/ProjectRecordService.java @@ -16,6 +16,7 @@ import java.util.List; * @date 2020-08-19 16:07:02 */ public interface ProjectRecordService extends IService { + PageUtils getByKDUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId); PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId); 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 255a4ba..df35b8f 100644 --- a/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java @@ -37,6 +37,21 @@ public class ProjectRecordServiceImpl extends ServiceImpl page1 = new Page<>(page, size); + + IPage projectRecordVos = this.baseMapper.getByKDUserRecord(page1,projectRecord,projectPermissions); + + PageUtils questionsPage = new PageUtils(projectRecordVos); + + return questionsPage; + } + @Override public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId) { diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index b45954e..132fe16 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -22,8 +22,8 @@ - + + +