| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 数据入库 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "数据管理\\数据上传") |
| | | @RestController |
| | | @SuppressWarnings("ALL") |
| | | @RequestMapping("/dataUpload") |
| | | public class UploadController extends QueryController { |
| | | @Autowired |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 接收数组1:@RequestParam(value = "ids")List<Integer> ids |
| | | * &ids=1209&ids=1180&ids=1387 |
| | | * 接收数据2:Integer[] ids |
| | | * formData.append("ids", 1209); formData.append("ids", 1180); formData.append("ids", 1387); |
| | | */ |
| | | @SysLog() |
| | | @ApiOperation(value = "上传Excel附件") |
| | | @ApiImplicitParams({ |
| | |
| | | @GetMapping(value = "/selectFiles") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) { |
| | | try { |
| | | List<MetaFileEntity> list = uploadService.selectFiles(path); |
| | | List<MetaFileEntity> list = uploadService.selectFiles(path, false); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询映射") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20230110010101"), |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "163"), |
| | | @ApiImplicitParam(name = "verid", value = "版本ID", dataType = "Integer", paramType = "query", example = "0"), |
| | | @ApiImplicitParam(name = "epsgCode", value = "坐标编码", dataType = "String", paramType = "query", example = "EPSG:4490") |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20230722"), |
| | | @ApiImplicitParam(name = "dirid", value = "目录ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "verid", value = "版本ID", dataType = "Integer", paramType = "query", example = "0") |
| | | }) |
| | | @GetMapping(value = "/selectMappers") |
| | | public ResponseMsg<Object> selectMappers(String path, Integer dirid, Integer verid, String epsgCode, HttpServletRequest req) { |
| | | public ResponseMsg<Object> selectMappers(String path, Integer dirid, Integer verid, HttpServletRequest req) { |
| | | try { |
| | | if (StringHelper.isEmpty(path) || StringHelper.isEmpty(epsgCode) || null == dirid || null == verid) { |
| | | return fail("路径、目录ID、版本ID和坐标编码不能为空"); |
| | | } |
| | | if (1 > uploadService.selectCount4Coord(epsgCode)) { |
| | | return fail("坐标编码" + epsgCode + "不存在"); |
| | | if (StringHelper.isEmpty(path) || null == dirid || null == verid) { |
| | | return fail("路径、目录ID、版本ID不能为空"); |
| | | } |
| | | DirEntity dir = dirService.selectDir(dirid); |
| | | if (null == dir) { |
| | |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | List<MetaFileEntity> list = uploadService.selectMappers(ue, path, dir, ver, epsgCode); |
| | | List<MetaFileEntity> list = uploadService.selectMappers(ue, path, dir, ver); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |