|
@@ -1,5 +1,6 @@
|
|
|
package com.bizmatics.service.impl;
|
|
|
|
|
|
+import com.bizmatics.model.AlarmPower;
|
|
|
import com.bizmatics.model.RtSwitchData;
|
|
|
import com.bizmatics.persistence.mapper.AlarmPowerMapper;
|
|
|
import com.bizmatics.persistence.mapper.RtSwitchDataMapper;
|
|
@@ -45,10 +46,23 @@ public class RtSwitchDataServiceImpl extends AbstractCrudService<RtSwitchDataMap
|
|
|
Object value = radMap.get("LoadLive");
|
|
|
int day_count = baseMapper.getOffCountDMap(siteId);
|
|
|
int month_count = baseMapper.getOffCountMMap(siteId);
|
|
|
+ List<AlarmPower> duration_list = baseMapper.getLoopStatusListMap(siteId);
|
|
|
+ long minute=0;
|
|
|
+ if (duration_list.size()>2){
|
|
|
+ for (int i = 0; i < duration_list.size(); i++) {
|
|
|
+ if (duration_list.get(i).getDigitalValue()==0){
|
|
|
+ long diff = duration_list.get(i).getSoeTime().getTime()-duration_list.get(i-1).getSoeTime().getTime();
|
|
|
+ minute += diff / (1000 * 60);
|
|
|
+// minute = diff % (1000 * 24 * 60 * 60) % (1000 * 60 * 60) / (1000 * 60);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("LoadLive",value);
|
|
|
map.put("day_count",day_count);
|
|
|
map.put("month_count",month_count);
|
|
|
+ map.put("minute",minute);
|
|
|
list.add(map);
|
|
|
|
|
|
|