| | |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.grid.excel.GridExcel; |
| | | import org.springblade.modules.grid.excel.GridImporter; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserImporter; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.vo.GridVO; |
| | | import org.springblade.modules.grid.wrapper.GridWrapper; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 网格表 控制器 |
| | |
| | | return R.status(gridService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入网格数据 |
| | | */ |
| | | @PostMapping("/import-grid") |
| | | public R importGrid(MultipartFile file, Integer isCovered) { |
| | | GridImporter gridImporter = new GridImporter(gridService, isCovered == 1); |
| | | ExcelUtil.save(file, gridImporter, GridExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 空间分析 |
| | | */ |
| | | @GetMapping("/spatialAnalysis") |
| | | public R spatialAnalysis() { |
| | | return R.data(gridService.spatialAnalysis()); |
| | | } |
| | | |
| | | |
| | | } |