Browse Source

工单修复账号多角色

visual
汤建军 3 months ago
parent
commit
523e307622
  1. 11
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

11
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -898,7 +898,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (user == null) {
throw new ServiceException("用户信息获取失败");
}
String roleName = user.getRoleName();
List<String> roleList = Arrays.asList(user.getRoleName().split(","));
String tenantId = user.getTenantId();
// 查询 状态条件
@ -911,11 +911,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (Func.isEmpty(myCurrentWarehouse)) {
log.warn(">>>>myCurrentWarehouse {}", myCurrentWarehouse);
}
if (!roleList.isEmpty()) {
Optional<DictBiz> matchingDictBiz = warehouseType.stream()
.filter(i -> i.getDictValue().equals(roleName))
.filter(i -> roleList.contains(i.getDictValue()))
.findFirst();
Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus");
if (matchingDictBiz.isPresent()) {
String dictValue = matchingDictBiz.get().getDictKey();
@ -933,7 +932,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} else {
updateWorkOrderForOthers(aftersalesWorkOrder, workOrderStatus);
}
}else {
throw new CustomerException("当前登录人无工单操作权限!!!");
}
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class);
IPage<AftersalesWorkOrderEntity> iPage = baseMapper.pageListOwn(page, workOrderEntity);
if (iPage.getRecords().isEmpty()) {

Loading…
Cancel
Save