吉安感知网项目-后端
linwei
2026-01-22 1510366fa12fafd5197ebcd8d7fbc45d2383218d
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdManageDeviceServiceImpl.java
@@ -16,6 +16,7 @@
 */
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;
@@ -56,4 +57,20 @@
      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);
   }
}