Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
89ecf17e
Commit
89ecf17e
authored
Jun 25, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
dev - master 28 See merge request
!374
parents
ba0a8584
bc1b55ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+13
-1
TestPdfBox.java
ruoyi-admin/src/test/java/com/ruoyi/TestPdfBox.java
+7
-4
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
89ecf17e
...
@@ -844,12 +844,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -844,12 +844,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
return
testSchemeId
;
return
testSchemeId
;
}
}
/**
* pdf转图片
* @param request
* @return
* @throws IOException
*/
@Override
@Override
public
String
getPicture
(
TaskPictureRequest
request
)
throws
IOException
{
public
String
getPicture
(
TaskPictureRequest
request
)
throws
IOException
{
Task
task
=
taskMapper
.
selectById
(
request
.
getTaskId
());
Task
task
=
taskMapper
.
selectById
(
request
.
getTaskId
());
if
(
task
.
getPictureUrl
()
!=
null
)
{
if
(
!
Objects
.
equals
(
task
.
getPictureUrl
(),
""
)
&&
task
.
getPictureUrl
()
!=
null
)
{
return
task
.
getPictureUrl
();
return
task
.
getPictureUrl
();
}
else
{
}
else
{
String
pictureUrl
=
processRemotePDF
(
request
.
getUrl
());
String
pictureUrl
=
processRemotePDF
(
request
.
getUrl
());
...
@@ -860,6 +866,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -860,6 +866,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
}
}
/**
* pdf转图片
* @param urlStr
* @return
* @throws IOException
*/
public
String
processRemotePDF
(
String
urlStr
)
throws
IOException
{
public
String
processRemotePDF
(
String
urlStr
)
throws
IOException
{
URL
url
=
new
URL
(
urlStr
);
URL
url
=
new
URL
(
urlStr
);
String
pictureUrl
=
""
;
String
pictureUrl
=
""
;
...
...
ruoyi-admin/src/test/java/com/ruoyi/TestPdfBox.java
View file @
89ecf17e
...
@@ -24,17 +24,20 @@ public class TestPdfBox {
...
@@ -24,17 +24,20 @@ public class TestPdfBox {
private
static
String
bucketName
=
"vehicle-quality-review-oss"
;
private
static
String
bucketName
=
"vehicle-quality-review-oss"
;
// @Value("${minio.url}")
// @Value("${minio.url}")
private
static
String
minioEndpoint
=
"http://106.3.99.64:22013"
;
// private static String minioEndpoint = "http://106.3.99.64:22013";
private
static
String
minioEndpoint
=
"http://10.12.48.79:22038"
;
// @Value("${minio.accessKey}")
// @Value("${minio.accessKey}")
private
static
String
accessKey
=
"FNGqDZnHJhrugLlZBh77"
;
// private static String accessKey = "FNGqDZnHJhrugLlZBh77";
private
static
String
accessKey
=
"jockOVg2UG0dy2GZ"
;
// @Value("${minio.secretKey}")
// @Value("${minio.secretKey}")
private
static
String
secretKey
=
"TvnWeQxAQ1OYiAN68qlzEDJl5RqZ7tQYTMJ8XM0M"
;
// private static String secretKey = "TvnWeQxAQ1OYiAN68qlzEDJl5RqZ7tQYTMJ8XM0M";
private
static
String
secretKey
=
"AIZ4Ppls4xYrheSZfik8vbq4v6i1wm7m"
;
@Test
@Test
public
static
void
main
(
String
[]
args
)
throws
IOException
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
url
=
"http://10
6.3.99.64:22013/vehicle-quality-review-oss/2024/06/14/车型审查原始记录-202406141755
.pdf"
;
String
url
=
"http://10
.12.48.79:22038/vehicle-quality-review-oss/2024/06/24/车型审查原始记录-202406241741
.pdf"
;
String
pictureUrl
=
processRemotePDF
(
url
);
String
pictureUrl
=
processRemotePDF
(
url
);
System
.
out
.
println
(
pictureUrl
);
System
.
out
.
println
(
pictureUrl
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment