| File was renamed from src/main/java/com/dji/sample/patches/service/impl/DemoServiceImpl.java |
| | |
| | | package com.dji.sample.patches.service.impl; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.dji.sample.patches.dao.DemoMapper; |
| | | import com.dji.sample.patches.service.DemoService; |
| | | import com.dji.sample.patches.utils.MultipartFileTOFile; |
| | | import com.dji.sample.patches.dao.ShpToDataSourceMapper; |
| | | import com.dji.sample.patches.service.ShpToDataSourceService; |
| | | import com.dji.sample.patches.utils.MultipartFileTOFileUtil; |
| | | import com.dji.sample.patches.utils.ShapeFileUtil; |
| | | import com.dji.sample.patches.utils.ZipUtil; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | @Service |
| | | public class DemoServiceImpl implements DemoService { |
| | | public class ShpToDataSourceServiceImpl implements ShpToDataSourceService { |
| | | @Autowired |
| | | private DemoMapper mapper; |
| | | private ShpToDataSourceMapper mapper; |
| | | |
| | | private int createTime=0; |
| | | private int updateTime=0; |
| | |
| | | private String bsm; |
| | | public void insertGeo(MultipartFile file) throws IOException { |
| | | ShapeFileUtil shapeFileUtil=new ShapeFileUtil(); |
| | | MultipartFileTOFile multipartFileTOFile= new MultipartFileTOFile(); |
| | | File file1= multipartFileTOFile.multipartFile2File(file); |
| | | MultipartFileTOFileUtil multipartFileTOFileUtil = new MultipartFileTOFileUtil(); |
| | | File file1= multipartFileTOFileUtil.multipartFile2File(file); |
| | | List<String> s=shapeFileUtil.shpToGeoJson(file1); |
| | | String[] arr=new String[10]; |
| | | String str=s.toString(); |