|
@@ -14,10 +14,13 @@ import com.ym.mec.biz.service.OrganizationService;
|
|
|
import com.ym.mec.biz.service.StudentManageService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -206,6 +209,25 @@ public class EmployeeController extends BaseController {
|
|
|
return succeed(map);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获取对应角色的员工")
|
|
|
+ @GetMapping("/queryEmployeeByRole")
|
|
|
+ public HttpResponseResult queryEmployeeByRole(Integer organId, String roleId){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed(HttpStatus.FORBIDDEN,"请登录");
|
|
|
+ }
|
|
|
+ String organIds = new String();
|
|
|
+ if(Objects.isNull(organId)){
|
|
|
+ Employee employee = employeeService.get(sysUser.getId());
|
|
|
+ if (StringUtils.isEmpty(organIds)) {
|
|
|
+ organIds = employee.getOrganIdList();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ organIds = organId.toString();
|
|
|
+ }
|
|
|
+ return succeed(employeeService.findByRole(roleId, organIds));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "获取教务老师")
|
|
|
@GetMapping("/findEducationTeacher")
|
|
|
public HttpResponseResult findEducationTeacher(Integer userId){
|