Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 7 months ago
parent
commit
0fbec7634f
  1. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml
  2. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  4. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml

@ -52,6 +52,7 @@
from logpm_basicdata_tripartite_mall from logpm_basicdata_tripartite_mall
where tripartite_mall = #{name} where tripartite_mall = #{name}
and brand_name = #{brand} and brand_name = #{brand}
and is_deleted = 0
<if test="code != null and code != ''"> <if test="code != null and code != ''">
and tripartite_coding = #{code} and tripartite_coding = #{code}
</if> </if>

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

@ -377,17 +377,25 @@ public class DistributionStockArticleController extends BladeController {
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionStockArticle") @ApiOperation(value = "修改", notes = "传入distributionStockArticle")
public R updateBatchClient(@Valid @RequestBody DistributionStockArticleDTO distributionStockArticleDTO) { public R updateBatchClient(@Valid @RequestBody DistributionStockArticleDTO distributionStockArticleDTO) {
// 获取勾选的需要修改的订单信息
List<Long> ids = distributionStockArticleDTO.getEntityList().stream().map(DistributionStockArticleEntity::getId).collect(Collectors.toList());
// 查询这个订单集合的预约状态
List<DistributionStockArticleEntity> realStockArticleList = distributionStockArticleService.listByIds(ids);
List<DistributionStockArticleEntity> entityList = distributionStockArticleDTO.getEntityList(); List<DistributionStockArticleEntity> entityList = distributionStockArticleDTO.getEntityList();
if (!entityList.isEmpty()) { if (!realStockArticleList.isEmpty()) {
boolean flag = entityList.stream().anyMatch(a -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(a.getReservationStatus())); boolean flag = realStockArticleList.stream().anyMatch(a -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(a.getReservationStatus()));
if (flag) { if (flag) {
String orderCode = entityList.stream().filter(f -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getReservationStatus())).map(DistributionStockArticleEntity::getOrderCode).distinct().collect(Collectors.joining(",")); String orderCode = realStockArticleList.stream().filter(f -> !OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getReservationStatus())).map(DistributionStockArticleEntity::getOrderCode).distinct().collect(Collectors.joining(","));
return R.fail(orderCode + "存在预约信息"); return R.fail(orderCode + "存在预约信息");
} }
} }
for (DistributionStockArticleEntity stockArticleEntity : entityList) { for (DistributionStockArticleEntity stockArticleEntity : entityList) {
Long id = stockArticleEntity.getId(); Long id = stockArticleEntity.getId();
DistributionStockArticleEntity oldStockArticle = distributionStockArticleService.getById(id); DistributionStockArticleEntity oldStockArticle =realStockArticleList.stream().filter(f -> f.getId().equals(id)).findFirst().orElse(null);
DistributionStockArticleEntity newStockArticle = new DistributionStockArticleEntity(); DistributionStockArticleEntity newStockArticle = new DistributionStockArticleEntity();
BeanUtil.copy(oldStockArticle, newStockArticle); BeanUtil.copy(oldStockArticle, newStockArticle);
String consigneePerson = stockArticleEntity.getConsigneePerson(); String consigneePerson = stockArticleEntity.getConsigneePerson();

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -15,7 +15,7 @@
select lta.*, select lta.*,
lbc.client_name htMallName lbc.client_name htMallName
from logpm_trunkline_advance lta from logpm_trunkline_advance lta
left join logpm_basicdata_tripartite_mall lbtm on lbtm.tripartite_mall = lta.dealer_name and lbtm.brand_name = lta.brand and IFNULL(lta.dealer_code,'') = IFNULL(lbtm.tripartite_coding,'') left join logpm_basicdata_tripartite_mall lbtm on lbtm.tripartite_mall = lta.dealer_name and lbtm.brand_name = lta.brand and IFNULL(lta.dealer_code,'') = IFNULL(lbtm.tripartite_coding,'') and lbtm.is_deletd = 0
left join logpm_basicdata_client lbc on lbc.id = lbtm.client_id left join logpm_basicdata_client lbc on lbc.id = lbtm.client_id
where lta.is_deleted = 0 where lta.is_deleted = 0
and lta.waybill_status = 0 and lta.waybill_status = 0

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -699,13 +699,16 @@ public class InComingServiceImpl implements IInComingService {
Set<Long> waybillIdSet = map.keySet(); Set<Long> waybillIdSet = map.keySet();
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet));
if(CollUtil.isNotEmpty(waybillIdSet)){
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet));
waybillEntityList.forEach(wb -> { waybillEntityList.forEach(wb -> {
Integer totalCount = wb.getTotalCount(); Integer totalCount = wb.getTotalCount();
Integer stockCount = wb.getStockCount(); Integer stockCount = wb.getStockCount();
openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "20", "已入库", "运单入库:"+stockCount+"/"+totalCount+",入库类型:【"+IncomingTypeEnum.getValue(incomingType)+"】,入库时间:"+ CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
}); });
}
//把waybillEntityList转化成id为key的Map //把waybillEntityList转化成id为key的Map
// Map<Long, WarehouseWaybillEntity> waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getId, Function.identity())); // Map<Long, WarehouseWaybillEntity> waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getId, Function.identity()));

Loading…
Cancel
Save