1.0.46 通过业务方向获取业务方向负责人ID

dev
yinq 2 days ago
parent a9db3088c5
commit e63502f812

@ -3,11 +3,19 @@ package org.dromara.workflow.rule;
import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.exception.user.UserException;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.system.api.RemoteDeptService;
import org.dromara.system.api.RemoteUserService;
import org.dromara.system.api.model.LoginUser;
import org.dromara.workflow.common.ConditionalOnEnable;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
/**
* spel
* <p>
@ -46,4 +54,38 @@ public class SpelRuleComponent {
return vicePresidentId;
}
/**
*
* 1 ->
* 2 ->
* 3 ->
* 4 ->
* 5 ->
* 6 ->
* 7 ->
*/
private static final Map<Integer, Long> BUSINESS_DIRECTION_TO_USERNAME = new HashMap<Integer, Long>() {{
put(1, 1985254821554475009L);
put(2, 1985258519835889666L);
put(3, 1985251968270127105L);
put(4, 1985258519835889666L);
put(5, 1985254145713688578L);
put(6, 1985257496048226305L);
put(7, 1985251968270127105L);
}};
/**
* ID
*
* @param businessDirection 1234567
* @return ID
*/
public Long selectBusinessDirectionLeaderById(Integer businessDirection) {
if (ObjectUtil.isNull(businessDirection)) {
throw new ServiceException("业务方向不能为空");
}
return BUSINESS_DIRECTION_TO_USERNAME.get(businessDirection);
}
}

Loading…
Cancel
Save