|
@@ -29,6 +29,9 @@ import java.time.DayOfWeek;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
+import java.util.concurrent.Executors;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.ym.mec.biz.dal.enums.IndexDataType.*;
|
|
@@ -58,13 +61,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
@Autowired
|
|
|
private StudentRegistrationDao studentRegistrationDao;
|
|
|
@Autowired
|
|
|
- private MusicGroupPerformanceDao musicGroupPerformanceDao;
|
|
|
- @Autowired
|
|
|
private StudentDao studentDao;
|
|
|
@Autowired
|
|
|
private SysEmployeePositionService employeePositionService;
|
|
|
@Autowired
|
|
|
private MusicGroupCalenderRefundPeriodDao musicGroupCalenderRefundPeriodDao;
|
|
|
+ private static final ExecutorService exportExecutorService = Executors.newFixedThreadPool(3);
|
|
|
|
|
|
private static ThreadLocal<Set<Integer>> organIds = new ThreadLocal<Set<Integer>>(){
|
|
|
@Override
|
|
@@ -116,7 +118,11 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
dataTypes = Arrays.stream(queryInfo.getDataTypes().split(",")).collect(Collectors.toSet());
|
|
|
}
|
|
|
|
|
|
- List<IndexBaseMonthData> indexBaseDatas = indexBaseMonthDataDao.getIndexBaseData(organIds, dataTypes, startDate.toString(), endDate.toString(),queryInfo.getTenantId());
|
|
|
+ String startDate1 = startDate.toString();
|
|
|
+ String endDate1 = endDate.toString();
|
|
|
+ List<Integer> arrayList = new ArrayList<>(organIds);
|
|
|
+ Integer tenantId = queryInfo.getTenantId();
|
|
|
+ List<IndexBaseMonthData> indexBaseDatas = indexBaseMonthDataDao.getIndexBaseData(organIds, dataTypes, startDate1, endDate1,tenantId);
|
|
|
if(Objects.isNull(indexBaseDatas)){
|
|
|
indexBaseDatas = new ArrayList<>();
|
|
|
}
|
|
@@ -127,7 +133,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
vipDataTypes.add("VIP_GROUP_COURSE");
|
|
|
vipDataTypes.add("VIP_GROUP_ONLINE_COURSE");
|
|
|
vipDataTypes.add("VIP_GROUP_OFFLINE_COURSE");
|
|
|
- List<IndexBaseMonthData> indexBaseDataList = indexBaseMonthDataDao.getVipCourseDataList(organIds, vipDataTypes, startDate.toString(), endDate.toString(),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> indexBaseDataList = indexBaseMonthDataDao.getVipCourseDataList(organIds, vipDataTypes, startDate1, endDate1,tenantId);
|
|
|
if(!CollectionUtils.isEmpty(indexBaseDataList)){
|
|
|
for (IndexBaseMonthData indexBaseMonthData : indexBaseDataList) {
|
|
|
if(StringUtils.isBlank(indexBaseMonthData.getExtendInfo())){
|
|
@@ -153,60 +159,85 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
Map<IndexDataType, List<IndexBaseMonthData>> typeDateMap = indexBaseDatas.stream().filter(d->Objects.nonNull(d.getDataType())).collect(Collectors.groupingBy(IndexBaseMonthData::getDataType));
|
|
|
|
|
|
//按天汇总
|
|
|
- if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(FINANCE_PAY.getCode())||dataTypes.contains(FINANCE_BALANCE_AMOUNT.getCode())||dataTypes.contains(FINANCE_AMOUNT.getCode())) && organIds != null){
|
|
|
- List<IndexBaseMonthData> financePayDataWithTimely = indexBaseMonthDataDao.getFinancePayDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- typeDateMap.put(IndexDataType.FINANCE_PAY,financePayDataWithTimely);
|
|
|
- typeDateMap.put(IndexDataType.FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getFinanceBalanceDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId()));
|
|
|
- typeDateMap.put(FINANCE_AMOUNT,indexBaseMonthDataDao.getFinanceActualDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId()));
|
|
|
- List<IndexBaseMonthData> totalAmountDataWithTimely = indexBaseMonthDataDao.getTotalAmountDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- typeDateMap.put(IndexDataType.TOTAL_AMOUNT,totalAmountDataWithTimely);
|
|
|
- //经营报表细化
|
|
|
- List<IndexBaseMonthData> applyAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"APPLY,ADD_STUDENT",null,queryInfo.getTenantId());
|
|
|
- typeDateMap.put(APPLY_AMOUNT,applyAmount);
|
|
|
- List<IndexBaseMonthData> renewAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"RENEW",null,queryInfo.getTenantId());
|
|
|
- typeDateMap.put(RENEW_AMOUNT,renewAmount);
|
|
|
- List<IndexBaseMonthData> vipAmount = indexBaseMonthDataDao.getVipAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- typeDateMap.put(VIP_AMOUNT,vipAmount);
|
|
|
- List<IndexBaseMonthData> practiceAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"PRACTICE_GROUP_BUY,PRACTICE_GROUP_RENEW",null,queryInfo.getTenantId());
|
|
|
- typeDateMap.put(PRACTICE_AMOUNT,practiceAmount);
|
|
|
- List<IndexBaseMonthData> otherAmount = indexBaseMonthDataDao.getOtherAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- typeDateMap.put(OTHER_AMOUNT,otherAmount);
|
|
|
- }
|
|
|
+// if((CollectionUtils.isEmpty(dataTypes) || dataTypes.contains(FINANCE_BALANCE_AMOUNT.getCode()) || dataTypes.contains(FINANCE_AMOUNT.getCode())) && organIds != null){
|
|
|
+//// List<IndexBaseMonthData> financePayDataWithTimely = indexBaseMonthDataDao.getFinancePayDataWithTimely(startDate1, endDate1, arrayList,tenantId);
|
|
|
+//// typeDateMap.put(IndexDataType.FINANCE_PAY,financePayDataWithTimely);
|
|
|
+// typeDateMap.put(IndexDataType.FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getFinanceBalanceDataWithTimely(startDate1, endDate1, arrayList,tenantId));
|
|
|
+// typeDateMap.put(FINANCE_AMOUNT,indexBaseMonthDataDao.getFinanceActualDataWithTimely(startDate1, endDate1, arrayList,tenantId));
|
|
|
+// List<IndexBaseMonthData> totalAmountDataWithTimely = indexBaseMonthDataDao.getTotalAmountDataWithTimely(startDate1, endDate1, arrayList,tenantId);
|
|
|
+// typeDateMap.put(IndexDataType.TOTAL_AMOUNT,totalAmountDataWithTimely);
|
|
|
+// //经营报表细化
|
|
|
+// List<IndexBaseMonthData> applyAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"APPLY,ADD_STUDENT",null,tenantId);
|
|
|
+// typeDateMap.put(APPLY_AMOUNT,applyAmount);
|
|
|
+// List<IndexBaseMonthData> renewAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"RENEW",null,tenantId);
|
|
|
+// typeDateMap.put(RENEW_AMOUNT,renewAmount);
|
|
|
+// List<IndexBaseMonthData> vipAmount = indexBaseMonthDataDao.getVipAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+// typeDateMap.put(VIP_AMOUNT,vipAmount);
|
|
|
+// List<IndexBaseMonthData> practiceAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"PRACTICE_GROUP_BUY,PRACTICE_GROUP_RENEW",null,tenantId);
|
|
|
+// typeDateMap.put(PRACTICE_AMOUNT,practiceAmount);
|
|
|
+// List<IndexBaseMonthData> otherAmount = indexBaseMonthDataDao.getOtherAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+// typeDateMap.put(OTHER_AMOUNT,otherAmount);
|
|
|
+// }
|
|
|
//按分部汇总
|
|
|
- List<IndexBaseDto> indexBaseDtoList = new ArrayList<>();
|
|
|
- if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(ORGAN_FINANCE_PAY.getCode())||dataTypes.contains(ORGAN_FINANCE_BALANCE_AMOUNT.getCode())||
|
|
|
+ if((CollectionUtils.isEmpty(dataTypes) || dataTypes.contains(ORGAN_FINANCE_BALANCE_AMOUNT.getCode()) ||
|
|
|
dataTypes.contains(ORGAN_FINANCE_AMOUNT.getCode())) && organIds != null){
|
|
|
- List<IndexBaseMonthData> financePayDataWithTimely = indexBaseMonthDataDao.getOrganFinancePayDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(IndexDataType.ORGAN_FINANCE_PAY,financePayDataWithTimely));
|
|
|
-
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(IndexDataType.ORGAN_FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getOrganFinanceBalanceDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId())));
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_FINANCE_AMOUNT,indexBaseMonthDataDao.getOrganFinanceActualDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId())));
|
|
|
- List<IndexBaseMonthData> totalAmountDataWithTimely = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(IndexDataType.ORGAN_TOTAL_AMOUNT,totalAmountDataWithTimely));
|
|
|
- //经营报表细化
|
|
|
- List<IndexBaseMonthData> applyAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"APPLY,ADD_STUDENT",null,queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_APPLY_AMOUNT,applyAmount));
|
|
|
- List<IndexBaseMonthData> renewAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"RENEW",null,queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_RENEW_AMOUNT,renewAmount));
|
|
|
- List<IndexBaseMonthData> vipAmount = indexBaseMonthDataDao.getOrganVipAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_VIP_AMOUNT,vipAmount));
|
|
|
- List<IndexBaseMonthData> practiceAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),"PRACTICE_GROUP_BUY,PRACTICE_GROUP_RENEW",null,queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_PRACTICE_AMOUNT,practiceAmount));
|
|
|
- List<IndexBaseMonthData> otherAmount = indexBaseMonthDataDao.getOrganOtherAmountDataWithTimelyDetails(startDate.toString(), endDate.toString(), new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_OTHER_AMOUNT,otherAmount));
|
|
|
+ CompletableFuture<List<IndexBaseDto>> future = CompletableFuture.supplyAsync(() -> {
|
|
|
+ System.out.println("start search 经营报表细化1");
|
|
|
+ List<IndexBaseDto> indexBaseDtoList = new ArrayList<>();
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(IndexDataType.ORGAN_FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getOrganFinanceBalanceDataWithTimely(startDate1, endDate1, arrayList,tenantId)));
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_FINANCE_AMOUNT,indexBaseMonthDataDao.getOrganFinanceActualDataWithTimely(startDate1, endDate1, arrayList,tenantId)));
|
|
|
+ List<IndexBaseMonthData> totalAmountDataWithTimely = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimely(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(IndexDataType.ORGAN_TOTAL_AMOUNT,totalAmountDataWithTimely));
|
|
|
+ //经营报表细化
|
|
|
+ List<IndexBaseMonthData> applyAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"APPLY,ADD_STUDENT",null,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_APPLY_AMOUNT,applyAmount));
|
|
|
+ List<IndexBaseMonthData> renewAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"RENEW",null,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_RENEW_AMOUNT,renewAmount));
|
|
|
+ List<IndexBaseMonthData> vipAmount = indexBaseMonthDataDao.getOrganVipAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_VIP_AMOUNT,vipAmount));
|
|
|
+ List<IndexBaseMonthData> practiceAmount = indexBaseMonthDataDao.getOrganTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"PRACTICE_GROUP_BUY,PRACTICE_GROUP_RENEW",null,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_PRACTICE_AMOUNT,practiceAmount));
|
|
|
+ List<IndexBaseMonthData> otherAmount = indexBaseMonthDataDao.getOrganOtherAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ indexBaseDtoList.add(this.getIndexBaseDto(ORGAN_OTHER_AMOUNT,otherAmount));
|
|
|
+ System.out.println("end search 经营报表细化1");
|
|
|
+ return indexBaseDtoList;
|
|
|
+ },exportExecutorService);
|
|
|
+ CompletableFuture<Map<IndexDataType, List<IndexBaseMonthData>>> future1 = CompletableFuture.supplyAsync(()->{
|
|
|
+ System.out.println("start search 经营报表细化2");
|
|
|
+ Map<IndexDataType, List<IndexBaseMonthData>> typeDateMap1 = new HashMap<>(8);
|
|
|
+ typeDateMap1.put(IndexDataType.FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getFinanceBalanceDataWithTimely(startDate1, endDate1, arrayList,tenantId));
|
|
|
+ typeDateMap1.put(FINANCE_AMOUNT,indexBaseMonthDataDao.getFinanceActualDataWithTimely(startDate1, endDate1, arrayList,tenantId));
|
|
|
+ List<IndexBaseMonthData> totalAmountDataWithTimely = indexBaseMonthDataDao.getTotalAmountDataWithTimely(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ typeDateMap1.put(IndexDataType.TOTAL_AMOUNT,totalAmountDataWithTimely);
|
|
|
+ //经营报表细化
|
|
|
+ List<IndexBaseMonthData> applyAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"APPLY,ADD_STUDENT",null,tenantId);
|
|
|
+ typeDateMap1.put(APPLY_AMOUNT,applyAmount);
|
|
|
+ List<IndexBaseMonthData> renewAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"RENEW",null,tenantId);
|
|
|
+ typeDateMap1.put(RENEW_AMOUNT,renewAmount);
|
|
|
+ List<IndexBaseMonthData> vipAmount = indexBaseMonthDataDao.getVipAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ typeDateMap1.put(VIP_AMOUNT,vipAmount);
|
|
|
+ List<IndexBaseMonthData> practiceAmount = indexBaseMonthDataDao.getTotalAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,"PRACTICE_GROUP_BUY,PRACTICE_GROUP_RENEW",null,tenantId);
|
|
|
+ typeDateMap1.put(PRACTICE_AMOUNT,practiceAmount);
|
|
|
+ List<IndexBaseMonthData> otherAmount = indexBaseMonthDataDao.getOtherAmountDataWithTimelyDetails(startDate1, endDate1, arrayList,tenantId);
|
|
|
+ typeDateMap1.put(OTHER_AMOUNT,otherAmount);
|
|
|
+ System.out.println("end search 经营报表细化2");
|
|
|
+ return typeDateMap1;
|
|
|
+ },exportExecutorService);
|
|
|
+ result.addAll(future.join());
|
|
|
+ typeDateMap.putAll(future1.join());
|
|
|
}
|
|
|
|
|
|
if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(MUSIC_GROUP_COURSE.getCode())||dataTypes.contains(VIP_GROUP_COURSE.getCode())
|
|
|
||dataTypes.contains(VIP_GROUP_ONLINE_COURSE.getCode())||dataTypes.contains(VIP_GROUP_OFFLINE_COURSE.getCode())
|
|
|
||dataTypes.contains(PRACTICE_GROUP_COURSE.getCode())){
|
|
|
if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.MUSIC_GROUP_COURSE.getCode())) && organIds != null) {
|
|
|
- List<IndexBaseMonthData> musicCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate.toString(), endDate.toString(), GroupType.MUSIC, null, null, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> musicCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate1, endDate1, GroupType.MUSIC, null, null, arrayList,tenantId);
|
|
|
typeDateMap.put(MUSIC_GROUP_COURSE,musicCourseData);
|
|
|
}
|
|
|
|
|
|
if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.VIP_GROUP_COURSE.getCode())) && organIds != null) {
|
|
|
- List<IndexBaseMonthData> vipCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, null, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- List<OrganVipGroupCategoryCourseNumDto> vipGroupCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, null, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> vipCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate1, endDate1, GroupType.VIP, null, null, arrayList,tenantId);
|
|
|
+ List<OrganVipGroupCategoryCourseNumDto> vipGroupCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate1, endDate1, GroupType.VIP, null, null, arrayList,tenantId);
|
|
|
Map<Integer, Map<String, Integer>> organCategoryCourseMap = new HashMap<>();
|
|
|
if (!CollectionUtils.isEmpty(vipGroupCategoryCourseData)) {
|
|
|
organCategoryCourseMap = vipGroupCategoryCourseData.stream().collect(Collectors.groupingBy(OrganVipGroupCategoryCourseNumDto::getOrganId, Collectors.toMap(OrganVipGroupCategoryCourseNumDto::getCategoryName, o -> o.getCourseNum())));
|
|
@@ -220,8 +251,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
|
|
|
if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.VIP_GROUP_ONLINE_COURSE.getCode())) && organIds != null) {
|
|
|
- List<IndexBaseMonthData> vipOnlineCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, TeachModeEnum.ONLINE, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- List<OrganVipGroupCategoryCourseNumDto> vipGroupOnlineCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, TeachModeEnum.ONLINE, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> vipOnlineCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate1, endDate1, GroupType.VIP, null, TeachModeEnum.ONLINE, arrayList,tenantId);
|
|
|
+ List<OrganVipGroupCategoryCourseNumDto> vipGroupOnlineCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate1, endDate1, GroupType.VIP, null, TeachModeEnum.ONLINE, arrayList,tenantId);
|
|
|
Map<Integer, Map<String, Integer>> organOnlineCategoryCourseMap = new HashMap<>();
|
|
|
if (!CollectionUtils.isEmpty(vipGroupOnlineCategoryCourseData)) {
|
|
|
organOnlineCategoryCourseMap = vipGroupOnlineCategoryCourseData.stream().collect(Collectors.groupingBy(OrganVipGroupCategoryCourseNumDto::getOrganId, Collectors.toMap(OrganVipGroupCategoryCourseNumDto::getCategoryName, o -> o.getCourseNum())));
|
|
@@ -235,8 +266,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
|
|
|
if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.VIP_GROUP_OFFLINE_COURSE.getCode())) && organIds != null) {
|
|
|
- List<IndexBaseMonthData> vipOfflineCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, TeachModeEnum.OFFLINE, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
- List<OrganVipGroupCategoryCourseNumDto> vipGroupOfflineCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate.toString(), endDate.toString(), GroupType.VIP, null, TeachModeEnum.OFFLINE, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> vipOfflineCourseData = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate1, endDate1, GroupType.VIP, null, TeachModeEnum.OFFLINE, arrayList,tenantId);
|
|
|
+ List<OrganVipGroupCategoryCourseNumDto> vipGroupOfflineCategoryCourseData = indexBaseMonthDataDao.getVipGroupCategoryCourseData(null, startDate1, endDate1, GroupType.VIP, null, TeachModeEnum.OFFLINE, arrayList,tenantId);
|
|
|
Map<Integer, Map<String, Integer>> organOfflineCategoryCourseMap = new HashMap<>();
|
|
|
if (!CollectionUtils.isEmpty(vipGroupOfflineCategoryCourseData)) {
|
|
|
organOfflineCategoryCourseMap = vipGroupOfflineCategoryCourseData.stream().collect(Collectors.groupingBy(OrganVipGroupCategoryCourseNumDto::getOrganId, Collectors.toMap(OrganVipGroupCategoryCourseNumDto::getCategoryName, o -> o.getCourseNum())));
|
|
@@ -250,7 +281,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
|
|
|
if((CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.PRACTICE_GROUP_COURSE.getCode())) && organIds != null) {
|
|
|
- List<IndexBaseMonthData> practiceCourses = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate.toString(), endDate.toString(), GroupType.PRACTICE, null, null, new ArrayList<>(organIds),queryInfo.getTenantId());
|
|
|
+ List<IndexBaseMonthData> practiceCourses = indexBaseMonthDataDao.getGroupCourseDataWithGroup(null, startDate1, endDate1, GroupType.PRACTICE, null, null, arrayList,tenantId);
|
|
|
typeDateMap.put(PRACTICE_GROUP_COURSE,practiceCourses);
|
|
|
}
|
|
|
}
|
|
@@ -359,7 +390,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
}
|
|
|
result.add(indexBaseData);
|
|
|
}
|
|
|
- result.addAll(indexBaseDtoList);
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|