Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹鹏
bigdatainterservice
Commits
fa890e86
Commit
fa890e86
authored
Jun 12, 2019
by
yanru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多区域碰撞分析-发送任务、时空伴随-任务发送触发重庆智侦平台中任务返回结果保存线程
parent
c2aedeb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
6 deletions
+54
-6
src/main/java/com/founder/interservice/controller/PushWaDataController.java
+25
-4
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
+26
-1
src/main/resources/application.yml
+3
-1
No files found.
src/main/java/com/founder/interservice/controller/PushWaDataController.java
View file @
fa890e86
...
...
@@ -10,12 +10,10 @@ import com.founder.interservice.tracktraveltogether.model.TrackTogetherTask;
import
com.founder.interservice.tracktraveltogether.service.TrackTogetherService
;
import
com.founder.interservice.user.controller.UserContoller
;
import
com.founder.interservice.user.model.User
;
import
com.founder.interservice.util.DateUtil
;
import
com.founder.interservice.util.KeyUtil
;
import
com.founder.interservice.util.ResultVOUtil
;
import
com.founder.interservice.util.StringUtil
;
import
com.founder.interservice.util.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -23,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* 新版获取网安数据接口提供类
...
...
@@ -39,6 +39,8 @@ public class PushWaDataController {
private
DzgzService
dzgzService
;
@Autowired
private
TrackTogetherService
trackTogetherService
;
@Value
(
"${cqzz-platform.url}"
)
private
String
cqzzPlatformUrl
;
/**
* 获取对象时间段内的轨迹
...
...
@@ -144,6 +146,25 @@ public class PushWaDataController {
try
{
String
result
=
pushWaDataService
.
sendTogetherTask
(
taskCaseId
,
taskName
,
username
,
startTime
,
endTime
,
objectType
,
objectValue
);
saveTogetherTask
(
result
,
taskCaseId
,
taskName
,
username
,
startTime
,
endTime
,
objectType
,
objectValue
,
fsrSfzh
);
if
(!
StringUtils
.
isEmpty
(
result
)
&&
result
.
contains
(
"{"
))
{
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
if
(
null
!=
resultObject
&&
resultObject
.
containsKey
(
"data"
)
&&
null
!=
resultObject
.
get
(
"data"
))
{
Object
taskIdObj
=
resultObject
.
get
(
"data"
);
if
(
null
!=
taskIdObj
&&
""
!=
taskIdObj
)
{
String
taskId
=
taskIdObj
.
toString
();
Map
header
=
new
HashMap
();
header
.
put
(
"Accept-Encoding"
,
"gzip, deflate, br"
);
header
.
put
(
"Accept-Language"
,
"zh-CN,zh;q=0.9"
);
header
.
put
(
"Authorization"
,
"Basic YWRtaW46YWRtaW4="
);
header
.
put
(
"Connection"
,
"keep-alive"
);
header
.
put
(
"Content-Type"
,
"application/json"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"taskId"
,
taskId
);
String
url
=
cqzzPlatformUrl
+
"/runTogetherThread"
;
HttpClient
.
doPost
(
url
,
header
,
paramMap
);
}
}
}
resultVO
=
ResultVOUtil
.
success
(
JSONObject
.
parseObject
(
result
));
}
catch
(
InterServiceException
e
){
e
.
printStackTrace
();
...
...
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
View file @
fa890e86
...
...
@@ -15,6 +15,7 @@ import com.founder.interservice.regionalanalysis.model.RegionalsTask;
import
com.founder.interservice.regionalanalysis.service.RegionalAnalysisService
;
import
com.founder.interservice.util.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -34,6 +35,8 @@ public class ProtoController {
private
ProtoService
protoService
;
@Autowired
private
RegionalAnalysisService
regionalAnalysisService
;
@Value
(
"${cqzz-platform.url}"
)
private
String
cqzzPlatformUrl
;
/**
* 获取关联关系接口
...
...
@@ -285,6 +288,26 @@ public class ProtoController {
//String result="{ "success":true, "message":null, "data":"774120bff0fea8ba6dfb6c1c6b20ec84-562-A01-xjzd-fangzheng-6-1558439147664", "errCode":null }";
saveRegionalsTask
(
param
,
result
);
resultVO
=
ResultVOUtil
.
success
(
result
);
if
(!
StringUtils
.
isEmpty
(
result
)
&&
result
.
contains
(
"{"
))
{
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
if
(
null
!=
resultObject
&&
resultObject
.
containsKey
(
"data"
)
&&
null
!=
resultObject
.
get
(
"data"
))
{
Object
taskIdObj
=
resultObject
.
get
(
"data"
);
if
(
null
!=
taskIdObj
&&
""
!=
taskIdObj
)
{
String
taskId
=
taskIdObj
.
toString
();
Map
header
=
new
HashMap
();
header
.
put
(
"Accept-Encoding"
,
"gzip, deflate, br"
);
header
.
put
(
"Accept-Language"
,
"zh-CN,zh;q=0.9"
);
header
.
put
(
"Authorization"
,
"Basic YWRtaW46YWRtaW4="
);
header
.
put
(
"Connection"
,
"keep-alive"
);
header
.
put
(
"Content-Type"
,
"application/json"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"taskId"
,
taskId
);
String
url
=
cqzzPlatformUrl
+
"/runRegionalThread"
;
HttpClient
.
doPost
(
url
,
header
,
paramMap
);
}
}
}
}
catch
(
InterServiceException
e
)
{
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
null
);
}
...
...
@@ -336,7 +359,9 @@ public class ProtoController {
regional
.
setStartTime
(
new
Date
(
object
.
getLong
(
"startTime"
)));
regional
.
setEndTime
(
new
Date
(
object
.
getLong
(
"endTime"
)));
regional
.
setRadius
(
object
.
getString
(
"radius"
));
regional
.
setCenterPoint
(
object
.
getJSONObject
(
"centerPoint"
).
toJSONString
());
if
(
null
!=
object
.
getJSONObject
(
"centerPoint"
)){
regional
.
setCenterPoint
(
object
.
getJSONObject
(
"centerPoint"
).
toJSONString
());
}
regionalList
.
add
(
regional
);
}
}
...
...
src/main/resources/application.yml
View file @
fa890e86
...
...
@@ -75,7 +75,9 @@ abutment_config:
userCardId
:
510902198504188878
userDept
:
510996440000
url
:
http://10.64.1.116:8585/node
#重庆智侦平台线上部署地址
cqzz-platform
:
url
:
http://77.1.24.51:8050
# 系统变量
xdhbigdata
:
xdhserviceParam
:
...
...
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