forked from dyf/fys-Multi-tenant
代码优化2
This commit is contained in:
@ -18,6 +18,7 @@ import com.fuyuanshen.app.domain.vo.AppPersonnelInfoVo;
|
||||
import com.fuyuanshen.app.mapper.AppDeviceBindRecordMapper;
|
||||
import com.fuyuanshen.app.mapper.AppPersonnelInfoMapper;
|
||||
import com.fuyuanshen.app.mapper.equipment.APPDeviceMapper;
|
||||
import com.fuyuanshen.common.core.constant.GlobalConstants;
|
||||
import com.fuyuanshen.common.core.exception.ServiceException;
|
||||
import com.fuyuanshen.common.core.utils.ImageToCArrayConverter;
|
||||
import com.fuyuanshen.common.core.utils.MapstructUtils;
|
||||
@ -320,6 +321,16 @@ public class AppDeviceBizService {
|
||||
}else{
|
||||
vo.setBatteryPercentage("0");
|
||||
}
|
||||
|
||||
// 获取经度纬度
|
||||
String locationInfo = GlobalConstants.GLOBAL_REDIS_KEY+DeviceRedisKeyConstants.DEVICE_LOCATION_KEY_PREFIX + device.getDeviceImei();
|
||||
if(StringUtils.isNotBlank(locationInfo)){
|
||||
JSONObject jsonObject = JSONObject.parseObject(locationInfo);
|
||||
vo.setLongitude((String)jsonObject.get("longitude"));
|
||||
vo.setLatitude((String)jsonObject.get("latitude"));
|
||||
vo.setAddress((String)jsonObject.get("address"));
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user