|
|
@ -18,7 +18,9 @@ package com.logpm.distribution.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
|
|
|
import com.logpm.basicdata.entity.BasicdataClientUserEntity; |
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataClientClient; |
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
import com.logpm.distribution.dto.DistributionStockArticleDTO; |
|
|
|
import com.logpm.distribution.dto.DistributionStockArticleDTO; |
|
|
|
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
|
|
|
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
|
|
@ -40,6 +42,7 @@ import org.springblade.core.excel.util.ExcelUtil; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
@ -54,6 +57,7 @@ import javax.validation.Valid; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 配送在库订单 控制器 |
|
|
|
* 配送在库订单 控制器 |
|
|
@ -78,6 +82,9 @@ public class DistributionStockArticleController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
// private final IBasicdataWarehouseClient warehouseClient;
|
|
|
|
// private final IBasicdataWarehouseClient warehouseClient;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final IBasicdataClientClient basicdataClientClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 配送在库订单 详情 |
|
|
|
* 配送在库订单 详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -269,6 +276,15 @@ public class DistributionStockArticleController extends BladeController { |
|
|
|
// .map(BasicdataWarehouseEntity::getId)
|
|
|
|
// .map(BasicdataWarehouseEntity::getId)
|
|
|
|
// .collect(Collectors.toList());
|
|
|
|
// .collect(Collectors.toList());
|
|
|
|
// distributionStockArticle.setWarehouseIdList(collect);
|
|
|
|
// distributionStockArticle.setWarehouseIdList(collect);
|
|
|
|
|
|
|
|
// 得到当前登录用户的Id
|
|
|
|
|
|
|
|
List<BasicdataClientUserEntity> basicdataClientUserEntityListByUserIds = basicdataClientClient.getBasicdataClientUserEntityListByUserId(AuthUtil.getUserId()); |
|
|
|
|
|
|
|
List clientIds =null; |
|
|
|
|
|
|
|
if(Func.isNotEmpty(basicdataClientUserEntityListByUserIds)){ |
|
|
|
|
|
|
|
clientIds = basicdataClientUserEntityListByUserIds.stream().map(BasicdataClientUserEntity::getClientId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
distributionStockArticle.setClientIds(clientIds); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.selectClientListPage(Condition.getPage(query), distributionStockArticle); |
|
|
|
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.selectClientListPage(Condition.getPage(query), distributionStockArticle); |
|
|
|
return R.data(DistributionStockArticleWrapper.build().pageVO(pages)); |
|
|
|
return R.data(DistributionStockArticleWrapper.build().pageVO(pages)); |
|
|
|
} |
|
|
|
} |
|
|
|