|
|
|
@ -8,8 +8,11 @@ import java.util.Set; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import com.hxhq.business.domain.Study; |
|
|
|
import com.hxhq.business.dto.select.DeptUserTreeDto; |
|
|
|
import com.hxhq.business.enums.dept.DeptTypeEnum; |
|
|
|
import com.hxhq.business.enums.study.StudyTypeEnum; |
|
|
|
import com.hxhq.business.service.IStudyService; |
|
|
|
import com.hxhq.system.dto.UserExportDto; |
|
|
|
import com.hxhq.system.service.ISysConfigService; |
|
|
|
import org.apache.commons.lang3.ArrayUtils; |
|
|
|
@ -77,6 +80,8 @@ public class SysUserController extends BaseController |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private TokenService tokenService; |
|
|
|
@Autowired |
|
|
|
private IStudyService studyService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取用户列表 |
|
|
|
@ -450,10 +455,14 @@ public class SysUserController extends BaseController |
|
|
|
@GetMapping("/studyUser") |
|
|
|
public AjaxResult studyUser(Long studyId,Long studySubjectId,String permit) |
|
|
|
{ |
|
|
|
if((studyId==null || studyId.longValue()<=0) && StringUtils.isBlank(permit)){ |
|
|
|
if(studyId==null || studyId.longValue()<=0){ |
|
|
|
return AjaxResult.success(new ArrayList<>()); |
|
|
|
} |
|
|
|
List<DeptUserTreeDto> depts = userService.selectStudyUser(studyId,studySubjectId,permit); |
|
|
|
Study study = studyService.getById(studyId); |
|
|
|
if(study==null){ |
|
|
|
return AjaxResult.error("信息不存在"); |
|
|
|
} |
|
|
|
List<DeptUserTreeDto> depts = userService.selectStudyUser(study.getType().equals(StudyTypeEnum.sy.getValue())?studyId:null,study.getType().equals(StudyTypeEnum.sy.getValue())?studySubjectId:null,study.getDeptId(),permit); |
|
|
|
return success(depts); |
|
|
|
} |
|
|
|
} |