package jnpf.permission; import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.entity.PositionEntity; import jnpf.permission.fallback.OrganizeApiFallback; import jnpf.permission.model.authorize.AuthorizeConditionEnum; import jnpf.permission.model.organize.OrganizeConditionModel; import jnpf.utils.FeignName; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; /** * 获取组织信息Api * * @author JNPF开发平台组 * @version V3.1.0 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com) * @date 2021-03-24 */ @FeignClient(name = FeignName.PERMISSION_SERVER_NAME, fallback = OrganizeApiFallback.class, path = "/Organize") public interface OrganizeApi { /** * 通过id获取组织信息 * * @param organizeId * @return */ @GetMapping("/getInfoById/{organizeId}") OrganizeEntity getInfoById(@PathVariable("organizeId") String organizeId); /** * 获取组织信息 * * @return */ @GetMapping("/getList") List getList(); /** * 获取组织信息 * * @return */ @PostMapping("/getOrganizeName") List getOrganizeName(@RequestBody List id); /** * 通过fullName获取组织信息 * * @param fullName * @return */ @GetMapping("/getByFullName/{fullName}") OrganizeEntity getByFullName(@PathVariable("fullName") String fullName); /** * 获取组织信息 * * @return */ @GetMapping("/getOrganizeId/{organizeId}") List getOrganizeId(@PathVariable("organizeId") String organizeId); /** * 通过组织id树获取名称 * * @param organizeIdTree 组织id树 * @return 组织对象集合 */ @GetMapping("/organizeIdTree") String getFullNameByOrgIdTree(@RequestParam("organizeIdTree") String organizeIdTree); @GetMapping("/getOrgMap") Map getOrgMap(@RequestParam("type") String type,@RequestParam(value = "category",required = false) String category); /** * 获取父级组织id * * @param organizeEntity * @return */ @PostMapping("/getOrganizeIdTree") String getOrganizeIdTree(@RequestBody OrganizeEntity organizeEntity); @PostMapping("/save") void save(@RequestBody OrganizeEntity organizeEntity); @GetMapping("/getOrganizeByParentId") List getOrganizeByParentId(); @PutMapping("/updateOrganizeEntity/{organizeId}") void updateOrganizeEntity(@PathVariable("organizeId") String organizeId,@RequestBody OrganizeEntity organizeEntity); @GetMapping("/getOrganizeDepartmentAll/{organize}") List getOrganizeDepartmentAll(@PathVariable("organize") String organize); /** * 获取所有当前用户的组织及子组织 * * @param organizeId * @return */ @GetMapping("/getUnderOrganizations/{organizeId}") List getUnderOrganizations(@PathVariable("organizeId")String organizeId); @GetMapping("/upWardRecursion") List upWardRecursion(@RequestParam("organizeId")String organizeId); @GetMapping("/getOrgMapsAll") Map getOrgMapsAll(); @GetMapping("/removeOrganizeInfoList") void removeOrganizeInfoList(); @GetMapping("/getInfoList") Map getInfoList(); @GetMapping("/getAllOrgsTreeName") Map getAllOrgsTreeName(); @GetMapping("/getAllChild/{id}") List getAllChild(@PathVariable("id") String id); @GetMapping("/getDepsByParentId/{id}") List getDepsByParentId(@PathVariable("id") String id); /** * 根据id获取列表 * * @return */ @PostMapping("/getListByIds") List getListByIds(@RequestBody List idList); /** * 根据父id集合查询子岗位信息 * * @param idList 父岗位id集合 * @return 返回数据 */ @PostMapping("/getListByParentIds") List getListByParentIds(@RequestBody List idList); /** * 获取子孙岗位 * * @param idList * @return */ @PostMapping("/getProgeny") List getProgeny(@RequestBody List idList,@RequestParam(value = "enabledMark", required = false) Integer enabledMark); @GetMapping("/getNameByIdStr") String getNameByIdStr(@RequestParam ("idStr") String idStr); @PostMapping("/createOrg") void create(@RequestBody OrganizeEntity newOrg); @PostMapping("/updateOrg") void update(@RequestParam("id") String id, @RequestBody OrganizeEntity orgInfo); @GetMapping("/getAllList") List list(); }