PatentStarController.java 3.5 KB

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