| | |
| | | package com.moral.service.impl;
|
| | |
|
| | | import static com.moral.common.bean.Constants.NULL_VALUE;
|
| | | import static org.apache.commons.lang3.time.DateUtils.addDays;
|
| | | import static org.apache.commons.lang3.time.DateUtils.addMonths;
|
| | | import static org.apache.commons.lang3.time.DateUtils.truncate;
|
| | | import static org.springframework.util.ObjectUtils.isEmpty;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.math.RoundingMode;
|
| | | import java.time.LocalDate;
|
| | | import java.time.temporal.TemporalAdjusters;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.Arrays;
|
| | | import java.util.Collections;
|
| | | import java.util.Comparator;
|
| | | import java.util.Date;
|
| | |
| | | import java.util.Map;
|
| | | import java.util.Map.Entry;
|
| | | import java.util.Set;
|
| | | import java.util.TreeSet;
|
| | | import java.util.concurrent.Callable;
|
| | | import java.util.concurrent.CompletionService;
|
| | | import java.util.concurrent.ExecutorCompletionService;
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.moral.common.util.ReportTimeFormat;
|
| | | import com.moral.entity.charts.DataCondition;
|
| | | import com.moral.entity.charts.LineChartCriteria;
|
| | | import com.moral.entity.charts.PairData;
|
| | | import com.moral.entity.charts.TimePeriod;
|
| | | import org.apache.commons.lang3.time.DateUtils;
|
| | | import org.springframework.data.mongodb.core.aggregation.Aggregation;
|
| | | import org.springframework.data.mongodb.core.aggregation.AggregationResults;
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.util.ObjectUtils;
|
| | |
|
| | | import com.mongodb.BasicDBObject;
|
| | | import com.alibaba.fastjson.JSON;
|
| | | import com.alibaba.fastjson.TypeReference;
|
| | | import com.moral.common.util.CalculateUtils;
|
| | | import com.moral.common.util.ResourceUtil;
|
| | | import com.moral.common.util.ValidateUtil;
|
| | | import com.moral.entity.Device;
|
| | | import com.moral.mapper.HistoryMinutelyMapper;
|
| | | import com.moral.entity.Sensor;
|
| | | import com.moral.mapper.DeviceMapper;
|
| | | import com.moral.mapper.HistoryMinutelyMapper;
|
| | | import com.moral.mapper.SensorMapper;
|
| | | import com.moral.service.HistoryMinutelyService;
|
| | |
|
| | | @Service
|
| | | @SuppressWarnings({ "unchecked", "rawtypes", "unused" })
|
| | | public class HistoryMinutelyServiceImpl implements HistoryMinutelyService {
|
| | |
|
| | | @Resource
|
| | |
| | | @Resource
|
| | | private SensorMapper sensorMapper;
|
| | |
|
| | | private Set<String> sensorKeys = new HashSet<String>();
|
| | | // volatile
|
| | |
|
| | | @Override
|
| | | public Map<String, Object> getDayAQIByDevice(Map<String, Object> parameters) {
|
| | | ValidateUtil.notNull(parameters.get("mac"), "param.is.null");
|
| | | Date date = new Date();
|
| | | LocalDate localDate = LocalDate.now();
|
| | | // 昨日00:00:00
|
| | | parameters.put("start", truncate(addDays(date, -1), Calendar.DATE));
|
| | | parameters.put("start", localDate.minusDays(1));
|
| | | |
| | | // 今日00:00:00
|
| | | parameters.put("end", truncate(date, Calendar.DATE));
|
| | | parameters.put("end", localDate);
|
| | | String[] macKeys = { "e1", "e2", "e10", "e11", "e15", "e16" };
|
| | | String sensorKeyColumn = "";
|
| | | for (int i = 0; i < macKeys.length; i++) {
|
| | |
| | | return resultMap;
|
| | | }
|
| | |
|
| | | public Map<String, List<Object>> getMonitorPointOrDeviceAvgData4Compare(Map<String, Object> parameters) throws Exception {
|
| | | Map<String, List<Object>> resultMap = new HashMap<String, List<Object>>();
|
| | | if (ObjectUtils.isEmpty(parameters)) {
|
| | | resultMap.put("c", null);
|
| | | return resultMap;
|
| | | }
|
| | | List<Map<String, Object>> resultList = getMonitorPointOrDeviceAvgData(parameters);
|
| | | |
| | | List<Object> timeList = new ArrayList<Object>();
|
| | | List<Object> dataList = new ArrayList<Object>();
|
| | | String sensorKey = (String) parameters.get("sensorKey");
|
| | | for (Map<String, Object> map : resultList) {
|
| | | String time = map.get("time").toString();
|
| | | time =time.substring(time.length() - 2);
|
| | | timeList.add(time);
|
| | | dataList.add(map.get(sensorKey));
|
| | | }
|
| | | String part = (String) parameters.get("part");
|
| | | resultMap.put("time" + part, timeList);
|
| | | resultMap.put("data" + part, dataList);
|
| | | return resultMap;
|
| | | }
|
| | | |
| | | @Override
|
| | | public Map<String, List<Object>> getCompareReport(Map<String, Object> parameters) throws Exception {
|
| | | Map<String, List<Object>> resultMap = new HashMap<String, List<Object>>();
|
| | | Map<String, Object> parametersA = new HashMap<String, Object>();
|
| | | Map<String, Object> parametersB = new HashMap<String, Object>();
|
| | | if (parameters.containsKey("time") && parameters.containsKey("monitorPoint")) {
|
| | | parametersA.put("part", "A");
|
| | | parametersA.putAll(parameters);
|
| | | parametersA.remove("timeb");
|
| | | }
|
| | | if (parameters.containsKey("timeb") && parameters.containsKey("monitorPointb")) {
|
| | | parametersB.putAll(parameters);
|
| | | parametersB.put("part", "B");
|
| | | parametersB.put("time", parametersB.get("timeb"));
|
| | | parametersB.put("monitorPoint", parametersB.get("monitorPointb"));
|
| | | if (parameters.containsKey("macb")) {
|
| | | parametersB.put("mac", parametersB.get("macb"));
|
| | | }
|
| | | parametersB.remove("timeb");
|
| | | }
|
| | | List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
|
| | | list.add(parametersA);
|
| | | list.add(parametersB);
|
| | | List<Map<String, Object>> list = JSON.parseObject((String)parameters.get("items"), new TypeReference<List<Map<String, Object>>>() {});
|
| | | parameters.remove("items");
|
| | | Map<String, Object> timeType = JSON.parseObject((String)parameters.get("timeTypes"), new TypeReference<Map<String, Object>>() {});
|
| | | parameters.remove("timeTypes");
|
| | | parameters.putAll(timeType);
|
| | | parameters.put("type", parameters.get("value"));
|
| | | parameters.remove("value");
|
| | | |
| | | ExecutorService threadPool = Executors.newCachedThreadPool();
|
| | | CompletionService<Map<String, List<Object>>> cs = new ExecutorCompletionService<Map<String, List<Object>>>(threadPool);
|
| | | for (Map<String, Object> map : list) {
|
| | |
|
| | | String type = (String) parameters.get("type");
|
| | | if ("month".equals(type)) {
|
| | | for (Map<String, Object> map : list) {
|
| | | int timeLength = Integer.valueOf(parameters.get("timeLength").toString());
|
| | | String[] formatTime = map.get("formatTime").toString().split("-");
|
| | | LocalDate localDate = LocalDate.of(Integer.valueOf(formatTime[0]), Integer.valueOf(formatTime[1]), 1);
|
| | | int lengthOfMonth = localDate.lengthOfMonth();
|
| | | if (lengthOfMonth > timeLength) {
|
| | | parameters.put("timeLength", lengthOfMonth);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | List<Object> timeList = new ArrayList<Object>();
|
| | | for (int i = 0; i <Integer.valueOf(parameters.get("timeLength").toString()); i++) {
|
| | | timeList.add(i, String.format("%02d", "day".equals(type) || "hour".equals(type) ? i : i + 1));
|
| | | }
|
| | | parameters.put("timeList", timeList);
|
| | | |
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Map<String, Object> map = list.get(i);
|
| | | map.put("part", i);
|
| | | if (ObjectUtils.isEmpty(map.get("mac"))) {
|
| | | map.remove("mac");
|
| | | }
|
| | | map.put("time", map.get("formatTime"));
|
| | | map.remove("formatTime");
|
| | | map.putAll(parameters);
|
| | | cs.submit(new Callable<Map<String, List<Object>>>() {
|
| | | @Override
|
| | | public Map<String, List<Object>> call() throws Exception {
|
| | | return getMonitorPointOrDeviceAvgData4Compare(map);
|
| | | }
|
| | | });
|
| | | |
| | | }
|
| | | |
| | | List<Object> dataList = new ArrayList<Object>();
|
| | | for (Map<String, Object> map : list) {
|
| | | resultMap.putAll(cs.take().get());
|
| | | dataList.add(cs.take().get());
|
| | | }
|
| | | if (resultMap.containsKey("timeA") && resultMap.containsKey("timeB")) {
|
| | | List<Object> timeA = resultMap.get("timeA");
|
| | | List<Object> timeB = resultMap.get("timeB");
|
| | | List<Object> time = new ArrayList<Object>(timeA);
|
| | | List<Object> time1 = new ArrayList<Object>(timeB);
|
| | | List<Object> dataA = resultMap.get("dataA");
|
| | | List<Object> dataB = resultMap.get("dataB");
|
| | | List<Object> resultA = new ArrayList<Object>();
|
| | | List<Object> resultB = new ArrayList<Object>();
|
| | | time1.removeAll(time);
|
| | | time.addAll(time1);
|
| | | time.sort(new Comparator<Object>() {
|
| | | @Override
|
| | | public int compare(Object o1, Object o2) {
|
| | | return Integer.compare(Integer.valueOf(o1.toString()), Integer.valueOf(o2.toString()));
|
| | | Map[] maps = new HashMap[list.size()];
|
| | | Set<String> sensors = new TreeSet<String>(new Comparator<String>() {
|
| | | @Override
|
| | | public int compare(String o1, String o2) {
|
| | | return Integer.compare(Integer.valueOf(o1.split("-")[0].replace("e", "")), Integer.valueOf(o2.split("-")[0].replace("e", "")));
|
| | | }
|
| | | });
|
| | | for (Object object : dataList) {
|
| | | Map<String, Object> map = (Map<String, Object>)object;
|
| | | for (String key : map.keySet()) {
|
| | | if (key.startsWith("data")) {
|
| | | int index = Integer.valueOf(key.replace("data", ""));
|
| | | maps[index] = map;
|
| | | }
|
| | | });
|
| | | for (int i = 0; i < time.size(); i++) {
|
| | | Object object = time.get(i);
|
| | | int indexA = timeA.indexOf(object);
|
| | | if (indexA > -1) {
|
| | | resultA.add(i, dataA.get(indexA));
|
| | | }else {
|
| | | resultA.add("-");
|
| | | }
|
| | | int indexB = timeB.indexOf(object);
|
| | | if (indexB > -1) {
|
| | | resultB.add(i, dataB.get(indexB));
|
| | | }else {
|
| | | resultB.add("-");
|
| | | if (key.startsWith("sensors")) {
|
| | | sensors.addAll((List<String>) map.get(key));
|
| | | }
|
| | | }
|
| | | resultMap.put("dataA", resultA);
|
| | | resultMap.put("dataB", resultB);
|
| | | resultMap.put("time", time);
|
| | | } else if (resultMap.containsKey("timeA")) {
|
| | | resultMap.put("time", resultMap.get("timeA"));
|
| | | } else {
|
| | | resultMap.put("time", resultMap.get("timeB"));
|
| | | }
|
| | | resultMap.put("times", timeList);
|
| | | resultMap.put("datas", Arrays.asList(maps));
|
| | | resultMap.put("sensors", new ArrayList<Object>(sensors));
|
| | | return resultMap;
|
| | | }
|
| | |
|
| | |
|
| | | public Map<String, List<Object>> getMonitorPointOrDeviceAvgData4Compare(Map<String, Object> parameters) throws Exception {
|
| | | Map<String, List<Object>> resultMap = new HashMap<String, List<Object>>();
|
| | |
|
| | | List<Map<String, Object>> resultList = getMonitorPointOrDeviceAvgData(parameters);
|
| | | |
| | | List<Object> timeList = (List<Object>) parameters.get("timeList");
|
| | |
|
| | | List<Object> dataList = new ArrayList<Object>();
|
| | | Set<String> sensors = new TreeSet<String>(new Comparator<String>() {
|
| | | @Override
|
| | | public int compare(String o1, String o2) {
|
| | | return Integer.compare(Integer.valueOf(o1.split("-")[0].replace("e", "")), Integer.valueOf(o2.split("-")[0].replace("e", "")));
|
| | | }
|
| | | });
|
| | | sensors.addAll((Set<String>)parameters.get("sensors"));
|
| | | Map<String, Double[]> doubleMap = new LinkedHashMap<String, Double[]>();
|
| | | for (Map<String, Object> map : resultList) {
|
| | | String time = map.get("time").toString();
|
| | | time = time.substring(time.length() - 2);
|
| | | int index = timeList.indexOf(time);
|
| | | for (String sensor : sensors) {
|
| | | String[] split = sensor.split("-");
|
| | | String sensorKey = split[0];
|
| | | if (map.containsKey(sensorKey)) {
|
| | | Double[] doubles;
|
| | | if (doubleMap.containsKey(sensor)) {
|
| | | doubles = doubleMap.get(sensor);
|
| | | } else {
|
| | | doubles = new Double[timeList.size()];
|
| | | }
|
| | | doubles[index] = (Double) map.get(sensorKey);
|
| | | doubleMap.put(sensor, doubles);
|
| | | |
| | | }
|
| | | }
|
| | | }
|
| | | dataList.add(doubleMap);
|
| | | String part = parameters.get("part").toString();
|
| | | resultMap.put("data" + part, dataList);
|
| | | resultMap.put("sensors" + part, new ArrayList<Object>(sensors));
|
| | | return resultMap;
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<Map<String, Object>> getMonitorPointOrDeviceAvgData(Map<String, Object> parameters) throws Exception {
|
| | | List<Map<String, Object>> resul ;
|
| | | List<Map<String, Object>> resultList ;
|
| | |
|
| | | String type = (String) parameters.get("type");
|
| | | String time = (String) parameters.get("time");
|
| | |
| | | parameters.put("end", end);
|
| | |
|
| | | if (parameters.containsKey("sensorKey")) {
|
| | | String sensorKey = (String) parameters.get("sensorKey");
|
| | | String sensorKeyColumn = "AVG(json -> '$." + sensorKey + "[0]') " + sensorKey;
|
| | | List<String> sensors;
|
| | | try {
|
| | | sensors = JSON.parseObject((String)parameters.get("sensors"), new TypeReference<List<String>>() {});
|
| | | parameters.put("sensors", new HashSet<String>(sensors));
|
| | | } catch (Exception e) {
|
| | | sensors = new ArrayList<String>();
|
| | | sensors.add((String)parameters.get("sensorKey"));
|
| | | }
|
| | | String sensorKeyColumn = "";
|
| | | for (int i = 0; i < sensors.size(); i++) {
|
| | | String sensorKey = sensors.get(i).split("-")[0];
|
| | | sensorKeyColumn += "AVG(json -> '$." + sensorKey + "[0]') " + sensorKey;
|
| | | if (i != sensors.size() - 1) {
|
| | | sensorKeyColumn += " ,";
|
| | | } |
| | | |
| | | }
|
| | | parameters.put("sensorKeyColumn", sensorKeyColumn);
|
| | | }
|
| | |
|
| | | sensorKeys.clear();
|
| | | //sensorKeys.clear();
|
| | | // 监控点平均值
|
| | | if (!parameters.containsKey("mac")) {
|
| | | resul = new ArrayList<Map<String,Object>>();
|
| | | Integer monitorPointId = Integer.valueOf((String) parameters.get("monitorPoint"));
|
| | | resultList = new ArrayList<Map<String,Object>>();
|
| | | Integer monitorPointId = Integer.valueOf(parameters.get("monitorPoint").toString());
|
| | | List<Map<String, Object>> deviceVersions = deviceMapper.getDeviceVersionIdByMonitorPoint(monitorPointId);
|
| | | ExecutorService threadPool = Executors.newCachedThreadPool();
|
| | | CompletionService<List<Map<String, Object>>> cs = new ExecutorCompletionService<List<Map<String, Object>>>(threadPool);
|
| | |
| | | Integer deviceVersionId = (Integer) map.get("deviceVersionId");
|
| | | if (!parameter.containsKey("sensorKeyColumn")) {
|
| | | List<Map<String, Object>> sensors = sensorMapper.getSensorsByDeviceVersionId(deviceVersionId);
|
| | | String sensorKeyColumn = getSensorKeyColumnBySensors(sensors);
|
| | | String sensorKeyColumn = getSensorKeyColumnBySensors(sensors, parameters);
|
| | | parameter.put("sensorKeyColumn", sensorKeyColumn);
|
| | | parameters.put("sensors", sensorKeys);
|
| | | }
|
| | | List<String> macs = deviceMapper.getDeviceMacByMonitorPointAndDeviceVersion(monitorPointId, deviceVersionId);
|
| | | if (ObjectUtils.isEmpty(macs) || macs.contains("null") ) {
|
| | |
| | | for (String sensorKey : value.keySet()) {
|
| | | resultMap.put(sensorKey, value.get(sensorKey)[2]);
|
| | | }
|
| | | resul.add(resultMap);
|
| | | resultList.add(resultMap);
|
| | | }
|
| | | // 设备 平均值
|
| | | } else {
|
| | |
| | | device.setMac(mac);
|
| | | device = deviceMapper.selectOne(device);
|
| | | List<Map<String, Object>> sensors = sensorMapper.getSensorsByDeviceVersionId(device.getDeviceVersionId());
|
| | | String sensorKeyColumn = getSensorKeyColumnBySensors(sensors);
|
| | | String sensorKeyColumn = getSensorKeyColumnBySensors(sensors,parameters);
|
| | | parameters.put("sensorKeyColumn", sensorKeyColumn);
|
| | | parameters.put("sensors", sensorKeys);
|
| | |
|
| | | }
|
| | | resul = historyMinutelyMapper.getMonitorPointOrDeviceAvgData(parameters);
|
| | | resultList = historyMinutelyMapper.getMonitorPointOrDeviceAvgData(parameters);
|
| | | }
|
| | | return resul;
|
| | | return resultList;
|
| | | }
|
| | |
|
| | | private String getSensorKeyColumnBySensors(List<Map<String, Object>> sensors) {
|
| | | private String getSensorKeyColumnBySensors(List<Map<String, Object>> sensors,Map<String, Object> parameters) {
|
| | | String sensorKeyColumn = "";
|
| | | |
| | | Set<String> sensorKeys = new HashSet<String>();
|
| | | if (parameters.containsKey("sensors")) {
|
| | | sensorKeys = (Set<String>) parameters.get("sensors");
|
| | | }
|
| | | for (int i = 0; i < sensors.size(); i++) {
|
| | | String sensorKey = (String) sensors.get(i).get("sensor_key");
|
| | | String name = (String) sensors.get(i).get("name");
|
| | | String unit = (String) sensors.get(i).get("unit");
|
| | | sensorKeyColumn += "AVG(json -> '$." + sensorKey + "[0]') " + sensorKey;
|
| | | if (i != sensors.size() - 1) {
|
| | | sensorKeyColumn += " ,";
|
| | | }
|
| | | sensorKeys.add(sensorKey + "-" + name);
|
| | | sensorKeys.add(sensorKey + "-" + name + "-" + unit );
|
| | | parameters.put("sensors", sensorKeys);
|
| | | }
|
| | | return sensorKeyColumn;
|
| | | }
|
| | |
| | | ValidateUtil.notNull(parameters.get("mac"), "param.is.null");
|
| | | ValidateUtil.notNull(parameters.get("macKey"), "param.is.null");
|
| | | Map<String, Object> result = new HashMap<String, Object>();
|
| | | Date date = new Date();
|
| | | Date end = truncate(date, Calendar.DATE), start;
|
| | | LocalDate end = LocalDate.now(),start;
|
| | | // 每月一日的数据取上月的数据
|
| | | if (1 == Calendar.getInstance().get(Calendar.DAY_OF_MONTH)) {
|
| | | if (1 == end.getDayOfMonth()) {
|
| | | // 上个月1日00:00:00
|
| | | start = truncate(addMonths(date, -1), Calendar.MONTH);
|
| | | start = end.plusDays(-1).with(TemporalAdjusters.firstDayOfMonth());
|
| | | } else {
|
| | | // 这个月1日00:00:00
|
| | | start = truncate(date, Calendar.MONTH);
|
| | | start = end.with(TemporalAdjusters.firstDayOfMonth());
|
| | | }
|
| | | parameters.put("start", start);
|
| | | parameters.put("end", end);
|
| | |
|
| | | String sensorKey = (String) parameters.get("macKey");
|
| | | String sensorKeyColumn = "AVG(json -> '$." + sensorKey + "[0]') " + sensorKey;
|
| | | parameters.put("sensorKeyColumn", sensorKeyColumn);
|
| | |
| | | return result;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据线性表单的条件规则,获取多条线性表单数据
|
| | | * @param lineChartCriteria
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public Map<String, List<List<PairData>>> queryLineChartDateByCrieria(LineChartCriteria lineChartCriteria){
|
| | | Map<String,List<List<PairData>>> listMap = new HashMap<>();
|
| | | for(String sensorKey:lineChartCriteria.getSensorKeys()){
|
| | | TimePeriod timePeriod = lineChartCriteria.getTimePeriod();
|
| | | List<DataCondition> dataConditionList = lineChartCriteria.getDataConditions();
|
| | | List<List<PairData>> list = new ArrayList<>();
|
| | | dataConditionList.forEach(item -> {
|
| | | List<PairData> pairDataList = queryOneLineChartDateByCrieria(sensorKey,timePeriod,item);
|
| | | list.add(pairDataList);
|
| | | });
|
| | | listMap.put(sensorKey,list);
|
| | | }
|
| | |
|
| | | return listMap;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据线性表单的条件规则,获取一条线性表单数据
|
| | | * @param sensorKey
|
| | | * @param timePeriod
|
| | | * @param dataCondition
|
| | | * @return
|
| | | */
|
| | | public List<PairData> queryOneLineChartDateByCrieria(String sensorKey, TimePeriod timePeriod, DataCondition dataCondition){
|
| | | List<String> timeList = ReportTimeFormat.makeTimeList(timePeriod);
|
| | | List<PairData> lineChartDatas = historyMinutelyMapper.selectLineChartDateByCrieria(sensorKey,timePeriod,dataCondition);
|
| | | List<PairData> lineChartDatasWithEmpty = new ArrayList<>();
|
| | | int m = 0;
|
| | | int dataLength = lineChartDatas.size()-1;
|
| | | m = dataLength>-1?0:-1;
|
| | | if(m>-1){
|
| | | for(int n =0;n<timeList.size();n++){
|
| | | String time = timeList.get(n);
|
| | | if(m>-1){
|
| | | PairData pairData = lineChartDatas.get(m);
|
| | | String keyTime = pairData.getCategory();
|
| | | if(time.equals(keyTime)){
|
| | | lineChartDatasWithEmpty.add(pairData);
|
| | | m = m<dataLength ? m+1 : -1;
|
| | | }else{
|
| | | lineChartDatasWithEmpty.add(generateEmptyData(time));
|
| | | }
|
| | | }else {
|
| | | lineChartDatasWithEmpty.add(generateEmptyData(time));
|
| | | }
|
| | |
|
| | | }
|
| | | }else{
|
| | | fillEmptyDataToList(timeList,lineChartDatasWithEmpty);
|
| | | }
|
| | | return lineChartDatasWithEmpty;
|
| | | }
|
| | | private PairData generateEmptyData(String time) {
|
| | | PairData pairData = new PairData();
|
| | | pairData.setCategory(time);
|
| | | pairData.setValue(null);
|
| | | return pairData;
|
| | | }
|
| | | private void fillEmptyDataToList(List<String> timeList,List<PairData> lineChartDatasWithEmpty){
|
| | | timeList.forEach( time ->{
|
| | | PairData pairData = generateEmptyData(time);
|
| | | lineChartDatasWithEmpty.add(pairData);
|
| | | });
|
| | | }
|
| | | }
|