|
|
@ -139,19 +139,22 @@ public class BirActivityCenterGoodsServiceImpl extends ServiceImpl<BirActivityCe |
|
|
|
.collect(Collectors.groupingBy(TbsActivityCenterGoods::getActivityId)); |
|
|
|
|
|
|
|
LambdaQueryWrapper<BmsSupplier> supplierLqw = new LambdaQueryWrapper<>(); |
|
|
|
supplierLqw.in(BmsSupplier::getId,activityCenterGoodsAllList.stream().map(a->a.getSupplierId()).distinct().collect(Collectors.toList())); |
|
|
|
supplierLqw.in(BmsSupplier::getCode,activityCenterGoodsAllList.stream().map(TbsActivityCenterGoods::getSupplierCode).distinct().collect(Collectors.toList())); |
|
|
|
List<BmsSupplier> bmsSupplierList = bmsSupplierMapper.selectList(supplierLqw); |
|
|
|
Map<String,BmsSupplier> supplierMap = bmsSupplierList.stream().collect(Collectors.toMap(BmsSupplier::getId,a->a)); |
|
|
|
|
|
|
|
LambdaQueryWrapper<BmsRegion> regionLqw = new LambdaQueryWrapper<>(); |
|
|
|
regionLqw.in(BmsRegion::getId,bmsSupplierList.stream().map(a->a.getRegionLast()).collect(Collectors.toList())); |
|
|
|
List<BmsRegion> saleRegionList = regionMapper.selectList(regionLqw); |
|
|
|
Map<String,BmsRegion> saleRegionMap = saleRegionList.stream().collect(Collectors.toMap(BmsRegion::getId,a->a)); |
|
|
|
|
|
|
|
LambdaQueryWrapper<BmsRegion2> region2Lqw = new LambdaQueryWrapper<>(); |
|
|
|
region2Lqw.in(BmsRegion2::getId,bmsSupplierList.stream().map(a->a.getRegion2Last()).collect(Collectors.toList())); |
|
|
|
List<BmsRegion2> bizRegionList = region2Mapper.selectList(region2Lqw); |
|
|
|
Map<String,BmsRegion2> bizRegionMap = bizRegionList.stream().collect(Collectors.toMap(BmsRegion2::getId,a->a)); |
|
|
|
Map<String,BmsRegion> saleRegionMap = null; |
|
|
|
Map<String,BmsRegion2> bizRegionMap = null; |
|
|
|
if(CollUtil.isNotEmpty(bmsSupplierList)) { |
|
|
|
LambdaQueryWrapper<BmsRegion> regionLqw = new LambdaQueryWrapper<>(); |
|
|
|
regionLqw.in(BmsRegion::getId,bmsSupplierList.stream().map(BmsSupplier::getRegionLast).collect(Collectors.toList())); |
|
|
|
List<BmsRegion> saleRegionList = regionMapper.selectList(regionLqw); |
|
|
|
saleRegionMap = saleRegionList.stream().collect(Collectors.toMap(BmsRegion::getId, a->a)); |
|
|
|
LambdaQueryWrapper<BmsRegion2> region2Lqw = new LambdaQueryWrapper<>(); |
|
|
|
region2Lqw.in(BmsRegion2::getId,bmsSupplierList.stream().map(BmsSupplier::getRegion2Last).collect(Collectors.toList())); |
|
|
|
List<BmsRegion2> bizRegionList = region2Mapper.selectList(region2Lqw); |
|
|
|
bizRegionMap = bizRegionList.stream().collect(Collectors.toMap(BmsRegion2::getId, a->a)); |
|
|
|
} |
|
|
|
|
|
|
|
//过滤无效的费用申请
|
|
|
|
LambdaQueryWrapper<TbsCostApply> costLqw = new LambdaQueryWrapper<>(); |
|
|
@ -225,8 +228,10 @@ public class BirActivityCenterGoodsServiceImpl extends ServiceImpl<BirActivityCe |
|
|
|
} |
|
|
|
} |
|
|
|
if(bacgList.size()>0){ |
|
|
|
LocalDateTime nowTime = LocalDateTime.now(); |
|
|
|
for (BirActivityCenterGoods bir : bacgList) { |
|
|
|
bir.setId(IdUtil.getSnowflakeNextId()); |
|
|
|
bir.setUpdateTime(nowTime); |
|
|
|
super.getBaseMapper().insert(bir); |
|
|
|
} |
|
|
|
} |
|
|
|