| | |
| | | |
| | | import static com.dji.sample.patches.utils.MultipartFileTOFileUtil.convert; |
| | | import static com.dji.sample.patches.utils.ZipUtil.zipFolder; |
| | | import static com.dji.sample.territory.utils.CoordinateSystemUtil.*; |
| | | |
| | | |
| | | /** |
| | | * @PROJECT_NAME: drone |
| | |
| | | String destKMZFile = patchesConfigPojo.getDestKMZFile() + waylineName + ".kmz"; // 输出的KMZ文件路径 |
| | | zipFolder(patchesConfigPojo.getSourceDir(), destKMZFile); |
| | | // 将压缩文件转换为MultipartFile对象 |
| | | MultipartFile multipartFile = convert(new File(destKMZFile)); |
| | | return multipartFile; |
| | | return convert(new File(destKMZFile)); |
| | | } |
| | | |
| | | /** |
| | |
| | | private List<LotInfo> dbConvertToEntity(List<TbDkjbxxEntity> list) { |
| | | List<LotInfo> infos = new ArrayList<>(); |
| | | for (TbDkjbxxEntity file : list) { |
| | | double[] coordinates = extractCoordinates(pointCGCStoWGS(file.getXzb(), file.getYzb())); |
| | | // 使用Builder模式构建LotInfo对象 |
| | | LotInfo.LotInfoBuilder builder = LotInfo.builder(); |
| | | if (file != null) { |
| | |
| | | .dkmc(file.getDkmc()) |
| | | .dkbh(file.getDkbh()) |
| | | .xmc(file.getXmc()) |
| | | .xzb(file.getXzb()) |
| | | .xzb(coordinates[0]) |
| | | .sfbhzdk(file.getSfbhzdk()) |
| | | .sjlx(file.getSjlx()) |
| | | .dkfw(file.getDkfw()) |
| | | .dkfw(poylonCGCStoWGS(file.getDkfw())) |
| | | .xzqdm(file.getXzqdm()) |
| | | .yzb(file.getYzb()) |
| | | .yzb(coordinates[1]) |
| | | .kzxx(file.getKzxx()) |
| | | .dklx(file.getDklx()) |
| | | .build(); |