Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
car-reptiles
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁辉
car-reptiles
Commits
0edfec5f
Commit
0edfec5f
authored
Dec 12, 2020
by
landerliang@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断多出一页的报告坐标
parent
bfccfc59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
car-reptiles-system/src/main/java/me/zhengjie/modules/system/util/CarReportUtil.java
+16
-2
car-reptiles-system/src/main/resources/config/application.yml
+1
-1
No files found.
car-reptiles-system/src/main/java/me/zhengjie/modules/system/util/CarReportUtil.java
View file @
0edfec5f
...
...
@@ -23,6 +23,7 @@ import me.zhengjie.modules.system.service.UploadRecordService;
import
me.zhengjie.utils.AssertUtil
;
import
org.jsoup.Jsoup
;
import
org.jsoup.nodes.Document
;
import
org.jsoup.nodes.Element
;
import
org.jsoup.select.Elements
;
import
org.openqa.selenium.By
;
import
org.openqa.selenium.JavascriptExecutor
;
...
...
@@ -792,7 +793,6 @@ public class CarReportUtil {
Document
parse1
=
Jsoup
.
parse
(
reportHtml
);
String
imgSrc
=
parse1
.
getElementById
(
"qrImg"
).
attr
(
"src"
);
Object
[]
cookies
=
reportDriver
.
manage
().
getCookies
().
toArray
();
byte
[]
respBytes
=
HttpUtil
.
createGet
(
imgSrc
).
header
(
"Cookie"
,
cookies
[
0
].
toString
()
+
";"
+
cookies
[
1
].
toString
()
+
";"
+
cookies
[
2
].
toString
()).
execute
().
bodyBytes
();
...
...
@@ -821,7 +821,21 @@ public class CarReportUtil {
Map
<
String
,
Object
>
resp
=
new
HashMap
<
String
,
Object
>();
String
reportPath
=
getReportPath
(
fileName
,
".pdf"
);
resp
.
put
(
"path"
,
reportPath
);
resp
.
put
(
"pdfType"
,(
reportHtml
.
contains
(
"<td class=\"readyStatus\" colspan=\"2\"> OBD系统故障指示器 </td>"
)?
1
:
0
));
Elements
wordCalids
=
parse1
.
getElementsByClass
(
"word_calid"
);
boolean
flag
=
false
;
for
(
Element
element:
wordCalids
)
{
if
(!
element
.
html
().
contains
(
"-"
)){
flag
=
true
;
}
}
if
(
reportHtml
.
contains
(
"<td class=\"readyStatus\" colspan=\"2\"> OBD系统故障指示器 </td>"
)){
resp
.
put
(
"pdfType"
,
1
);
}
/*else if(flag) {
resp.put("pdfType",2);
}*/
else
{
resp
.
put
(
"pdfType"
,
0
);
}
//resp.put("pdfType",(reportHtml.contains("<td class=\"readyStatus\" colspan=\"2\"> OBD系统故障指示器 </td>")?1:0));
return
resp
;
}
catch
(
InterruptedException
|
UnsupportedEncodingException
e
)
{
driver
.
close
();
...
...
car-reptiles-system/src/main/resources/config/application.yml
View file @
0edfec5f
...
...
@@ -5,7 +5,7 @@ spring:
freemarker
:
check-template-location
:
false
profiles
:
active
:
dev
active
:
prod
jackson
:
time-zone
:
GMT+8
data
:
...
...
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