| | |
| | | */ |
| | | package org.sxkj.gd.workorder.service.impl; |
| | | |
| | | import org.sxkj.gd.utils.GeomUtils; |
| | | import org.sxkj.gd.workorder.entity.GdManageDeviceEntity; |
| | | import org.sxkj.gd.workorder.vo.GdManageDeviceVO; |
| | | import org.sxkj.gd.workorder.excel.GdManageDeviceExcel; |
| | |
| | | return gdManageDeviceList; |
| | | } |
| | | |
| | | /** |
| | | * 保存或更新设备信息 |
| | | * |
| | | * @param gdManageDeviceEntity |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public boolean saveOrUpdateDevice(GdManageDeviceEntity gdManageDeviceEntity) throws Exception { |
| | | // 获取设备位置 生成缓冲区 |
| | | if (gdManageDeviceEntity.getLongitude() != null && gdManageDeviceEntity.getLatitude() != null) { |
| | | String bufferAroundPointAsString = GeomUtils.getBufferAroundPointAsString(gdManageDeviceEntity.getLongitude(), gdManageDeviceEntity.getLatitude(), 5 * 1000); |
| | | gdManageDeviceEntity.setGeom(bufferAroundPointAsString); |
| | | } |
| | | return saveOrUpdate(gdManageDeviceEntity); |
| | | } |
| | | } |