|
|
|
@ -950,12 +950,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
//进行仓库限制
|
|
|
|
|
List<Long> warehouseIds = new ArrayList<>(); |
|
|
|
|
if (!Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
|
if (myCurrentWarehouse.getName().equals("职能中心仓")){ |
|
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList(); |
|
|
|
|
if (!warehouseList.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList())); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
//获取当前人所有仓权限信息
|
|
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList(); |
|
|
|
|
if (!warehouseList.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList())); |
|
|
|
|
List<Long> warehouseIds1 = warehouseClient.getWarehouseIds(); |
|
|
|
|
if (!warehouseIds1.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseIds1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (warehouseIds.isEmpty()) { |
|
|
|
@ -1709,6 +1716,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean savaSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) { |
|
|
|
|
boolean b = this.judgeIsCustomerService(AuthUtil.getUser()); |
|
|
|
|
if (!b){ |
|
|
|
|
throw new ServiceException("当前登录人无恢复权限!!!"); |
|
|
|
|
} |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
//查询处理方信息
|
|
|
|
@ -1896,7 +1907,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
if (!roleNames.getData().isEmpty()) { |
|
|
|
|
boolean contains = roleNames.getData().contains("仓库客服"); |
|
|
|
|
if (!contains){ |
|
|
|
|
throw new ServiceException("当前登录人无仓库客服权限,请联系管理员!"); |
|
|
|
|
throw new ServiceException("当前登录人无操作权限"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//查询异常工单完结接口
|
|
|
|
@ -2759,15 +2770,23 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
}else { |
|
|
|
|
throw new CustomerException("当前登录人无工单操作权限!!!"); |
|
|
|
|
} |
|
|
|
|
//进行仓库限制
|
|
|
|
|
//进行仓库限制
|
|
|
|
|
List<Long> warehouseIds = new ArrayList<>(); |
|
|
|
|
if (!Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
|
if (myCurrentWarehouse.getName().equals("职能中心仓")){ |
|
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList(); |
|
|
|
|
if (!warehouseList.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList())); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
//获取当前人所有仓权限信息
|
|
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList(); |
|
|
|
|
if (!warehouseList.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList())); |
|
|
|
|
List<Long> warehouseIds1 = warehouseClient.getWarehouseIds(); |
|
|
|
|
if (!warehouseIds1.isEmpty()) { |
|
|
|
|
warehouseIds.addAll(warehouseIds1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (warehouseIds.isEmpty()) { |
|
|
|
|