Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
extend
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
park
extend
Commits
75d80982
Commit
75d80982
authored
Jun 21, 2020
by
xieshixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加注释
parent
521c8360
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+25
-0
No files found.
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
75d80982
...
@@ -153,15 +153,25 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -153,15 +153,25 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
@Override
@Override
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
BindInfoQuery
query
)
{
public
Response
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
BindInfoQuery
query
)
{
/**
* 校验当前的绑定信息是否存在
*/
BindInfo
bindInfo
=
mapper
.
selectById
(
query
.
getUnqId
());
BindInfo
bindInfo
=
mapper
.
selectById
(
query
.
getUnqId
());
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
}
}
/**
* 查询违章信息
*/
ViolationPlateNumAndTypeQueryReq
req
=
new
ViolationPlateNumAndTypeQueryReq
();
ViolationPlateNumAndTypeQueryReq
req
=
new
ViolationPlateNumAndTypeQueryReq
();
req
.
setPlateNum
(
bindInfo
.
getPlateNum
());
req
.
setPlateNum
(
bindInfo
.
getPlateNum
());
req
.
setPlateType
(
bindInfo
.
getPlateType
());
req
.
setPlateType
(
bindInfo
.
getPlateType
());
List
<
ViolationRes
>
byPlateNumAndType
=
violatio
.
getByPlateNumAndType
(
req
);
List
<
ViolationRes
>
byPlateNumAndType
=
violatio
.
getByPlateNumAndType
(
req
);
/**
* 构建违章信息返回列表
*/
List
<
ViolationInfoRes
>
violationInfoResList
=
new
ArrayList
<>();
List
<
ViolationInfoRes
>
violationInfoResList
=
new
ArrayList
<>();
for
(
ViolationRes
res
:
byPlateNumAndType
)
{
for
(
ViolationRes
res
:
byPlateNumAndType
)
{
ViolationInfoRes
info
=
new
ViolationInfoRes
();
ViolationInfoRes
info
=
new
ViolationInfoRes
();
...
@@ -177,17 +187,26 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -177,17 +187,26 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
@Override
@Override
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
BindInfoQuery
query
)
{
public
Response
<
DrivingLicenseInfoRes
>
drivingLicenseInfo
(
BindInfoQuery
query
)
{
/**
* 校验当前的绑定信息是否存在
*/
BindInfo
bindInfo
=
mapper
.
selectById
(
query
.
getUnqId
());
BindInfo
bindInfo
=
mapper
.
selectById
(
query
.
getUnqId
());
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
DATA_ERROR
);
}
}
/**
* 校验当前电话号码是否在10天内已通过验证
*/
VerifyInfo
verifyInfo
=
this
.
verifyInfo
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
VerifyInfo
verifyInfo
=
this
.
verifyInfo
.
checkValidity
(
query
.
getPhone
(),
query
.
getUserId
(),
DateUtil
.
offsetDay
(
DateTime
.
now
(),
-
10
));
DateUtil
.
offsetDay
(
DateTime
.
now
(),
-
10
));
if
(
verifyInfo
==
null
)
{
if
(
verifyInfo
==
null
)
{
return
ResponseGenerator
.
fail
(
StatusCode
.
PERMISSION_DENIED
);
return
ResponseGenerator
.
fail
(
StatusCode
.
PERMISSION_DENIED
);
}
}
/**
* 根据车牌号和车牌类型查询车辆信息
*/
PlateNumAndTypeQueryReq
vechicleInfoReq
=
new
PlateNumAndTypeQueryReq
();
PlateNumAndTypeQueryReq
vechicleInfoReq
=
new
PlateNumAndTypeQueryReq
();
vechicleInfoReq
.
setPlateType
(
bindInfo
.
getPlateType
());
vechicleInfoReq
.
setPlateType
(
bindInfo
.
getPlateType
());
vechicleInfoReq
.
setPlateNum
(
bindInfo
.
getPlateNum
());
vechicleInfoReq
.
setPlateNum
(
bindInfo
.
getPlateNum
());
...
@@ -196,6 +215,9 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -196,6 +215,9 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
return
ResponseGenerator
.
fail
(
StatusCode
.
ALERT_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
ALERT_ERROR
);
}
}
/**
* 根据身份证号码查询驾照信息
*/
IdCardQueryReq
idCardQueryReq
=
new
IdCardQueryReq
();
IdCardQueryReq
idCardQueryReq
=
new
IdCardQueryReq
();
idCardQueryReq
.
setIdCard
(
byPlateNumAndType
.
getSfzmhm
());
idCardQueryReq
.
setIdCard
(
byPlateNumAndType
.
getSfzmhm
());
DrivingLicenseRes
drivingLicenseRes
=
drivingLicense
.
getByIdCard
(
idCardQueryReq
);
DrivingLicenseRes
drivingLicenseRes
=
drivingLicense
.
getByIdCard
(
idCardQueryReq
);
...
@@ -203,6 +225,9 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -203,6 +225,9 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
return
ResponseGenerator
.
fail
(
StatusCode
.
ALERT_ERROR
);
return
ResponseGenerator
.
fail
(
StatusCode
.
ALERT_ERROR
);
}
}
/**
* 构建驾照信息查询结果
*/
DrivingLicenseInfoRes
result
=
new
DrivingLicenseInfoRes
();
DrivingLicenseInfoRes
result
=
new
DrivingLicenseInfoRes
();
result
.
setDriverName
(
drivingLicenseRes
.
getXm
());
result
.
setDriverName
(
drivingLicenseRes
.
getXm
());
result
.
setPlateNum
(
drivingLicenseRes
.
getSfzmhm
());
result
.
setPlateNum
(
drivingLicenseRes
.
getSfzmhm
());
...
...
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