int startMinute = endMinute - minute;
double[] datas = null;
if (startMinute < 0 && endMinute < 0) {
String period = m_sdf.format(queryDayPeriod(-1).getTime());
QueryEntity queryEntity = new QueryEntity(period + ";" + conditions + ";;");
datas = ArrayUtils.toPrimitive(m_appDataService.queryValue(queryEntity, type), 0);
} else if (startMinute < 0 && endMinute >= 0) {
String last = m_sdf.format(queryDayPeriod(-1).getTime());
String current = m_sdf.format(queryDayPeriod(0).getTime());
QueryEntity lastQueryEntity = new QueryEntity(last + ";" + conditions + ";;");
QueryEntity currentQueryEntity = new QueryEntity(current + ";" + conditions + ";;");
double[] lastDatas = ArrayUtils.toPrimitive(m_appDataService.queryValue(lastQueryEntity, type), 0);
double[] currentDatas = ArrayUtils.toPrimitive(m_appDataService.queryValue(currentQueryEntity, type), 0);
datas = mergerArray(lastDatas, currentDatas);
} else if (startMinute >= 0) {
String period = m_sdf.format(queryDayPeriod(0).getTime());
QueryEntity queryEntity = new QueryEntity(period + ";" + conditions + ";;");
datas = ArrayUtils.toPrimitive(m_appDataService.queryValue(queryEntity, type), 0);
}
return datas;
}