|
|
@@ -157,18 +157,7 @@ public class FlowProcessService {
|
|
|
if(currentUser != null){
|
|
|
TenantDTO tenantDTO = currentUser.getTenantDTO();
|
|
|
if(tenantDTO != null && tenantDTO.getId().equals("10009")){
|
|
|
- IRoleApi roleApi = SpringUtil.getBean(IRoleApi.class);
|
|
|
- // 只要有一个角色是“老板”,就返回true
|
|
|
- boolean isBoss = currentUser.getRoleDTOList().stream()
|
|
|
- .map(RoleDTO::getId)
|
|
|
- .map(roleApi::getRoleDTOByIdForApp)
|
|
|
- .filter(Objects::nonNull) // 过滤查询失败的null角色
|
|
|
- .anyMatch(role -> "老板".equals(role.getName())); // 防空指针
|
|
|
- if (isBoss) {
|
|
|
- requiredNames = Arrays.asList("进销存-领用申请");
|
|
|
- }else{
|
|
|
- requiredNames = Arrays.asList("");
|
|
|
- }
|
|
|
+ requiredNames = Arrays.asList("进销存-领用申请");
|
|
|
}else{
|
|
|
requiredNames = Arrays.asList("物资管理-领用申请", "物资管理-采购申请", "日常办公-请假申请", "离职申请", "离职交接申请", "会计-报销审批", "会计-报销审批-电子发票", "会计-发票申请", "报销申请", "发票申请","会议室预约");
|
|
|
}
|