diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysUserController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysUserController.java index 1efddb2..3400132 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysUserController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysUserController.java @@ -421,9 +421,12 @@ public class SysUserController extends BaseController /** * 获取部门树列表 + * @param studyId + * @param studySubjectId + * @return */ @GetMapping("/deptUserList") - public AjaxResult deptUserList() + public AjaxResult deptUserList(Long studyId,Long studySubjectId) { List depts = userService.selectDeptAndUser(); for(DeptUserTreeDto dept : depts){ @@ -438,4 +441,21 @@ public class SysUserController extends BaseController } return success(depts); } + + /** + * 获取试验人员 + * @param studyId + * @param studySubjectId + * @param permit + * @return + */ + @GetMapping("/studyUser") + public AjaxResult studyUser(Long studyId,Long studySubjectId,String permit) + { + if(studyId==null || studyId.longValue()<=0){ + return AjaxResult.success(new ArrayList<>()); + } + List depts = userService.selectStudyUser(studyId,studySubjectId,permit); + return success(depts); + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java index 20290f5..b85716f 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java @@ -162,4 +162,13 @@ public interface SysUserMapper * @return */ List selectDeptAndUser(); + + /** + * 获取试验人员列表 + * @param studyId + * @param studySubjectId + * @param permit + * @return + */ + List selectStudyUser(@Param("studyId") Long studyId, @Param("studySubjectId") Long studySubjectId, @Param("permit") String permit); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java index 09f30e8..5528d22 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java @@ -235,6 +235,15 @@ public interface ISysUserService List selectDeptAndUser(); /** + * 试验人员列表 + * @param studyId + * @param studySubjectId + * @param permit + * @return + */ + List selectStudyUser(Long studyId,Long studySubjectId,String permit); + + /** * 检查密码是否正确 * @param userId * @param password diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java index fb06e81..c602fb1 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java @@ -581,6 +581,11 @@ public class SysUserServiceImpl implements ISysUserService } @Override + public List selectStudyUser(Long studyId, Long studySubjectId, String permit) { + return userMapper.selectStudyUser(studyId,studySubjectId,permit); + } + + @Override public Boolean checkPassword(Long userId, String password, Boolean needName) { SysUser sysUser = selectUserById(userId); if(sysUser==null){ diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml index 10d6eba..d15df5e 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -256,5 +256,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" (SELECT u.`user_id` AS id,u.`dept_id` AS parent_id,u.`nick_name` AS `name`,u.`user_name` AS `nameEn`,7 AS `type` FROM `sys_user` u WHERE u.`del_flag`='0' AND u.`user_id`<>1 ORDER BY u.`user_id` DESC) - + + + \ No newline at end of file