PatentStarController.java 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package cn.cslg.pas.controller.outApi;
  2. import cn.cslg.pas.common.core.base.Constants;
  3. import cn.cslg.pas.common.model.outApi.PatentStarListDto;
  4. import cn.cslg.pas.common.utils.Response;
  5. import cn.cslg.pas.service.OAuth2Service;
  6. import cn.cslg.pas.service.outApi.PatentStarApiService;
  7. import cn.dev33.satoken.stp.StpUtil;
  8. import io.swagger.v3.oas.annotations.Operation;
  9. import io.swagger.v3.oas.annotations.tags.Tag;
  10. import lombok.RequiredArgsConstructor;
  11. import org.springframework.context.annotation.Lazy;
  12. import org.springframework.validation.annotation.Validated;
  13. import org.springframework.web.bind.annotation.*;
  14. import javax.servlet.http.HttpServletRequest;
  15. import javax.servlet.http.HttpServletResponse;
  16. import java.io.IOException;
  17. @Tag(name = "专利之星接口服务类")
  18. @RestController
  19. @RequestMapping(Constants.API_VERSION_V2 + "/patentStar")
  20. @RequiredArgsConstructor(onConstructor_ = {@Lazy})
  21. public class PatentStarController {
  22. private final PatentStarApiService patentStarApiService;
  23. @PostMapping("/select")
  24. @Operation(summary = "一般检索接口")
  25. public String getAreaList(@RequestBody @Validated PatentStarListDto patentStarListDto) throws IOException {
  26. return Response.success(patentStarApiService.patentStarSearchApi(patentStarListDto));
  27. }
  28. @GetMapping("/getCnBib")
  29. @Operation(summary = "获得中国专利著录")
  30. public String getCnBib(String appNo) {
  31. return patentStarApiService.getCnBibApi(appNo);
  32. }
  33. @GetMapping("/getPicture")
  34. @Operation(summary = "获得中国专利摘要附图")
  35. public String getPicture(String appNo) throws IOException {
  36. return patentStarApiService.getPictureApi(appNo);
  37. }
  38. @GetMapping("/getWGPicture")
  39. @Operation(summary = "获得中国专利外观图")
  40. public String getWGPicture(String appNo) throws IOException {
  41. return patentStarApiService.getWGPictureApi(appNo);
  42. }
  43. @GetMapping("/getCnLegal")
  44. @Operation(summary = "获得中国专利法律状态")
  45. public String getCnLegal(String appNo) throws IOException {
  46. return patentStarApiService.getCnLegalApi(appNo);
  47. }
  48. @GetMapping("/getCnPdf")
  49. @Operation(summary = "获得中国专利pdf全文")
  50. public String getCnPdf(String appNo) throws IOException {
  51. return patentStarApiService.getCnPdfApi(appNo);
  52. }
  53. @GetMapping("/getCnFullXml")
  54. @Operation(summary = "获得中国专利全文文本")
  55. public String getCnFullXml(String appNo) throws IOException {
  56. return patentStarApiService.getCnFullXmlApi(appNo);
  57. }
  58. @GetMapping("/getEnPdf")
  59. @Operation(summary = "获得世界专利pdf")
  60. public String getEnPdf(String patentNo) throws IOException {
  61. return patentStarApiService.getEnPdfApi(patentNo);
  62. }
  63. @GetMapping("/getENBib")
  64. @Operation(summary = "获得世界专利著录信息")
  65. public String getENBib(String patentNo) throws IOException {
  66. return Response.success(patentStarApiService.getENBibApi(patentNo));
  67. }
  68. @GetMapping("/getFamilyByPubNo")
  69. @Operation(summary = "获得同族专利")
  70. public String getFamilyByPubNo(String patentNo) throws IOException {
  71. return patentStarApiService.getFamilyByPubNoApi(patentNo);
  72. }
  73. @GetMapping("/getCitedNumByPubNo")
  74. @Operation(summary = "获得被引用次数")
  75. public String getCitedNumByPubNo(String patentNo) throws IOException {
  76. return patentStarApiService.getCitedNumByPubNoApi(patentNo);
  77. }
  78. }