Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
b95659e9e8
  1. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java
  2. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  4. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java

@ -153,6 +153,13 @@ public class DistributionStockArticleVO extends DistributionStockArticleEntity {
private List<Long> warehouseIdList;
/**
* ids
*/
@ApiModelProperty(value = "ids")
private List<Long> clientIds;
public Map<String, Object> toMap() throws IllegalAccessException {
Map<String, Object> map = new HashMap<>();

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -18,7 +18,9 @@ package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataClientUserEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.DistributionStockArticleDTO;
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.Query;
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.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
@ -54,6 +57,7 @@ import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 配送在库订单 控制器
@ -78,6 +82,9 @@ public class DistributionStockArticleController extends BladeController {
// private final IBasicdataWarehouseClient warehouseClient;
private final IBasicdataClientClient basicdataClientClient;
/**
* 配送在库订单 详情
*/
@ -269,6 +276,15 @@ public class DistributionStockArticleController extends BladeController {
// .map(BasicdataWarehouseEntity::getId)
// .collect(Collectors.toList());
// 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);
return R.data(DistributionStockArticleWrapper.build().pageVO(pages));
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -69,7 +69,7 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
* @param distributionStockArticleVO
* @return
*/
List<DistributionStockArticleEntity> selectClientListPage(IPage page, DistributionStockArticleVO distributionStockArticleVO,@Param("loginUserId") Long loginUserId);
List<DistributionStockArticleEntity> selectClientListPage(IPage page, DistributionStockArticleVO distributionStockArticleVO);
List<DistributionStockArticleEntity> getAllReservationStockArticleInfo(@Param("ew") Map<String,Object> query);

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -71,11 +71,7 @@
<select id="selectClientListPage" resultMap="distributionStockArticleResultMap">
SELECT * from logpm_distribution_stock_article ldsa where ldsa.mall_id in
(
SELECT client_id from logpm_basicdata_clientuser where user_id =#{loginUserId}
)
and
SELECT * from logpm_distribution_stock_article ldsa where
ldsa.is_deleted = 0 and ldsa.type_service ='2' and ldsa.genre = 1 and ldsa.reservation_status in ('10','20') and ldsa.order_status in ('10','20','30')
<if test="distributionStockArticleVO.orderCode!=null and distributionStockArticleVO.orderCode !=''">
and ldsa.order_code = #{distributionStockArticleVO.orderCode}
@ -146,6 +142,14 @@
<if test="distributionStockArticleVO.handQuantity != null and distributionStockArticleVO.handQuantity != ''">
and ldsa.hand_quantity = #{distributionStockArticleVO.handQuantity}
</if>
<if test="distributionStockArticleVO.clientIds != null and distributionStockArticleVO.handQuantity != ''">
and ldsa.mall_id in
<foreach collection="distributionStockArticleVO.clientIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -554,8 +554,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
@Override
public IPage<DistributionStockArticleEntity> selectClientListPage(IPage<DistributionStockArticleEntity> page, DistributionStockArticleVO distributionStockArticle) {
// 获取当前登陆人
BladeUser user = AuthUtil.getUser();
List<DistributionStockArticleEntity> result = baseMapper.selectClientListPage(page, distributionStockArticle, user.getUserId());
List<DistributionStockArticleEntity> result = baseMapper.selectClientListPage(page, distributionStockArticle);
return page.setRecords(result);
}

Loading…
Cancel
Save