|
|
@@ -17,18 +17,14 @@
|
|
|
package org.springblade.salesPart.stock.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
-import io.swagger.annotations.License;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.Valid;
|
|
|
-
|
|
|
-import org.springblade.client.entity.CorpsDesc;
|
|
|
+import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springblade.core.excel.util.ExcelUtil;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
@@ -37,22 +33,16 @@ import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
-import org.springblade.salesPart.entity.PjGoodsDesc;
|
|
|
-import org.springblade.salesPart.entity.PjOrder;
|
|
|
import org.springblade.salesPart.entity.PjProductLaunch;
|
|
|
-import org.springblade.salesPart.excel.CorpsDescExportExcel;
|
|
|
+import org.springblade.salesPart.entity.PjStockDesc;
|
|
|
import org.springblade.salesPart.excel.StockExportExcel;
|
|
|
-import org.springblade.salesPart.goods.service.IGoodsDescService;
|
|
|
import org.springblade.salesPart.productLaunch.service.IProductLaunchService;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import org.springblade.salesPart.entity.PjStockDesc;
|
|
|
-import org.springblade.salesPart.vo.StockDescVO;
|
|
|
import org.springblade.salesPart.stock.service.IStockDescService;
|
|
|
-import org.springblade.core.boot.ctrl.BladeController;
|
|
|
+import org.springblade.salesPart.vo.StockDescVO;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -190,7 +180,7 @@ public class StockDescController extends BladeController {
|
|
|
lambdaQueryWrapper.eq(PjStockDesc::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(PjStockDesc::getIsDeleted, 0)
|
|
|
.eq(PjStockDesc::getSalesCompanyId, AuthUtil.getDeptId())//公司
|
|
|
- .eq(PjStockDesc::getStorageId, stockDesc.getStorageId())
|
|
|
+ .eq(ObjectUtils.isNotNull(stockDesc.getStorageId()), PjStockDesc::getStorageId, stockDesc.getStorageId())
|
|
|
.eq(PjStockDesc::getGoodsId, stockDesc.getGoodsId())
|
|
|
.ne(PjStockDesc::getDot, "")
|
|
|
.isNotNull(PjStockDesc::getDot);
|
|
|
@@ -216,10 +206,10 @@ public class StockDescController extends BladeController {
|
|
|
.eq(PjProductLaunch::getBillType, 0);
|
|
|
List<PjProductLaunch> productLaunches = productLaunchService.list(queryWrapper);
|
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(list)){
|
|
|
+ if (ObjectUtil.isNotEmpty(list)) {
|
|
|
list.forEach(e -> {
|
|
|
PjProductLaunch launch = productLaunches.stream().filter(productLaunch -> productLaunch.getGoodsId().equals(e.getGoodsId())).findFirst().orElse(null);
|
|
|
- if (ObjectUtil.isNotEmpty(launch)){
|
|
|
+ if (ObjectUtil.isNotEmpty(launch)) {
|
|
|
list.remove(e);
|
|
|
}
|
|
|
});
|