|
@@ -32,10 +32,10 @@ import com.fjhx.purchase.service.purchase.PurchaseDetailService;
|
|
|
import com.fjhx.purchase.service.purchase.PurchaseService;
|
|
|
import com.fjhx.purchase.service.subscribe.SubscribeDetailService;
|
|
|
import com.fjhx.purchase.service.subscribe.SubscribeService;
|
|
|
-import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
|
import com.ruoyi.common.core.domain.BaseIdPo;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import com.ruoyi.system.service.ISysDeptService;
|
|
|
import org.apache.commons.collections4.MapUtils;
|
|
@@ -43,10 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@@ -69,9 +66,6 @@ public class SubscribeServiceImpl extends ServiceImpl<SubscribeMapper, Subscribe
|
|
|
private ProductInfoService productInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
- private WarehouseService warehouseService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private ISysDeptService deptService;
|
|
|
|
|
|
@Autowired
|
|
@@ -87,6 +81,15 @@ public class SubscribeServiceImpl extends ServiceImpl<SubscribeMapper, Subscribe
|
|
|
@Override
|
|
|
public Page<SubscribeVo> getPage(SubscribeSelectDto dto) {
|
|
|
IWrapper<Subscribe> wrapper = getWrapper();
|
|
|
+
|
|
|
+ //权限过滤:申购-子公司看自己的,总公司看全部
|
|
|
+ Long companyId = SecurityUtils.getCompanyId();
|
|
|
+ if (!Objects.equals(companyId, 100L)) {
|
|
|
+ wrapper.eq("s", Subscribe::getCompanyId, companyId);
|
|
|
+ } else {
|
|
|
+ wrapper.eq("s", Subscribe::getCompanyId, dto.getCompanyId());
|
|
|
+ }
|
|
|
+
|
|
|
wrapper.orderByDesc("s", Subscribe::getId);
|
|
|
Page<SubscribeVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
return page;
|