| | |
| | | */ |
| | | package org.sxkj.gd.workorder.service.impl; |
| | | |
| | | import org.sxkj.gd.utils.GdGeoAddressUtil; |
| | | import org.sxkj.gd.utils.GeomUtils; |
| | | import org.sxkj.gd.workorder.entity.GdManageDeviceEntity; |
| | | import org.sxkj.gd.workorder.param.GdManageDevicePageParam; |
| | | import org.sxkj.gd.workorder.vo.GdManageDeviceVO; |
| | | import org.sxkj.gd.workorder.excel.GdManageDeviceExcel; |
| | | import org.sxkj.gd.workorder.mapper.GdManageDeviceMapper; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.system.cache.DictCache; |
| | | import org.sxkj.system.enums.DictEnum; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public class GdManageDeviceServiceImpl extends BaseServiceImpl<GdManageDeviceMapper, GdManageDeviceEntity> implements IGdManageDeviceService { |
| | | |
| | | @Override |
| | | public IPage<GdManageDeviceVO> selectGdManageDevicePage(IPage<GdManageDeviceVO> page, GdManageDeviceVO gdManageDevice) { |
| | | return page.setRecords(baseMapper.selectGdManageDevicePage(page, gdManageDevice)); |
| | | public IPage<GdManageDeviceVO> selectGdManageDevicePage(IPage<GdManageDeviceVO> page, GdManageDevicePageParam gdManageDevice) { |
| | | List<GdManageDeviceVO> gdManageDeviceVOS = baseMapper.selectGdManageDevicePage(page, gdManageDevice); |
| | | return page.setRecords(gdManageDeviceVOS); |
| | | } |
| | | |
| | | @Override |
| | | public List<GdManageDeviceVO> selectGdManageDevice(GdManageDeviceVO gdManageDevice) { |
| | | public List<GdManageDeviceVO> selectGdManageDevice(GdManageDevicePageParam gdManageDevice) { |
| | | return baseMapper.selectGdManageDevice(gdManageDevice); |
| | | } |
| | | |
| | |
| | | if (gdManageDeviceEntity.getLongitude() != null && gdManageDeviceEntity.getLatitude() != null) { |
| | | String bufferAroundPointAsString = GeomUtils.getBufferAroundPointAsString(gdManageDeviceEntity.getLongitude(), gdManageDeviceEntity.getLatitude(), 5 * 1000); |
| | | gdManageDeviceEntity.setGeom(bufferAroundPointAsString); |
| | | String location = GdGeoAddressUtil.getFormattedAddress(gdManageDeviceEntity.getLongitude(), gdManageDeviceEntity.getLatitude()); |
| | | gdManageDeviceEntity.setLocation(location); |
| | | } |
| | | return saveOrUpdate(gdManageDeviceEntity); |
| | | } |