package com.ard.system.api;
|
|
import com.ard.common.core.constant.SecurityConstants;
|
import com.ard.common.core.constant.ServiceNameConstants;
|
import com.ard.common.core.domain.R;
|
import com.ard.common.core.web.domain.TreeDeptWell;
|
import com.ard.system.api.domain.SysDept;
|
import com.ard.system.api.factory.RemoteDeptFallbackFactory;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 部门服务
|
*
|
* @author ard
|
*/
|
@FeignClient(contextId = "remoteDeptService",value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteDeptFallbackFactory.class)
|
public interface RemoteDeptService
|
{
|
/**
|
* 根据deptList查询出用户及以下的所有部门信息
|
*
|
* @param deptIds deptIds
|
* @return 用户对象信息列表
|
*/
|
@GetMapping(value ="/dept/allByUser/{deptIds}")
|
public R<List<SysDept>> getAllByUser(@PathVariable("deptIds") Long[] deptIds, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
/**
|
* 根据部门编号获取部门详细信息
|
*
|
* @param deptId deptId
|
* @return 用户对象信息
|
*/
|
@GetMapping(value = "/dept/selectDeptById/{deptId}")
|
public R<SysDept> getDeptById(@PathVariable("deptId") Long deptId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
/**
|
* 预留结构的树形
|
*
|
* @param depts depts
|
* @return 用户对象信息
|
*/
|
@PostMapping(value = "/dept/wellTree")
|
public R<List<TreeDeptWell>> getWellTree(@RequestBody List<TreeDeptWell> depts, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
/**
|
* 根据deptId获取当前及所属下级,所有deptId
|
*
|
* @param deptId 部门id
|
* @param source 请求来源
|
* @return 用户对象信息
|
*/
|
@GetMapping("/dept/deptIdBySub/{deptId}")
|
public R<List<Long>> getDeptIdBySub(@PathVariable("deptId")Long deptId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
/**
|
* 根据井号查询井所在作业班和作业区
|
*
|
* @param wellId 井id
|
* @param source 请求来源
|
* @return 用户对象信息
|
*/
|
@GetMapping("/dept/getZYBAndZYQByWellId/{wellId}")
|
public R<Map<String ,String>> getZYBAndZYQByWellId(@PathVariable("wellId")String wellId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
}
|