|
@@ -66,9 +66,6 @@ public class PatentController {
|
|
private MergePersonService mergePersonService;
|
|
private MergePersonService mergePersonService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private EsService esService;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
private PatentStarApiService patentStarApiService;
|
|
private PatentStarApiService patentStarApiService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -135,33 +132,6 @@ public class PatentController {
|
|
return Response.success(starPatentVO);
|
|
return Response.success(starPatentVO);
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping("/export")
|
|
|
|
- @Operation(summary = "导出专利")
|
|
|
|
- public ResponseEntity<InputStreamResource> export(@RequestBody PatentExportParams params) throws IOException {
|
|
|
|
- Integer taskId = 1;
|
|
|
|
- TaskParams taskParams = new TaskParams();
|
|
|
|
- taskParams.setTaskId(taskId);
|
|
|
|
- taskParams.setTaskType(2);
|
|
|
|
- taskParams.setProjectId(params.getProjectId());
|
|
|
|
- taskParams.setSelected(JsonUtils.objectToJson(params.getSelected()));
|
|
|
|
- taskParams.setCreateId("328");
|
|
|
|
- byte[] fileData = patentExportService.exportPatent(taskParams);
|
|
|
|
- //保存生成excel的地址
|
|
|
|
- String fileName = "导出专利报表.xlsx";
|
|
|
|
-// String fileName = IdUtil.simpleUUID() + ".xls";
|
|
|
|
-// String directoryName = fileUtils.createDirectory();
|
|
|
|
-// String savePath = fileUtils.getSavePath(directoryName);
|
|
|
|
- //文件原始名中的中文字符可能会乱码,对文件名进行URL编码
|
|
|
|
- String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString());
|
|
|
|
- return ResponseEntity.ok().contentLength(fileData.length)
|
|
|
|
- .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + encodedFileName + "\"")
|
|
|
|
- .contentType(MediaType.parseMediaType("application/octet-stream"))
|
|
|
|
- .body(new InputStreamResource(new ByteArrayInputStream(fileData)));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Operation(summary = "根据专利号查询内部权利要求")
|
|
@Operation(summary = "根据专利号查询内部权利要求")
|
|
@GetMapping("/queryClaimByPatentNo")
|
|
@GetMapping("/queryClaimByPatentNo")
|
|
public Response queryClaimByPatentNo(String patentNo) throws Exception {
|
|
public Response queryClaimByPatentNo(String patentNo) throws Exception {
|
|
@@ -203,6 +173,8 @@ public class PatentController {
|
|
public Response delMergePerson(@RequestBody MergePersonIdVO vo) {
|
|
public Response delMergePerson(@RequestBody MergePersonIdVO vo) {
|
|
Integer id = mergePersonService.delMergePerson(vo);
|
|
Integer id = mergePersonService.delMergePerson(vo);
|
|
return Response.success(id);
|
|
return Response.success(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
// @GetMapping("/pdf")
|
|
// @GetMapping("/pdf")
|
|
// @Operation(summary = "导出专利")
|
|
// @Operation(summary = "导出专利")
|
|
// public ResponseEntity<InputStreamResource> pdf(Integer projectId) throws IOException {
|
|
// public ResponseEntity<InputStreamResource> pdf(Integer projectId) throws IOException {
|
|
@@ -234,4 +206,27 @@ public class PatentController {
|
|
.body(new InputStreamResource(new ByteArrayInputStream(fileData)));
|
|
.body(new InputStreamResource(new ByteArrayInputStream(fileData)));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("/export")
|
|
|
|
+ @Operation(summary = "导出专利")
|
|
|
|
+ public ResponseEntity<InputStreamResource> export(@RequestBody PatentExportParams params) throws IOException {
|
|
|
|
+ Integer taskId = 1;
|
|
|
|
+ TaskParams taskParams = new TaskParams();
|
|
|
|
+ taskParams.setTaskId(taskId);
|
|
|
|
+ taskParams.setTaskType(2);
|
|
|
|
+ taskParams.setProjectId(params.getProjectId());
|
|
|
|
+ taskParams.setSelected(JsonUtils.objectToJson(params.getSelected()));
|
|
|
|
+ taskParams.setCreateId("328");
|
|
|
|
+ byte[] fileData = patentExportService.exportPatent(taskParams);
|
|
|
|
+ //保存生成excel的地址
|
|
|
|
+ String fileName = "导出专利报表.xlsx";
|
|
|
|
+// String fileName = IdUtil.simpleUUID() + ".xls";
|
|
|
|
+// String directoryName = fileUtils.createDirectory();
|
|
|
|
+// String savePath = fileUtils.getSavePath(directoryName);
|
|
|
|
+ //文件原始名中的中文字符可能会乱码,对文件名进行URL编码
|
|
|
|
+ String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString());
|
|
|
|
+ return ResponseEntity.ok().contentLength(fileData.length)
|
|
|
|
+ .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + encodedFileName + "\"")
|
|
|
|
+ .contentType(MediaType.parseMediaType("application/octet-stream"))
|
|
|
|
+ .body(new InputStreamResource(new ByteArrayInputStream(fileData)));
|
|
|
|
+ }
|
|
}
|
|
}
|