|
|
|
@ -434,6 +434,15 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageUtils getPendingApplyList(ErfExpApplyData data) { |
|
|
|
// 检查当前用户是否拥有"工程实验申请管理员"角色,若是则可查看所有待办 |
|
|
|
if (data.getCurrentUserId() != null) { |
|
|
|
List<UserRoleDto> adminRoles = sysUserDao.getUserRolesByRoleNames( |
|
|
|
data.getCurrentUserId(), List.of("工程实验申请管理员")); |
|
|
|
if (!adminRoles.isEmpty()) { |
|
|
|
data.setIsAdmin(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PageHelper.startPage(data.getPage(), data.getLimit()); |
|
|
|
List<ErfExpApplyData> list = erfExpApplyMapper.getPendingApplyList(data); |
|
|
|
PageInfo<ErfExpApplyData> pageInfo = new PageInfo<>(list); |
|
|
|
@ -960,7 +969,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据用户角色获取对应的技术经理 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param userId 用户ID |
|
|
|
* @param buNo 事业部编码 |
|
|
|
* @return 技术经理信息 |
|
|
|
@ -989,7 +998,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
|
|
|
|
// 3. 查询对应的技术经理用户ID(根据BU过滤,查不到直接返回null) |
|
|
|
ManagerInfoDto manager = sysUserDao.getFirstManagerByRoleNameAndBu(managerRoleName, buNo); |
|
|
|
|
|
|
|
|
|
|
|
if (manager == null) { |
|
|
|
throw new XJException(String.format("BU %s 中找不到【%s】角色的用户,请联系管理员配置", buNo, managerRoleName)); |
|
|
|
} |
|
|
|
@ -1005,7 +1014,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据BU获取生产经理列表 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param buNo 事业部编码 |
|
|
|
* @return 生产经理列表(查不到返回空列表) |
|
|
|
*/ |
|
|
|
@ -1028,7 +1037,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据BU获取质量经理列表 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param buNo 事业部编码 |
|
|
|
* @return 质量经理列表(查不到返回空列表) |
|
|
|
*/ |
|
|
|
|