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
44454d4e
Commit
44454d4e
authored
Jan 13, 2021
by
landerliang@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动签章上传,先判断当前车牌号下是否不为空,为空则不进行报告下载,节省资源
parent
010404dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
car-reptiles-system/src/main/java/me/zhengjie/modules/system/service/ReportService.java
+3
-3
car-reptiles-system/src/main/java/me/zhengjie/modules/system/util/CarReportUtil.java
+0
-0
car-reptiles-system/src/test/java/me/zhengjie/LoginCacheTest.java
+10
-0
No files found.
car-reptiles-system/src/main/java/me/zhengjie/modules/system/service/ReportService.java
View file @
44454d4e
...
...
@@ -137,13 +137,14 @@ public class ReportService {
reportDetailsReqVo
.
setCarNum
(
testReportVo
.
getVLPN
());
reportDetailsReqVo
.
setReportNum
(
testReportVo
.
getInspectionNum
());
//下载报告pdf 并写入数据库
reportPdfVo
=
new
ReportPdfVo
();
//下载报告pdf
String
path
=
carReportUtil
.
authDownloadReport
(
account
,
password
,
reportDetailsReqVo
);
//如果下载成功
if
(
StrUtil
.
isNotBlank
(
path
)){
// 写入数据库
reportPdfVo
=
new
ReportPdfVo
();
reportPdfVo
.
setPath
(
path
);
reportPdfVo
.
setVehicleId
(
testReportVo
.
getVehicleID
());
reportPdfVo
.
setUniqueString
(
testReportVo
.
getUniqueString
());
...
...
@@ -337,7 +338,6 @@ public class ReportService {
AssertUtil
.
isNotNull
(
deptVo
,
"列表获取失败,未找到当前账号所属部门"
);
String
reportPath
=
""
;
try
{
//下载检测报告
reportPath
=
carReportUtil
.
downloadReport
(
deptVo
.
getEpAccount
(),
deptVo
.
getEpPassword
(),
detailsReqVo
);
}
catch
(
Exception
e
)
{
...
...
car-reptiles-system/src/main/java/me/zhengjie/modules/system/util/CarReportUtil.java
View file @
44454d4e
This diff is collapsed.
Click to expand it.
car-reptiles-system/src/test/java/me/zhengjie/LoginCacheTest.java
View file @
44454d4e
...
...
@@ -18,6 +18,16 @@ public class LoginCacheTest {
@Resource
(
name
=
"userDetailsService"
)
private
UserDetailsServiceImpl
userDetailsService
;
@Test
public
void
testIsDirEmptry
(){
String
dirPath
=
"C:\\Users\\Lander.LAPTOP-6VMQUJS1\\Desktop\\pdf"
;
boolean
dirEmpty
=
FileUtil
.
isDirEmpty
(
FileUtil
.
file
(
dirPath
));
System
.
out
.
println
(
"当前文件夹是否为空:"
+
dirEmpty
);
if
(!
dirEmpty
){
System
.
out
.
println
(
"不为空"
);
}
}
@Test
public
void
testCreateFileDirect
(){
...
...
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