Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0ea47d82
authored
Jan 02, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工单标准接口-校验
1 parent
52b052f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
src/main/java/cn/com/glsx/stdinterface/modules/api/WorkOrderApiController.java
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
src/main/java/cn/com/glsx/stdinterface/modules/api/WorkOrderApiController.java
View file @
0ea47d8
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
api
;
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
api
;
import
cn.com.glsx.devicemonitor.api.dto.response.GpsBsData
;
import
cn.com.glsx.stdinterface.common.enums.ResultEnum
;
import
cn.com.glsx.stdinterface.common.enums.ResultEnum
;
import
cn.com.glsx.stdinterface.common.exception.StdInterfaceException
;
import
cn.com.glsx.stdinterface.common.exception.StdInterfaceException
;
import
cn.com.glsx.stdinterface.dto.*
;
import
cn.com.glsx.stdinterface.dto.*
;
...
@@ -171,8 +172,8 @@ public class WorkOrderApiController {
...
@@ -171,8 +172,8 @@ public class WorkOrderApiController {
String
decryptData
=
decryptRequestData
(
request
.
getOrganization
(),
request
.
getData
());
String
decryptData
=
decryptRequestData
(
request
.
getOrganization
(),
request
.
getData
());
WorkOrderVerifyBO
orderReq
=
JSON
.
parseObject
(
decryptData
,
WorkOrderVerifyBO
.
class
);
WorkOrderVerifyBO
orderReq
=
JSON
.
parseObject
(
decryptData
,
WorkOrderVerifyBO
.
class
);
orderReq
.
setOrderSource
(
request
.
getOrganization
());
orderReq
.
setOrderSource
(
request
.
getOrganization
());
workOrderService
.
verifyWorkOrder
(
orderReq
,
true
);
List
<
GpsBsData
>
list
=
workOrderService
.
verifyWorkOrder
(
orderReq
,
true
);
return
R
.
ok
();
return
R
.
ok
()
.
data
(
list
)
;
}
}
/**
/**
...
...
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
View file @
0ea47d8
...
@@ -557,7 +557,7 @@ public class WorkOrderService {
...
@@ -557,7 +557,7 @@ public class WorkOrderService {
* @param verifyBO
* @param verifyBO
* @param isApiCall
* @param isApiCall
*/
*/
public
void
verifyWorkOrder
(
WorkOrderVerifyBO
verifyBO
,
boolean
isApiCall
)
{
public
List
<
GpsBsData
>
verifyWorkOrder
(
WorkOrderVerifyBO
verifyBO
,
boolean
isApiCall
)
{
WorkOrder
workOrder
=
null
;
WorkOrder
workOrder
=
null
;
if
(
isApiCall
)
{
if
(
isApiCall
)
{
...
@@ -598,12 +598,22 @@ public class WorkOrderService {
...
@@ -598,12 +598,22 @@ public class WorkOrderService {
deviceLocationRequest
.
setVerifyTimeFlag
(
true
);
deviceLocationRequest
.
setVerifyTimeFlag
(
true
);
deviceLocationRequest
.
setBsBackfillGps
(
true
);
deviceLocationRequest
.
setBsBackfillGps
(
true
);
deviceLocationRequest
.
setDevices
(
devices
);
deviceLocationRequest
.
setDevices
(
devices
);
R
<
List
<
GpsBsData
>>
locationListR
=
gpsBsFeignService
.
locationCheck
(
deviceLocationRequest
);
R
<
List
<
GpsBsData
>>
listR
=
gpsBsFeignService
.
locationCheck
(
deviceLocationRequest
);
log
.
info
(
"工单{}位置点验证结果:{}"
,
verifyBO
.
getBizWorkOrderNo
(),
JSONUtil
.
toJsonStr
(
locationListR
));
log
.
info
(
"工单{}位置点验证结果:{}"
,
verifyBO
.
getBizWorkOrderNo
(),
JSONUtil
.
toJsonStr
(
listR
));
if
(!
locationListR
.
isSuccess
())
{
if
(!
listR
.
isSuccess
())
{
throw
new
StdInterfaceException
(
String
.
valueOf
(
locationListR
.
getCode
()),
locationListR
.
getMessage
());
throw
new
StdInterfaceException
(
String
.
valueOf
(
listR
.
getCode
()),
listR
.
getMessage
());
}
else
{
List
<
GpsBsData
>
gpsBsDataList
=
listR
.
getDataList
(
new
TypeToken
<
List
<
GpsBsData
>>()
{
}.
getType
());
gpsBsDataList
.
forEach
(
gdb
->
{
if
(!
gdb
.
getGpsVerifyResult
()
&&
!
gdb
.
getBsVerifyResult
())
{
throw
new
StdInterfaceException
(
"2145415"
,
String
.
format
(
"%s设备有效位置验证不通过"
,
gdb
.
getSn
()));
}
});
return
gpsBsDataList
;
}
}
}
}
return
Lists
.
newArrayList
();
}
}
/**
/**
...
...
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