| | |
| | | public String queryValueByMacAndTime(String mac, Date time) {
|
| | | return historyMapper.selectValueByMacAndTime(mac, time);
|
| | | }
|
| | |
|
| | | public String getValueByMacAndTime(String mac, String time,String time1) {
|
| | | return historyMapper.getValueByMacAndTime(mac, time,time1);
|
| | | }
|
| | | @Override
|
| | | public List<Map<String, Object>> getRegionRankingData(Map<String, Object> parameters) {
|
| | | ValidateUtil.notNull(parameters.get("regionCode"), "param.is.null");
|
| | |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) {
|
| | | for (Sensor sensor : sensors) {
|
| | | if (sensor.getSensorKey().equals(entry.getKey())) {
|
| | | mapAvg.put(entry.getKey(), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString() + sensor.getUnit());
|
| | | if (entry.getValue() != null) {
|
| | | mapAvg.put(entry.getKey(), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString() + sensor.getUnit());
|
| | | }
|
| | | } else if (("min" + sensor.getSensorKey()).equals(entry.getKey())) {
|
| | | mapMin.put(entry.getKey().substring(3), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString());
|
| | | } else if (("max" + sensor.getSensorKey()).equals(entry.getKey())) {
|