Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit acd243cb
authored
Feb 22, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工单设备位置验证
1 parent
1f330549
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
src/main/java/cn/com/glsx/admin/common/exception/AdminException.java
src/main/java/cn/com/glsx/admin/modules/service/WorkOrderService.java
src/main/java/cn/com/glsx/admin/common/exception/AdminException.java
View file @
acd243c
package
cn
.
com
.
glsx
.
admin
.
common
.
exception
;
package
cn
.
com
.
glsx
.
admin
.
common
.
exception
;
import
cn.com.glsx.admin.common.enums.ResultEnum
;
import
cn.com.glsx.admin.common.enums.ResultEnum
;
import
com.glsx.plat.exception.SystemMessage
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
@@ -20,12 +21,14 @@ public class AdminException extends RuntimeException {
...
@@ -20,12 +21,14 @@ public class AdminException extends RuntimeException {
public
AdminException
(
String
message
)
{
public
AdminException
(
String
message
)
{
super
(
message
);
super
(
message
);
this
.
errorCode
=
SystemMessage
.
FAILURE
.
getCode
();
this
.
message
=
message
;
}
}
public
AdminException
(
int
errorCode
,
String
message
)
{
public
AdminException
(
int
errorCode
,
String
message
)
{
super
(
message
);
super
(
message
);
this
.
errorCode
=
errorCode
;
this
.
errorCode
=
errorCode
;
this
.
message
=
message
;
this
.
message
=
message
;
}
}
public
AdminException
(
ResultEnum
resultEnum
)
{
public
AdminException
(
ResultEnum
resultEnum
)
{
...
...
src/main/java/cn/com/glsx/admin/modules/service/WorkOrderService.java
View file @
acd243c
...
@@ -392,19 +392,32 @@ public class WorkOrderService {
...
@@ -392,19 +392,32 @@ public class WorkOrderService {
}.
getType
());
}.
getType
());
List
<
DeviceVerifyDTO
>
list
=
Lists
.
newArrayList
();
List
<
DeviceVerifyDTO
>
list
=
Lists
.
newArrayList
();
gpsBsDataList
.
forEach
(
gbd
->
{
if
(
CollectionUtils
.
isNotEmpty
(
gpsBsDataList
))
{
DeviceVerifyDTO
verifyDTO
=
new
DeviceVerifyDTO
();
gpsBsDataList
.
forEach
(
gbd
->
{
verifyDTO
.
setSn
(
gbd
.
getSn
());
DeviceVerifyDTO
verifyDTO
=
new
DeviceVerifyDTO
();
verifyDTO
.
setCheckResult
(
gbd
.
getGpsVerifyResult
()
||
gbd
.
getBsVerifyResult
());
verifyDTO
.
setSn
(
gbd
.
getSn
());
// 根据工单号获取车辆信息
Vehicle
vehicle
=
vehicleMapper
.
selectByOrderId
(
verifyBO
.
getWorkOrderId
());
boolean
checkFlag
=
gbd
.
getGpsVerifyResult
()
||
gbd
.
getBsVerifyResult
();
if
(
vehicle
!=
null
)
{
verifyDTO
.
setCheckResult
(
checkFlag
);
verifyDTO
.
setOwnerName
(
vehicle
.
getOwnerName
());
if
(
checkFlag
)
{
verifyDTO
.
setVin
(
vehicle
.
getVin
());
// 根据工单号获取车辆信息
}
Vehicle
vehicle
=
vehicleMapper
.
selectByOrderId
(
verifyBO
.
getWorkOrderId
());
verifyDTO
.
setGpsBsData
(
gbd
);
if
(
vehicle
!=
null
)
{
list
.
add
(
verifyDTO
);
verifyDTO
.
setOwnerName
(
vehicle
.
getOwnerName
());
});
verifyDTO
.
setVin
(
vehicle
.
getVin
());
}
verifyDTO
.
setGpsBsData
(
gbd
);
}
list
.
add
(
verifyDTO
);
});
}
else
{
verifyBO
.
getDevices
().
forEach
(
deviceItem
->
{
DeviceVerifyDTO
verifyDTO
=
new
DeviceVerifyDTO
();
verifyDTO
.
setSn
(
deviceItem
.
getSn
());
verifyDTO
.
setCheckResult
(
false
);
list
.
add
(
verifyDTO
);
});
}
return
list
;
return
list
;
}
else
{
}
else
{
throw
new
AdminException
(
verifyR
.
getCode
(),
verifyR
.
getMessage
());
throw
new
AdminException
(
verifyR
.
getCode
(),
verifyR
.
getMessage
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment