change - 传感器监控修改

main
wenjy 3 years ago
parent 4b79f0c3f0
commit cf66bbb742

@ -19,6 +19,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit;
/** /**
* *
@ -52,7 +53,10 @@ public class SensorStateConroller extends BaseController {
Date collectTime = dateFormat.parse(param); Date collectTime = dateFormat.parse(param);
Date nowTime = new Date(); Date nowTime = new Date();
long diff = nowTime.getTime() - collectTime.getTime(); 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; long sensorState = 0L;

Loading…
Cancel
Save