| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dji.sample.patches.config.pojo.PatchesConfigPojo; |
| | | import com.dji.sample.patches.dao.ShpToDataSourceMapper; |
| | | import com.dji.sample.patches.model.dto.ShpDTO; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | | import com.dji.sample.patches.service.ShpToDataSourceService; |
| | | import com.dji.sample.patches.utils.*; |
| | |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | public MultipartFile insertGeo(MultipartFile file, String workspaceId, String waylineName, double airportLat, double airportLon) throws Exception { |
| | | List<LotInfo> list = new ArrayList<>(); |
| | | File file1 = MultipartFileTOFileUtil.multipartFile2File(file, patchesConfigPojo.getUnzip()); |
| | | List<String> s = ShapeFileUtil.shpToGeoJson(file1); |
| | | String[] arr1 = FormatConversionUtil.formatConversion(s); |
| | | for (int i = 0; i < arr1.length; i++) { |
| | | List<ShpDTO> shpData = ShapeFileUtil.shpToGeoJson(file1); |
| | | String s=null; |
| | | for (int i = 0; i < shpData.size(); i++) { |
| | | String[] arr1 = FormatConversionUtil.formatConversion(Collections.singletonList(s)); |
| | | LotInfo lotInfo = new LotInfo(); |
| | | String temp = arr1[i].trim(); |
| | | temp = FormatConversionUtil.modifySpacesAndCommas(temp); |
| | |
| | | return builder.build(); |
| | | } |
| | | |
| | | // private LotInfo shpDtoToLotInfo(ShpDTO shpDTO){ |
| | | // LotInfo.LotInfoBuilder builder=LotInfo.builder(); |
| | | // builder. |
| | | // |
| | | // } |
| | | |
| | | public List<LotInfo> getNoPlan(){ |
| | | return shpToDataSourceMapper.selectList(new LambdaQueryWrapper<LotInfo>().eq(LotInfo::getIsPlan,0)); |
| | | } |