Commit da39bfbf by 杨林龙

Merge remote-tracking branch 'origin/master'

2 parents b85aa2bc e9f0d18d
...@@ -282,7 +282,7 @@ public class HdaoGpsComponent { ...@@ -282,7 +282,7 @@ public class HdaoGpsComponent {
*/ */
public DataGpsLocation mapGeoBsConvert(DataBsLocation dataBsLocation) { public DataGpsLocation mapGeoBsConvert(DataBsLocation dataBsLocation) {
DataGpsLocation dataGpsLocation = null; DataGpsLocation dataGpsLocation = null;
BsData bsData = new BsData(LocationUtil.hexToInt(dataBsLocation.getMnc()), LocationUtil.hexToInt(dataBsLocation.getLac()), LocationUtil.hexToInt(dataBsLocation.getLcid())); BsData bsData = new BsData(Integer.parseInt(dataBsLocation.getMnc()), Integer.parseInt(dataBsLocation.getLac()), Integer.parseInt(dataBsLocation.getLcid()));
BsDataReq req = new BsDataReq(bsData); BsDataReq req = new BsDataReq(bsData);
BsDataRespHolder resp = new BsDataRespHolder(); BsDataRespHolder resp = new BsDataRespHolder();
try { try {
......
...@@ -78,12 +78,14 @@ public class DeviceUtils { ...@@ -78,12 +78,14 @@ public class DeviceUtils {
*/ */
public static void parseSourceStatus(DeviceStatusModel deviceStatus, Integer speed, long trackTime, long offlineTime) { public static void parseSourceStatus(DeviceStatusModel deviceStatus, Integer speed, long trackTime, long offlineTime) {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
if (now - trackTime > offlineTime) { long drivingTime = 6 * 60 * 1000;
if (now - trackTime > drivingTime) {
//大于6分钟 有源在线 //大于6分钟 有源在线
deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_ONLINE); deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_ONLINE);
deviceStatus.setStatusTime(DateUtils.formatTimeInSec((now - trackTime) / 1000)); deviceStatus.setStatusTime(DateUtils.formatTimeInSec((now - trackTime) / 1000));
return; return;
} }
//否则 在6分钟内并且有速度 则为行驶中
if (speed != null && speed > 0) { if (speed != null && speed > 0) {
//行驶状态 //行驶状态
deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_DRIVING); deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_DRIVING);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!