|
@@ -128,13 +128,15 @@ public class SubscribeDetailServiceImpl extends ServiceImpl<SubscribeDetailMappe
|
|
|
//权限过滤:待采购
|
|
|
wrapper.in("t2", SubscribeDetail::getCompanyId, SecurityUtils.getCompanyIds());
|
|
|
wrapper.eq("t2", SubscribeDetail::getCompanyId, dto.getCompanyId());
|
|
|
- //根据业务员采购范围过滤
|
|
|
|
|
|
- String purchaseRange = sysUserService.getById(SecurityUtils.getUserId()).getPurchaseRange();
|
|
|
- if (ObjectUtil.isEmpty(purchaseRange)) {
|
|
|
- purchaseRange = "";
|
|
|
+ //待采购页面 根据业务员采购范围过滤
|
|
|
+ if (ObjectUtil.equals(dto.getIsWaitPurchase(), 1)) {
|
|
|
+ String purchaseRange = sysUserService.getById(SecurityUtils.getUserId()).getPurchaseRange();
|
|
|
+ if (ObjectUtil.isEmpty(purchaseRange)) {
|
|
|
+ purchaseRange = "";
|
|
|
+ }
|
|
|
+ wrapper.in("pi", ProductInfo::getProductClassifyId, purchaseRange.split(","));
|
|
|
}
|
|
|
- wrapper.in("pi", ProductInfo::getProductClassifyId, purchaseRange.split(","));
|
|
|
|
|
|
wrapper.orderByAsc("t2", SubscribeDetail::getCreateTime);
|
|
|
|