| | |
| | | package com.dji.sample.patches.controller; |
| | | |
| | | import com.dji.sample.common.model.ResponseResult; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | | import com.dji.sample.patches.service.impl.ShpToDataSourceServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("${url.patches.prefix}${url.patches.version}") |
| | |
| | | @Autowired |
| | | private ShpToDataSourceServiceImpl shpToDataSourceServiceImpl; |
| | | @PostMapping("/getGeo") |
| | | public void getGeo (@RequestParam("file") MultipartFile file) throws IOException { |
| | | shpToDataSourceServiceImpl.insertGeo(file); |
| | | public ResponseResult<List<LotInfo>> getGeo (@RequestParam("file") MultipartFile file,@RequestParam String itemId) throws IOException { |
| | | List<LotInfo> list=shpToDataSourceServiceImpl.insertGeo(file,itemId); |
| | | return ResponseResult.success(list); |
| | | } |
| | | |
| | | |