| | |
| | | import com.terra.system.service.sys.AttachService; |
| | | import com.terra.system.service.sys.DownlogService; |
| | | import com.terra.system.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import javax.annotation.Resource; |
| | | |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * 综合展示 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "综合展示\\首页") |
| | | @Tag(name = "综合展示\\首页") |
| | | @RestController |
| | | @RequestMapping("/comprehensive") |
| | | public class ComprehensiveController extends ModelController { |
| | |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据ID查询发布清单") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | @Operation(summary = "根据ID查询发布清单") |
| | | @Parameters({ |
| | | @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectPubById") |
| | | public ResponseMsg<PublishEntity> selectPubById(int id) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询管线") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "西气东输"), |
| | | @Operation(summary = "查询管线") |
| | | @Parameters({ |
| | | @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = "西气东输"), |
| | | }) |
| | | @GetMapping(value = "/selectPipelines") |
| | | public ResponseMsg<Object> selectPipelines(String name) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询路网") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "x1", value = "X1", dataType = "Double", paramType = "query", example = "116.78999"), |
| | | @ApiImplicitParam(name = "y1", value = "Y1", dataType = "Double", paramType = "query", example = "39.9468"), |
| | | @ApiImplicitParam(name = "x2", value = "X2", dataType = "Double", paramType = "query", example = "116.80458"), |
| | | @ApiImplicitParam(name = "y2", value = "Y2", dataType = "Double", paramType = "query", example = "39.94758") |
| | | @Operation(summary = "查询路网") |
| | | @Parameters({ |
| | | @Parameter(name = "x1", description = "X1", in = ParameterIn.QUERY, example = "116.78999"), |
| | | @Parameter(name = "y1", description = "Y1", in = ParameterIn.QUERY, example = "39.9468"), |
| | | @Parameter(name = "x2", description = "X2", in = ParameterIn.QUERY, example = "116.80458"), |
| | | @Parameter(name = "y2", description = "Y2", in = ParameterIn.QUERY, example = "39.94758") |
| | | }) |
| | | @GetMapping(value = "/selectRoute") |
| | | public ResponseMsg<Object> selectRoute(double x1, double y1, double x2, double y2) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传ShapeFile文件") |
| | | @Operation(summary = "上传ShapeFile文件") |
| | | @ResponseBody |
| | | @PostMapping(value = "/uploadShp", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Object> uploadShp(HttpServletRequest req, HttpServletResponse res) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "下载ShapeFile文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "标绘JSON实体类集合", dataType = "MarkJsonEntity", paramType = "body") |
| | | @Operation(summary = "下载ShapeFile文件") |
| | | @Parameters({ |
| | | @Parameter(name = "list", description = "标绘JSON实体类集合") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/downloadShp", produces = "application/json; charset=UTF-8") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传文件") |
| | | @Operation(summary = "上传文件") |
| | | @ResponseBody |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tabName", value = "表名", dataType = "String", paramType = "query", example = "lf.sys_style"), |
| | | @ApiImplicitParam(name = "eventid", value = "主键", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") |
| | | @Parameters({ |
| | | @Parameter(name = "tabName", description = "表名", in = ParameterIn.QUERY, example = "lf.sys_style"), |
| | | @Parameter(name = "eventid", description = "主键", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") |
| | | }) |
| | | @PostMapping(value = "/uploadFiles") |
| | | public ResponseMsg<Integer> uploadFiles(String tabName, String eventid, @RequestParam("file") MultipartFile[] files, HttpServletRequest req) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "下载文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guid", value = "文件GUID", dataType = "String", paramType = "query") |
| | | @Operation(summary = "下载文件") |
| | | @Parameters({ |
| | | @Parameter(name = "guid", description = "文件GUID", in = ParameterIn.QUERY) |
| | | }) |
| | | @RequestMapping(value = "/downloadFile", method = RequestMethod.GET) |
| | | public void downloadFile(String guid, HttpServletRequest req, HttpServletResponse res) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查看文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guid", value = "附件Guid", dataType = "String", paramType = "body") |
| | | @Operation(summary = "查看文件") |
| | | @Parameters({ |
| | | @Parameter(name = "guid", description = "附件Guid") |
| | | }) |
| | | @GetMapping(value = "/downloadForView") |
| | | public void downloadForView(String guid, HttpServletResponse res) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求下载") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "guids", value = "附件Guid数组", dataType = "String", paramType = "body", allowMultiple = true, example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c") |
| | | @Operation(summary = "请求下载") |
| | | @Parameters({ |
| | | @Parameter(name = "guids", description = "附件Guid数组", schema = @Schema(type = "array"), example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/downloadReqForGuids") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求下载") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "body", example = "bd.b_borehole"), |
| | | @ApiImplicitParam(name = "guids", value = "附件Guid数组", dataType = "String", paramType = "body", allowMultiple = true, example = "08e5b4ad-93b8-46f6-adaa-46a6274af4ce,6f94f4f8-6e8d-44e7-8803-3d068d34983f") |
| | | @Operation(summary = "请求下载") |
| | | @Parameters({ |
| | | @Parameter(name = "tab", description = "表名", example = "bd.b_borehole"), |
| | | @Parameter(name = "guids", description = "附件Guid数组", schema = @Schema(type = "array"), example = "08e5b4ad-93b8-46f6-adaa-46a6274af4ce,6f94f4f8-6e8d-44e7-8803-3d068d34983f") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/downloadReqForTabGuids") |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "tabName", value = "表名", dataType = "String", paramType = "query", example = "lf.sys_style"), |
| | | @ApiImplicitParam(name = "eventid", value = "主键", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4") |
| | | @Operation(summary = "查询文件") |
| | | @Parameters({ |
| | | @Parameter(name = "tabName", description = "表名", in = ParameterIn.QUERY, example = "lf.sys_style"), |
| | | @Parameter(name = "eventid", description = "主键", in = ParameterIn.QUERY, example = "fa25979a5ef8b43ba82a0be35b3fb0d4") |
| | | }) |
| | | @GetMapping(value = "/selectFiles") |
| | | public ResponseMsg<List<AttachEntity>> selectFiles(String tabName, String eventid) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除文件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2") |
| | | @Operation(summary = "删除文件") |
| | | @Parameters({ |
| | | @Parameter(name = "ids", description = "ID数组", in = ParameterIn.QUERY, example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deleteFiles(@RequestParam List<Integer> ids) { |