package com.qianwen.smartman.modules.mdc.wrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.LinkedHashMap;
|
import java.util.List;
|
import java.util.Map;
|
import java.util.stream.Collectors;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import com.qianwen.smartman.common.constant.MdcConstant;
|
import com.qianwen.smartman.common.utils.MessageUtils;
|
import com.qianwen.core.tool.utils.Func;
|
import com.qianwen.smartman.modules.cps.entity.Workstation;
|
import com.qianwen.smartman.modules.mdc.dto.IntervalDateDto;
|
import com.qianwen.smartman.modules.mdc.dto.ShiftIndexNameDTO;
|
import com.qianwen.smartman.modules.mdc.dto.StatisticsWrapperDto;
|
import com.qianwen.smartman.modules.mdc.entity.SuperAggregate;
|
import com.qianwen.smartman.modules.mdc.entity.SuperAggregateOutput;
|
import com.qianwen.smartman.modules.mdc.entity.SuperAggregateState;
|
import com.qianwen.smartman.modules.mdc.enums.OpenTypeEnums;
|
import com.qianwen.smartman.modules.mdc.enums.ProductivityTypeEnum;
|
import com.qianwen.smartman.modules.mdc.service.ITimeUsedAnalysisService;
|
import com.qianwen.smartman.modules.mdc.utils.EifficiencyUtils;
|
import com.qianwen.smartman.modules.mdc.utils.FilterOffUtils;
|
import com.qianwen.smartman.modules.mdc.vo.StatisticsAnalysisQueryVO;
|
import com.qianwen.smartman.modules.mdc.vo.StatisticsDataVO;
|
import com.qianwen.smartman.modules.mdc.vo.StatisticsVO;
|
import org.springframework.stereotype.Component;
|
|
@Component
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/mdc/wrapper/StatisticsWrapper.class */
|
public class StatisticsWrapper {
|
private static final Logger log = LoggerFactory.getLogger(StatisticsWrapper.class);
|
private final ITimeUsedAnalysisService timeUsedAnalysisService;
|
|
public StatisticsWrapper(final ITimeUsedAnalysisService timeUsedAnalysisService) {
|
this.timeUsedAnalysisService = timeUsedAnalysisService;
|
}
|
|
public StatisticsVO entityVO(StatisticsWrapperDto statisticsWrapperDto) {
|
StatisticsVO statisticsVO;
|
StatisticsAnalysisQueryVO statisticsAnalysisQueryVO = statisticsWrapperDto.getStatisticsAnalysisQueryVO();
|
List<IntervalDateDto> intervalDates = statisticsWrapperDto.getIntervalDates();
|
List<SuperAggregate> superAggregates = new ArrayList<>(statisticsWrapperDto.getSuperAggregateList());
|
IPage<Workstation> workstationPage = statisticsWrapperDto.getWorkstationPage();
|
Boolean isOutput = statisticsWrapperDto.getIsOutput();
|
Integer queryType = statisticsAnalysisQueryVO.getQueryType();
|
List<Integer> shiftIndexList = statisticsAnalysisQueryVO.getShiftIndexList();
|
new StatisticsVO();
|
ProductivityTypeEnum productivityType = statisticsAnalysisQueryVO.getProductivityType();
|
switch (statisticsAnalysisQueryVO.getStatisticalMethod()) {
|
case DAY:
|
if (MdcConstant.SHEET.equals(queryType)) {
|
statisticsVO = buildDateDataSheet(intervalDates, superAggregates, workstationPage, isOutput, productivityType);
|
break;
|
} else {
|
statisticsVO = buildDateData(intervalDates, superAggregates, workstationPage.getRecords(), isOutput, productivityType);
|
break;
|
}
|
case WEEK:
|
if (MdcConstant.SHEET.equals(queryType)) {
|
statisticsVO = buildMonthOrWeekDataSheet(intervalDates, superAggregates, workstationPage, MdcConstant.WEEK, isOutput, productivityType);
|
break;
|
} else {
|
statisticsVO = buildMonthOrWeekData(intervalDates, superAggregates, workstationPage.getRecords(), MdcConstant.WEEK, isOutput, productivityType);
|
break;
|
}
|
case MONTH:
|
if (MdcConstant.SHEET.equals(queryType)) {
|
statisticsVO = buildMonthOrWeekDataSheet(intervalDates, superAggregates, workstationPage, MdcConstant.MONTH, isOutput, productivityType);
|
break;
|
} else {
|
statisticsVO = buildMonthOrWeekData(intervalDates, superAggregates, workstationPage.getRecords(), MdcConstant.MONTH, isOutput, productivityType);
|
break;
|
}
|
default:
|
List<Long> workstationIds = (List) workstationPage.getRecords().stream().map((v0) -> {
|
return v0.getId();
|
}).collect(Collectors.toList());
|
Map<Long, List<ShiftIndexNameDTO>> idToValue = this.timeUsedAnalysisService.queryWorkStationShiftIndex(workstationIds, statisticsAnalysisQueryVO.getStartDate());
|
statisticsVO = buildShiftData(superAggregates, workstationPage, shiftIndexList, idToValue, isOutput, productivityType);
|
break;
|
}
|
return statisticsVO;
|
}
|
|
public StatisticsVO buildDateDataSheet(List<IntervalDateDto> intervalDates, List<SuperAggregate> superAggregates, IPage<Workstation> workstationIPage, Boolean isOutput, ProductivityTypeEnum productivityType) {
|
StatisticsVO statisticsVO = new StatisticsVO();
|
Map<Long, Map<Integer, List<SuperAggregate>>> collectGroupByDate = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryDate();
|
})));
|
List<String> dayList = intervalDates.get(0).getDayList();
|
List<StatisticsDataVO> statisticsDataVOS = new ArrayList<>();
|
List<Workstation> workstationList = workstationIPage.getRecords();
|
workstationList.forEach(workstation -> {
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
statisticsDataVO.setId(workstation.getId().toString());
|
statisticsDataVO.setWorkstationCode(workstation.getCode());
|
statisticsDataVO.setWorkstationName(workstation.getName());
|
Map<Integer, List<SuperAggregate>> map = (Map) collectGroupByDate.get(workstation.getId());
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
if (Func.isEmpty(map)) {
|
dayList.forEach(day -> {
|
data.put(day, "0");
|
});
|
} else {
|
dayList.forEach(day2 -> {
|
List<SuperAggregate> superAggregateList = (List) map.get(Integer.valueOf(day2.replaceAll("-", "")));
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(day2, value);
|
});
|
}
|
statisticsDataVO.setData(data);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
Page page = new Page();
|
page.setRecords(statisticsDataVOS);
|
page.setTotal(workstationIPage.getTotal()).setPages(workstationIPage.getPages()).setSize(workstationIPage.getSize()).setCurrent(workstationIPage.getCurrent());
|
statisticsVO.setItems(page);
|
return statisticsVO;
|
}
|
|
public StatisticsVO buildDateData(List<IntervalDateDto> intervalDates, List<SuperAggregate> superAggregates, List<Workstation> workstationList, Boolean isOutput, ProductivityTypeEnum productivityType) {
|
Map<Long, Workstation> workstationIdToValue = (Map) workstationList.stream().collect(Collectors.toMap((v0) -> {
|
return v0.getId();
|
}, v -> {
|
return v;
|
}));
|
List<Long> workstationIdList = (List) workstationList.stream().map((v0) -> {
|
return v0.getId();
|
}).collect(Collectors.toList());
|
StatisticsVO statisticsVO = new StatisticsVO();
|
Map<Integer, Map<Long, List<SuperAggregate>>> collectGroupByDate = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getFactoryDate();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
})));
|
List<String> dayList = intervalDates.get(0).getDayList();
|
List<StatisticsDataVO> statisticsDataVOS = new ArrayList<>();
|
dayList.forEach(day -> {
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
statisticsDataVO.setId(day);
|
Map<Long, List<SuperAggregate>> map = (Map) collectGroupByDate.get(Integer.valueOf(day.replaceAll("-", "")));
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
LinkedHashMap<String, String> nameData = new LinkedHashMap<>();
|
if (Func.isEmpty(map)) {
|
workstationIdList.forEach(workstationId -> {
|
data.put(workstationId.toString(), "0");
|
nameData.put(String.valueOf(workstationId), ((Workstation) workstationIdToValue.get(workstationId)).getName());
|
});
|
} else {
|
workstationIdList.forEach(workstationId2 -> {
|
List<SuperAggregate> superAggregateList = (List) map.get(workstationId2);
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(workstationId2.toString(), value);
|
nameData.put(String.valueOf(workstationId2), ((Workstation) workstationIdToValue.get(workstationId2)).getName());
|
});
|
}
|
statisticsDataVO.setData(data);
|
statisticsDataVO.setNameData(nameData);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
Page page = new Page();
|
page.setRecords(statisticsDataVOS).setSize(-1L);
|
statisticsVO.setItems(page);
|
return statisticsVO;
|
}
|
|
public StatisticsVO buildMonthOrWeekDataSheet(List<IntervalDateDto> intervalDates, List<SuperAggregate> superAggregates, IPage<Workstation> workstationIPage, Boolean isMonth, Boolean isOutput, ProductivityTypeEnum productivityType) {
|
StatisticsVO statisticsVO = new StatisticsVO();
|
Map<Long, Map<Integer, Map<Integer, List<SuperAggregate>>>> collectGroupByMonth = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryYear();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryMonth();
|
}))));
|
Map<Long, Map<Integer, Map<Integer, List<SuperAggregate>>>> collectGroupByWeek = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryYear();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryWeek();
|
}))));
|
List<StatisticsDataVO> statisticsDataVOS = new ArrayList<>();
|
List<Workstation> workstationList = workstationIPage.getRecords();
|
workstationList.forEach(workstation -> {
|
Map<Integer, Map<Integer, List<SuperAggregate>>> yearMap;
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
statisticsDataVO.setId(String.valueOf(workstation.getId()));
|
statisticsDataVO.setWorkstationCode(workstation.getCode());
|
statisticsDataVO.setWorkstationName(workstation.getName());
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
if (isMonth.booleanValue()) {
|
yearMap = (Map) collectGroupByMonth.get(workstation.getId());
|
} else {
|
yearMap = (Map) collectGroupByWeek.get(workstation.getId());
|
}
|
if (Func.isEmpty(yearMap)) {
|
intervalDates.forEach(intervalDateDto -> {
|
Integer year = intervalDateDto.getYear();
|
if (isMonth.booleanValue()) {
|
intervalDateDto.getMonthList().forEach(month -> {
|
data.put(year + "-" + month, "0");
|
});
|
} else {
|
intervalDateDto.getWeekList().forEach(week -> {
|
data.put(year + "-" + week, "0");
|
});
|
}
|
});
|
} else {
|
Map<Integer, Map<Integer, List<SuperAggregate>>> map = yearMap;
|
intervalDates.forEach(intervalDateDto2 -> {
|
Map<Integer, List<SuperAggregate>> monthOrWeekMap = (Map) map.get(intervalDateDto2.getYear());
|
if (Func.isEmpty(monthOrWeekMap)) {
|
if (isMonth.booleanValue()) {
|
List<Integer> monthList = intervalDateDto2.getMonthList();
|
monthList.forEach(month -> {
|
data.put(intervalDateDto2.getYear() + "-" + month, "0");
|
});
|
return;
|
}
|
List<Integer> weekList = intervalDateDto2.getWeekList();
|
weekList.forEach(week -> {
|
data.put(intervalDateDto2.getYear() + "-" + week, "0");
|
});
|
} else if (isMonth.booleanValue()) {
|
intervalDateDto2.getMonthList().forEach(month2 -> {
|
List<SuperAggregate> superAggregateList = (List) monthOrWeekMap.get(month2);
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(intervalDateDto2.getYear() + "-" + month2, value);
|
});
|
} else {
|
intervalDateDto2.getWeekList().forEach(week2 -> {
|
List<SuperAggregate> superAggregateList = (List) monthOrWeekMap.get(week2);
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(intervalDateDto2.getYear() + "-" + week2, value);
|
});
|
}
|
});
|
}
|
statisticsDataVO.setData(data);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
Page page = new Page();
|
page.setRecords(statisticsDataVOS);
|
page.setTotal(workstationIPage.getTotal()).setPages(workstationIPage.getPages()).setSize(workstationIPage.getSize()).setCurrent(workstationIPage.getCurrent());
|
statisticsVO.setItems(page);
|
return statisticsVO;
|
}
|
|
public StatisticsVO buildMonthOrWeekData(List<IntervalDateDto> intervalDates, List<SuperAggregate> superAggregates, List<Workstation> workstationList, Boolean isMonth, Boolean isOutput, ProductivityTypeEnum productivityType) {
|
Map<Integer, Map<Integer, Map<Long, List<SuperAggregate>>>> collectGroupByMonthOrWeek;
|
Map<Long, Workstation> workstationIdToValue = (Map) workstationList.stream().collect(Collectors.toMap((v0) -> {
|
return v0.getId();
|
}, v -> {
|
return v;
|
}));
|
List<Long> workstationIdList = (List) workstationList.stream().map((v0) -> {
|
return v0.getId();
|
}).collect(Collectors.toList());
|
StatisticsVO statisticsVO = new StatisticsVO();
|
if (isMonth.booleanValue()) {
|
collectGroupByMonthOrWeek = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getFactoryYear();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryMonth();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}))));
|
} else {
|
collectGroupByMonthOrWeek = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getFactoryYear();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getFactoryWeek();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}))));
|
}
|
List<StatisticsDataVO> statisticsDataVOS = new ArrayList<>();
|
Map<Integer, Map<Integer, Map<Long, List<SuperAggregate>>>> finalCollectGroupByMonthOrWeek = collectGroupByMonthOrWeek;
|
intervalDates.forEach(intervalDateDto -> {
|
List<Integer> monthOrWeekList;
|
Integer year = intervalDateDto.getYear();
|
Map<Integer, Map<Long, List<SuperAggregate>>> monthOrWeekToValue = (Map) finalCollectGroupByMonthOrWeek.get(year);
|
if (isMonth.booleanValue()) {
|
monthOrWeekList = intervalDateDto.getMonthList();
|
} else {
|
monthOrWeekList = intervalDateDto.getWeekList();
|
}
|
if (Func.isEmpty(monthOrWeekToValue)) {
|
monthOrWeekList.forEach(monthOrWeek -> {
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
LinkedHashMap<String, String> nameData = new LinkedHashMap<>();
|
statisticsDataVO.setId(year + "-" + monthOrWeek);
|
workstationIdList.forEach(workstationId -> {
|
data.put(workstationId.toString(), "0");
|
nameData.put(workstationId.toString(), ((Workstation) workstationIdToValue.get(workstationId)).getName());
|
});
|
statisticsDataVO.setData(data);
|
statisticsDataVO.setNameData(nameData);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
} else {
|
monthOrWeekList.forEach(monthOrWeek2 -> {
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
LinkedHashMap<String, String> nameData = new LinkedHashMap<>();
|
statisticsDataVO.setId(year + "-" + monthOrWeek2);
|
Map<Long, List<SuperAggregate>> workstationMap = (Map) monthOrWeekToValue.get(monthOrWeek2);
|
if (Func.isEmpty(workstationMap)) {
|
workstationIdList.forEach(workstationId -> {
|
data.put(workstationId.toString(), "0");
|
nameData.put(workstationId.toString(), ((Workstation) workstationIdToValue.get(workstationId)).getName());
|
});
|
} else {
|
workstationIdList.forEach(workstationId2 -> {
|
List<SuperAggregate> superAggregateList = (List) workstationMap.get(workstationId2);
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(workstationId2.toString(), value);
|
nameData.put(workstationId2.toString(), ((Workstation) workstationIdToValue.get(workstationId2)).getName());
|
});
|
}
|
statisticsDataVO.setData(data);
|
statisticsDataVO.setNameData(nameData);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
}
|
});
|
Page page = new Page();
|
page.setRecords(statisticsDataVOS).setSize(-1L);
|
statisticsVO.setItems(page);
|
return statisticsVO;
|
}
|
|
public StatisticsVO buildShiftData(List<SuperAggregate> superAggregates, IPage<Workstation> workstationIPage, List<Integer> shiftIndexList, Map<Long, List<ShiftIndexNameDTO>> idToValue, Boolean isOutput, ProductivityTypeEnum productivityType) {
|
Map<Long, Map<Integer, List<SuperAggregate>>> collectGroupByShift = (Map) superAggregates.stream().collect(Collectors.groupingBy((v0) -> {
|
return v0.getWorkstationId();
|
}, Collectors.groupingBy((v0) -> {
|
return v0.getShiftIndex();
|
})));
|
StatisticsVO statisticsVO = new StatisticsVO();
|
List<Workstation> workstationList = workstationIPage.getRecords();
|
List<StatisticsDataVO> statisticsDataVOS = new ArrayList<>();
|
workstationList.forEach(workstation -> {
|
StatisticsDataVO statisticsDataVO = new StatisticsDataVO();
|
statisticsDataVO.setId(String.valueOf(workstation.getId()));
|
statisticsDataVO.setWorkstationCode(workstation.getCode());
|
statisticsDataVO.setWorkstationName(workstation.getName());
|
Map<Integer, List<SuperAggregate>> map = (Map) collectGroupByShift.get(workstation.getId());
|
LinkedHashMap<String, String> data = new LinkedHashMap<>();
|
LinkedHashMap<String, String> shiftData = new LinkedHashMap<>();
|
List<ShiftIndexNameDTO> shiftDetails = (List) idToValue.get(workstation.getId());
|
List<Integer> trueShiftIndexList = new ArrayList<>();
|
Map<Integer, String> shiftIndexToName = new HashMap<>();
|
if (Func.isNotEmpty(shiftDetails)) {
|
trueShiftIndexList = (List) shiftDetails.stream().map((v0) -> {
|
return v0.getShiftIndex();
|
}).collect(Collectors.toList());
|
shiftIndexToName = (Map) shiftDetails.stream().collect(Collectors.toMap((v0) -> {
|
return v0.getShiftIndex();
|
}, (v0) -> {
|
return v0.getIndexName();
|
}));
|
}
|
if (Func.isEmpty(map)) {
|
List<Integer> finalTrueShiftIndexList = trueShiftIndexList;
|
Map<Integer, String> finalShiftIndexToName = shiftIndexToName;
|
shiftIndexList.forEach(shiftIndex -> {
|
if (finalTrueShiftIndexList.contains(shiftIndex)) {
|
data.put(shiftIndex.toString(), "0");
|
shiftData.put(shiftIndex.toString(), finalShiftIndexToName.get(shiftIndex));
|
return;
|
}
|
data.put(shiftIndex.toString(), "-");
|
shiftData.put(shiftIndex.toString(), MessageUtils.message("mdc.not.schedule", new Object[0]));
|
});
|
} else {
|
Map<Integer, String> finalShiftIndexToName1 = shiftIndexToName;
|
List<Integer> finalTrueShiftIndexList1 = trueShiftIndexList;
|
shiftIndexList.forEach(shiftIndex2 -> {
|
if (finalTrueShiftIndexList1.contains(shiftIndex2)) {
|
List<SuperAggregate> superAggregateList = (List) map.get(shiftIndex2);
|
String value = getValue(superAggregateList, isOutput, productivityType);
|
data.put(shiftIndex2.toString(), value);
|
shiftData.put(shiftIndex2.toString(), finalShiftIndexToName1.get(shiftIndex2));
|
return;
|
}
|
data.put(shiftIndex2.toString(), "-");
|
shiftData.put(shiftIndex2.toString(), MessageUtils.message("mdc.not.schedule", new Object[0]));
|
});
|
}
|
statisticsDataVO.setData(data);
|
statisticsDataVO.setNameData(shiftData);
|
statisticsDataVOS.add(statisticsDataVO);
|
});
|
Page page = new Page();
|
page.setRecords(statisticsDataVOS);
|
page.setTotal(workstationIPage.getTotal()).setPages(workstationIPage.getPages()).setSize(workstationIPage.getSize()).setCurrent(workstationIPage.getCurrent());
|
statisticsVO.setItems(page);
|
return statisticsVO;
|
}
|
|
public String getValue(List<SuperAggregate> superAggregateList, Boolean output, ProductivityTypeEnum productivityType) {
|
String value;
|
if (output.booleanValue()) {
|
List<SuperAggregateOutput> superAggregateOutputList = getSuperAggregateOutputList(superAggregateList);
|
value = String.valueOf(calculateOutput(superAggregateOutputList));
|
} else {
|
List<SuperAggregateState> superAggregateStateList = getSuperAggregateStateList(superAggregateList);
|
value = String.valueOf(EifficiencyUtils.calculationResults(superAggregateStateList, productivityType));
|
}
|
return value;
|
}
|
|
public List<SuperAggregateOutput> getSuperAggregateOutputList(List<SuperAggregate> superAggregateList) {
|
List<SuperAggregateOutput> superAggregateOutputList = new ArrayList<>();
|
if (Func.isEmpty(superAggregateList)) {
|
return superAggregateOutputList;
|
}
|
superAggregateList.forEach(superAggregate -> {
|
if (superAggregate instanceof SuperAggregateOutput) {
|
superAggregateOutputList.add((SuperAggregateOutput) superAggregate);
|
}
|
});
|
return superAggregateOutputList;
|
}
|
|
public List<SuperAggregateState> getSuperAggregateStateList(List<SuperAggregate> superAggregateList) {
|
List<SuperAggregateState> superAggregateStateList = new ArrayList<>();
|
if (Func.isEmpty(superAggregateList)) {
|
return superAggregateStateList;
|
}
|
superAggregateList.forEach(superAggregate -> {
|
if (superAggregate instanceof SuperAggregateState) {
|
superAggregateStateList.add((SuperAggregateState) superAggregate);
|
}
|
});
|
return superAggregateStateList;
|
}
|
|
public Long calculateOutput(List<SuperAggregateOutput> superAggregateOutputList) {
|
List<SuperAggregateOutput> superAggregateOutputList2 = FilterOffUtils.filterOffDay(superAggregateOutputList, OpenTypeEnums.OUT_PUT);
|
if (Func.isEmpty(superAggregateOutputList2)) {
|
return 0L;
|
}
|
return Long.valueOf(superAggregateOutputList2.stream().mapToLong((v0) -> {
|
return v0.getOutput();
|
}).sum());
|
}
|
}
|