@ -28,6 +28,14 @@ public interface RemoteDeptService {
*/
Long selectDeptLeaderById(Long deptId);
/**
* 根据部门ID查询分管副总
*
* @param deptId 部门ID,用于指定需要查询的部门
* @return 返回该部门的分管副总ID
Long selectDeptVicePresidentById(Long deptId);
* 查询部门
@ -55,6 +55,18 @@ public class RemoteDeptServiceImpl implements RemoteDeptService {
return vo.getLeader();
}
@Override
public Long selectDeptVicePresidentById(Long deptId) {
SysDeptVo vo = deptService.selectDeptById(deptId);
return vo.getVicePresident();
@ -35,4 +35,15 @@ public class SpelRuleComponent {
return leaderId;
* 通过发起人部门id获取分管副总
public Long selectDeptVicePresidentById(Long initiatorDeptId) {
Long vicePresidentId = deptService.selectDeptVicePresidentById(initiatorDeptId);
if (ObjectUtil.isNull(vicePresidentId)) {
throw new ServiceException("当前部门未设置分管副总,请联系管理员操作。");
return vicePresidentId;