|  | @@ -31,6 +31,7 @@ import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.math.BigDecimal;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  | +import java.util.function.Function;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import static com.ym.mec.biz.dal.enums.SysUserRoleEnum.ORGAN_MANAGER;
 | 
	
	
		
			
				|  | @@ -292,7 +293,9 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	public List<DoubleEleven2021Dto> organDoubleEleven2022Statis(OrganDoubleEleven2021StatisDto queryInfo) {
 | 
	
		
			
				|  |  |  		List<DoubleEleven2021Dto> doubleEleven2022Dtos = vipGroupActivityDao.countOrganDoubleEleven2022Statis(queryInfo.getOrganId());
 | 
	
		
			
				|  |  | -		return this.sumDoubleEleven(doubleEleven2022Dtos,queryInfo);
 | 
	
		
			
				|  |  | +		return this.sumDoubleEleven(doubleEleven2022Dtos,queryInfo,
 | 
	
		
			
				|  |  | +				vipGroupActivityDao::countOrgan2022ActivityStatis,
 | 
	
		
			
				|  |  | +				null);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
	
		
			
				|  | @@ -313,20 +316,29 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |      public List<DoubleEleven2021Dto> organDoubleEleven2021Statis(OrganDoubleEleven2021StatisDto statisDto) {
 | 
	
		
			
				|  |  |  		List<DoubleEleven2021Dto> doubleEleven2021Dtos = vipGroupActivityDao.countOrganDoubleEleven2021Statis(statisDto.getOrganId());
 | 
	
		
			
				|  |  | -		return this.sumDoubleEleven(doubleEleven2021Dtos,statisDto);
 | 
	
		
			
				|  |  | +		return this.sumDoubleEleven(doubleEleven2021Dtos,statisDto,
 | 
	
		
			
				|  |  | +				vipGroupActivityDao::countOrganActivityStatis,
 | 
	
		
			
				|  |  | +				vipGroupActivityDao::countOrganGiveMemberNum);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	private List<DoubleEleven2021Dto> sumDoubleEleven(List<DoubleEleven2021Dto> doubleEleven2021Dtos,OrganDoubleEleven2021StatisDto statisDto){
 | 
	
		
			
				|  |  | +	private List<DoubleEleven2021Dto> sumDoubleEleven(List<DoubleEleven2021Dto> doubleEleven2021Dtos,
 | 
	
		
			
				|  |  | +													  OrganDoubleEleven2021StatisDto statisDto,
 | 
	
		
			
				|  |  | +													  Function<List<Integer>,List<DoubleEleven2021ActivityDto>> funOne,
 | 
	
		
			
				|  |  | +													  Function<List<Integer>,List<Map<Long,Long>>> funTwo){
 | 
	
		
			
				|  |  |  		if(!CollectionUtils.isEmpty(doubleEleven2021Dtos)){
 | 
	
		
			
				|  |  |  			String order = statisDto.getOrder();
 | 
	
		
			
				|  |  |  			String sort = statisDto.getSort();
 | 
	
		
			
				|  |  |  			List<Integer> organIdList = doubleEleven2021Dtos.stream().map(e -> e.getOrganId()).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -			List<DoubleEleven2021ActivityDto> activityDtoList = vipGroupActivityDao.countOrganActivityStatis(organIdList);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			List<DoubleEleven2021ActivityDto> activityDtoList = funOne.apply(organIdList);;
 | 
	
		
			
				|  |  |  			Map<Integer, List<DoubleEleven2021ActivityDto>> collect = new HashMap<>();
 | 
	
		
			
				|  |  |  			if(activityDtoList != null && activityDtoList.size() > 0){
 | 
	
		
			
				|  |  |  				collect = activityDtoList.stream().collect(Collectors.groupingBy(DoubleEleven2021ActivityDto::getOrganId));
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -			Map<Long, Long> maps = MapUtil.convertIntegerMap(vipGroupActivityDao.countOrganGiveMemberNum(organIdList));
 | 
	
		
			
				|  |  | +			Map<Long, Long> maps = new HashMap<>();
 | 
	
		
			
				|  |  | +			if(funTwo != null){
 | 
	
		
			
				|  |  | +				maps = MapUtil.convertIntegerMap(funTwo.apply(organIdList));
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |  			for (DoubleEleven2021Dto doubleEleven2021Dto : doubleEleven2021Dtos) {
 | 
	
		
			
				|  |  |  				if(doubleEleven2021Dto.getTotalBuyAmount().compareTo(ZERO) > 0){
 | 
	
		
			
				|  |  |  					doubleEleven2021Dto.setAvgBuyAmount(
 |