fengxiang
2018-03-26 53d155ae4b7c4d5d7258c3d15cfff78ec41561f7
src/main/java/com/moral/service/impl/HistoryMinutelyServiceImpl.java
@@ -472,7 +472,7 @@
   }
   /**
    * 根据线性表单的条件规则,获取一条线性表单数据
    * 根据线性表单的条件规则,获取一条线性表单数据,包含 所有检测项目
    * @param sensorKeys
    * @param timePeriod
    * @param dataCondition
@@ -503,8 +503,12 @@
                   // list to map
                   int finalN = n;
                   sensorKeys.forEach(sensorKey -> {
                      Double sensorValue = rowData.get(sensorKey)!= null?new Double(rowData.get(sensorKey).toString()):null;
                      lineChartDatasWithEmpty.get(sensorKey).set(finalN,sensorValue);
                       Object value = rowData.get(sensorKey);
                      List<Double> lineChartDatasWithEmptyTemp = lineChartDatasWithEmpty.get(sensorKey);
                      if(finalN < lineChartDatasWithEmptyTemp.size()){
                         Double sensorValue = value!= null?new Double(value.toString()):null;
                         lineChartDatasWithEmptyTemp.set(finalN,sensorValue);
                      }
                   });
                   // 置为 -1,防止越界
                   m = m<dataLength ? m+1 : -1;