|
@@ -27,7 +27,6 @@ import com.fjhx.tenant.entity.dict.dto.DictTenantDataSelectDto;
|
|
|
import com.fjhx.tenant.entity.dict.vo.DictTenantDataVo;
|
|
|
import com.fjhx.tenant.service.dict.DictTenantDataService;
|
|
|
import com.fjhx.tenant.utils.DeptUstil;
|
|
|
-import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
@@ -57,9 +56,6 @@ public class SubscribeDetailServiceImpl extends ServiceImpl<SubscribeDetailMappe
|
|
|
private ProductInfoService productInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
- private WarehouseService warehouseService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private PurchaseDetailService purchaseDetailService;
|
|
|
|
|
|
@Autowired
|
|
@@ -106,10 +102,10 @@ public class SubscribeDetailServiceImpl extends ServiceImpl<SubscribeDetailMappe
|
|
|
|
|
|
wrapper.eq("t2", SubscribeDetail::getDataType, dto.getDataType());
|
|
|
|
|
|
- //权限过滤:待采购-子公司看自己的,总公司看全部
|
|
|
+ //权限过滤:待采购-子公司看自己以及关联公司的,总公司看全部
|
|
|
Long companyId = SecurityUtils.getCompanyId();
|
|
|
if (!Objects.equals(companyId, 100L)) {
|
|
|
- wrapper.eq("t2", SubscribeDetail::getCompanyId, companyId);
|
|
|
+ wrapper.in("t2", SubscribeDetail::getCompanyId, SecurityUtils.getCompanyIds());
|
|
|
} else {
|
|
|
wrapper.eq("t2", SubscribeDetail::getCompanyId, dto.getCompanyId());
|
|
|
}
|