Commit 35fde0e7 by 杨林龙

优化激活位置点批量查询方法

1 parent 90e9cb38
...@@ -101,9 +101,9 @@ public class HdaoGpsComponent { ...@@ -101,9 +101,9 @@ public class HdaoGpsComponent {
* @return * @return
*/ */
public DataGpsLocation getDevicesFirstGpsInfo(String sn, String activeDate) { public DataGpsLocation getDevicesFirstGpsInfo(String sn, String activeDate) {
DataGpsLocation gpsLocation = new DataGpsLocation(); DataGpsLocation gpsLocation = null;
if (StringUtils.isEmpty(sn) || StringUtils.isEmpty(activeDate)) { if (StringUtils.isEmpty(sn) || StringUtils.isEmpty(activeDate)) {
return gpsLocation; return null;
} }
try { try {
Date date = DateUtils.parseDate(activeDate, parsePattern); Date date = DateUtils.parseDate(activeDate, parsePattern);
...@@ -116,6 +116,7 @@ public class HdaoGpsComponent { ...@@ -116,6 +116,7 @@ public class HdaoGpsComponent {
log.info("getDevicesFirstGpsInfo invoker ice getGpsRecords result:" + res.value.oprResult + " reqSn:" + sn); log.info("getDevicesFirstGpsInfo invoker ice getGpsRecords result:" + res.value.oprResult + " reqSn:" + sn);
if (res.value.records != null && res.value.records.length > 0) { if (res.value.records != null && res.value.records.length > 0) {
GpsRecord gps = res.value.records[0]; GpsRecord gps = res.value.records[0];
gpsLocation = new DataGpsLocation();
gpsLocation.setSn(sn); gpsLocation.setSn(sn);
gpsLocation.setDateTime(timeStampSec2DateStr(String.valueOf(gps.gpsTime))); gpsLocation.setDateTime(timeStampSec2DateStr(String.valueOf(gps.gpsTime)));
gpsLocation.setLat(String.valueOf(this.latlng(gps.lat))); gpsLocation.setLat(String.valueOf(this.latlng(gps.lat)));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!