|
@@ -18,20 +18,17 @@ import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
|
|
|
import com.fjhx.wms.entity.stock.vo.StockWaitVo;
|
|
|
import com.fjhx.wms.entity.warehouse.po.Warehouse;
|
|
|
import com.fjhx.wms.mapper.stock.StockWaitMapper;
|
|
|
-import com.fjhx.wms.service.MyPurchaseService;
|
|
|
import com.fjhx.wms.service.stock.*;
|
|
|
import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
|
import com.fjhx.wms.utils.CodeEnum;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
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;
|
|
|
|
|
|
|
|
@@ -56,9 +53,6 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
private StockWaitDetailsService stockWaitDetailsService;
|
|
|
@Autowired
|
|
|
private WarehouseService warehouseService;
|
|
|
- @Autowired
|
|
|
- private MyPurchaseService myPurchaseService;
|
|
|
-
|
|
|
@Override
|
|
|
public Page<StockWaitVo> getPage(StockWaitSelectDto dto) {
|
|
|
IWrapper<StockWait> wrapper = getWrapper();
|
|
@@ -73,6 +67,14 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
+ //权限过滤:待出入库-子公司看自己的,总公司看全部
|
|
|
+ Long companyId = SecurityUtils.getCompanyId();
|
|
|
+ if (!Objects.equals(companyId, 100L)) {
|
|
|
+ wrapper.eq("sw", StockWait::getCompanyId, companyId);
|
|
|
+ } else {
|
|
|
+ wrapper.eq("sw", StockWait::getCompanyId, dto.getCompanyId());
|
|
|
+ }
|
|
|
+
|
|
|
//赋值明细列表
|
|
|
setDetailsInfo(records);
|
|
|
|