|
@@ -10,6 +10,7 @@ import com.qmth.teachcloud.common.entity.SysUser;
|
|
import com.qmth.teachcloud.common.enums.RoleTypeEnum;
|
|
import com.qmth.teachcloud.common.enums.RoleTypeEnum;
|
|
import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
|
|
import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
|
|
import com.qmth.teachcloud.common.service.SysOrgService;
|
|
import com.qmth.teachcloud.common.service.SysOrgService;
|
|
|
|
+import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
@@ -21,6 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -40,6 +42,8 @@ public class SysOrgController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private PrintCommonService printCommonService;
|
|
private PrintCommonService printCommonService;
|
|
|
|
+ @Resource
|
|
|
|
+ private TeachcloudCommonService teachcloudCommonService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询机构树
|
|
* 查询机构树
|
|
@@ -50,8 +54,10 @@ public class SysOrgController {
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
public Result list(@RequestParam(value = "specialPrivilege", required = false) RoleTypeEnum specialPrivilege,
|
|
public Result list(@RequestParam(value = "specialPrivilege", required = false) RoleTypeEnum specialPrivilege,
|
|
@RequestParam(value = "withoutPrintingRoom", required = false) boolean withoutPrintingRoom,
|
|
@RequestParam(value = "withoutPrintingRoom", required = false) boolean withoutPrintingRoom,
|
|
- @ApiParam(value = "科目编码") @RequestParam(required = false) String courseCode) {
|
|
|
|
- return ResultUtil.ok(sysOrgService.listOrgTree(specialPrivilege, withoutPrintingRoom, courseCode));
|
|
|
|
|
|
+ @ApiParam(value = "科目编码") @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "父机构ID") @RequestParam(required = false) Long orgId) {
|
|
|
|
+ Set<Long> longSet = teachcloudCommonService.listSubOrgIds(orgId);
|
|
|
|
+ return ResultUtil.ok(sysOrgService.listOrgTree(specialPrivilege, withoutPrintingRoom, courseCode, longSet));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|