|
|
|
@ -19,6 +19,7 @@ import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 传感器状态统计
|
|
|
|
@ -52,7 +53,10 @@ public class SensorStateConroller extends BaseController {
|
|
|
|
|
Date collectTime = dateFormat.parse(param);
|
|
|
|
|
Date nowTime = new Date();
|
|
|
|
|
long diff = nowTime.getTime() - collectTime.getTime();
|
|
|
|
|
long diffMinutes = diff / (60 * 1000) % 60;
|
|
|
|
|
|
|
|
|
|
long diffMinutes = TimeUnit.MILLISECONDS.toMinutes(diff);
|
|
|
|
|
|
|
|
|
|
//long diffMinutes = diff / (60 * 1000) % 60;
|
|
|
|
|
|
|
|
|
|
long sensorState = 0L;
|
|
|
|
|
|
|
|
|
|