mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-25 00:13:40 +08:00
收敛充电订单开票待办接收人
This commit is contained in:
@@ -25,6 +25,8 @@ public final class TodoTaskConstants {
|
||||
|
||||
public static final int DEFAULT_HOME_LIMIT = 3;
|
||||
public static final int MAX_HOME_LIMIT = 10;
|
||||
/** 现有运营商创建流程使用的运营商管理员角色 ID,正式环境可通过配置覆盖。 */
|
||||
public static final long DEFAULT_OPERATOR_ADMIN_ROLE_ID = 3L;
|
||||
|
||||
public static boolean isActiveStatus(String status) {
|
||||
return STATUS_PENDING.equals(status) || STATUS_PROCESSING.equals(status);
|
||||
|
||||
@@ -27,6 +27,16 @@ public interface SysUserMapper {
|
||||
*/
|
||||
List<Long> selectActiveUserIdsByDeptTree(@Param("deptId") Long deptId);
|
||||
|
||||
/**
|
||||
* 查询部门及下级部门中拥有指定角色的正常用户 ID。
|
||||
*
|
||||
* @param deptId 部门 ID
|
||||
* @param roleId 角色 ID
|
||||
* @return 用户 ID 集合
|
||||
*/
|
||||
List<Long> selectActiveUserIdsByDeptTreeAndRole(@Param("deptId") Long deptId,
|
||||
@Param("roleId") Long roleId);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已配用户角色列表
|
||||
*
|
||||
|
||||
@@ -9,4 +9,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface TodoTaskAssigneeService {
|
||||
List<Long> findActiveUserIdsByDeptTree(Long deptId);
|
||||
|
||||
List<Long> findActiveOperatorAdminUserIdsByDeptTree(Long deptId);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.jsowell.system.service.impl;
|
||||
|
||||
import com.jsowell.common.exception.ServiceException;
|
||||
import com.jsowell.system.constant.TodoTaskConstants;
|
||||
import com.jsowell.system.mapper.SysUserMapper;
|
||||
import com.jsowell.system.service.TodoTaskAssigneeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,6 +17,9 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class TodoTaskAssigneeServiceImpl implements TodoTaskAssigneeService {
|
||||
@Value("${todo.operator-admin-role-id:3}")
|
||||
private Long operatorAdminRoleId;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
|
||||
@@ -25,4 +30,14 @@ public class TodoTaskAssigneeServiceImpl implements TodoTaskAssigneeService {
|
||||
}
|
||||
return userMapper.selectActiveUserIdsByDeptTree(deptId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> findActiveOperatorAdminUserIdsByDeptTree(Long deptId) {
|
||||
if (deptId == null || deptId <= 0) {
|
||||
throw new ServiceException("待办接收部门不能为空");
|
||||
}
|
||||
Long roleId = operatorAdminRoleId == null || operatorAdminRoleId <= 0
|
||||
? TodoTaskConstants.DEFAULT_OPERATOR_ADMIN_ROLE_ID : operatorAdminRoleId;
|
||||
return userMapper.selectActiveUserIdsByDeptTreeAndRole(deptId, roleId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user