Przeglądaj źródła

教务端,根据合作单位获取合作单位(学校)列表

river 4 lat temu
rodzic
commit
82c1659285

+ 10 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduOrganizationController.java

@@ -1,10 +1,12 @@
 package com.ym.mec.web.controller.education;
 
+import com.ym.mec.biz.service.CooperationOrganService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 @RequestMapping("eduOrganization")
@@ -14,10 +16,18 @@ public class EduOrganizationController extends BaseController {
 
     @Autowired
     private OrganizationService organizationService;
+    @Autowired
+    private CooperationOrganService cooperationOrganService;
 
     @ApiOperation(value = "获取员工所在分部列表")
     @GetMapping("/queryEmployeeOrgan")
     public Object queryEmployeeOrgan() throws Exception {
         return succeed(organizationService.queryEmployeeOrgan());
     }
+
+    @ApiOperation(value = "根据分部id获取合作单位(学校)列表")
+    @GetMapping("/queryByOrganId")
+    public Object queryByOrganId(String organId) {
+        return succeed(cooperationOrganService.queryByOrganId(organId));
+    }
 }