|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotprodinventoryaging.vo.IotInventoryAgingStatisticsRespVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotprodinventoryaging.vo.IotProdInventoryAgingPageReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotprodinventoryaging.vo.IotProdInventoryAgingSaveReqVO;
|
|
|
@@ -109,8 +110,14 @@ public class IotProdInventoryAgingServiceImpl implements IotProdInventoryAgingSe
|
|
|
IotInventoryAgingStatisticsRespVO result = new IotInventoryAgingStatisticsRespVO();
|
|
|
// 查询当前公司对应的 库存地点 标识 名称 按照各库存地点统计 存货及积压金额
|
|
|
Long deptId = Long.valueOf(deptIdStr);
|
|
|
- DeptDO dept = deptService.getDept(deptId);
|
|
|
- Set<Long> factoryIds = dept.getFactoryIds();
|
|
|
+
|
|
|
+ Set<Long> factoryIds = new HashSet<>();
|
|
|
+ // 过滤数据权限 有可能 项目部人员查看 看板 积压库存数据
|
|
|
+ DataPermissionUtils.executeIgnore(() -> {
|
|
|
+ DeptDO dept = deptService.getDept(deptId);
|
|
|
+ Set<Long> tempFactoryIds = dept.getFactoryIds();
|
|
|
+ factoryIds.addAll(tempFactoryIds);
|
|
|
+ });
|
|
|
List<SapOrgRespDTO> sapOrganizations = sapOrgApi.getSapOrgList(factoryIds);
|
|
|
if (CollUtil.isEmpty(sapOrganizations)) {
|
|
|
throw exception(IOT_PROD_INVENTORY_AGING_NOT_EXISTS);
|