diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index a4347d4c2..d8b2fcb93 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -898,7 +898,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl roleList = Arrays.asList(user.getRoleName().split(",")); String tenantId = user.getTenantId(); // 查询 状态条件 @@ -911,29 +911,30 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl>>>myCurrentWarehouse {}", myCurrentWarehouse); } - - Optional matchingDictBiz = warehouseType.stream() - .filter(i -> i.getDictValue().equals(roleName)) - .findFirst(); - - Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus"); - if (matchingDictBiz.isPresent()) { - String dictValue = matchingDictBiz.get().getDictKey(); - switch (dictValue) { - case "1": // 客服经理 - updateWorkOrderForManager(aftersalesWorkOrder, workOrderStatus); - break; - case "2": // 营业部客服 - updateWorkOrderForSales(aftersalesWorkOrder, workOrderStatus); - break; - case "3": // 职能客服 - updateWorkOrderForFunctional(aftersalesWorkOrder, workOrderStatus, user.getUserId()); - break; + if (!roleList.isEmpty()) { + Optional matchingDictBiz = warehouseType.stream() + .filter(i -> roleList.contains(i.getDictValue())) + .findFirst(); + Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus"); + if (matchingDictBiz.isPresent()) { + String dictValue = matchingDictBiz.get().getDictKey(); + switch (dictValue) { + case "1": // 客服经理 + updateWorkOrderForManager(aftersalesWorkOrder, workOrderStatus); + break; + case "2": // 营业部客服 + updateWorkOrderForSales(aftersalesWorkOrder, workOrderStatus); + break; + case "3": // 职能客服 + updateWorkOrderForFunctional(aftersalesWorkOrder, workOrderStatus, user.getUserId()); + break; + } + } else { + updateWorkOrderForOthers(aftersalesWorkOrder, workOrderStatus); } - } else { - updateWorkOrderForOthers(aftersalesWorkOrder, workOrderStatus); + }else { + throw new CustomerException("当前登录人无工单操作权限!!!"); } - AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class); IPage iPage = baseMapper.pageListOwn(page, workOrderEntity); if (iPage.getRecords().isEmpty()) {