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
a724ae4b
Commit
a724ae4b
authored
May 16, 2019
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.92.108.28/caopeng/bigdatainterservice
parents
19d09eb2
053e7f81
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
348 additions
and
122 deletions
+348
-122
src/main/java/com/founder/interservice/controller/PushWaDataController.java
+48
-0
src/main/java/com/founder/interservice/dzgz/controller/DzgzController.java
+8
-3
src/main/java/com/founder/interservice/dzgz/service/impl/DzgzScheduledServer.java
+22
-8
src/main/java/com/founder/interservice/mapper/xzxt/DzgzTaskResultMapper.java
+2
-0
src/main/java/com/founder/interservice/mapper/xzxt/RyhxMapper.java
+7
-2
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
+65
-0
src/main/java/com/founder/interservice/regionalanalysis/service/impl/ScheduledService.java
+37
-55
src/main/java/com/founder/interservice/ryhx/controller/RyhxController.java
+49
-26
src/main/java/com/founder/interservice/ryhx/model/TbStCqhotelData.java
+4
-0
src/main/java/com/founder/interservice/ryhx/service/RyhxService.java
+7
-2
src/main/java/com/founder/interservice/ryhx/service/impl/RyhxServiceImpl.java
+26
-8
src/main/resources/mybatis/mapper/xzxt/DzgzTaskResultMapper.xml
+7
-0
src/main/resources/mybatis/mapper/xzxt/RyhxMapper.xml
+66
-18
No files found.
src/main/java/com/founder/interservice/controller/PushWaDataController.java
View file @
a724ae4b
...
@@ -6,10 +6,15 @@ import com.founder.interservice.dzgz.model.DzgzTask;
...
@@ -6,10 +6,15 @@ import com.founder.interservice.dzgz.model.DzgzTask;
import
com.founder.interservice.dzgz.service.DzgzService
;
import
com.founder.interservice.dzgz.service.DzgzService
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.service.PushWaDataService
;
import
com.founder.interservice.service.PushWaDataService
;
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.controller.UserContoller
;
import
com.founder.interservice.user.model.User
;
import
com.founder.interservice.user.model.User
;
import
com.founder.interservice.util.DateUtil
;
import
com.founder.interservice.util.KeyUtil
;
import
com.founder.interservice.util.KeyUtil
;
import
com.founder.interservice.util.ResultVOUtil
;
import
com.founder.interservice.util.ResultVOUtil
;
import
com.founder.interservice.util.StringUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
...
@@ -32,6 +37,8 @@ public class PushWaDataController {
...
@@ -32,6 +37,8 @@ public class PushWaDataController {
private
UserContoller
userContoller
;
private
UserContoller
userContoller
;
@Autowired
@Autowired
private
DzgzService
dzgzService
;
private
DzgzService
dzgzService
;
@Autowired
private
TrackTogetherService
trackTogetherService
;
/**
/**
* 获取对象时间段内的轨迹
* 获取对象时间段内的轨迹
...
@@ -136,6 +143,7 @@ public class PushWaDataController {
...
@@ -136,6 +143,7 @@ public class PushWaDataController {
ResultVO
resultVO
=
null
;
ResultVO
resultVO
=
null
;
try
{
try
{
String
result
=
pushWaDataService
.
sendTogetherTask
(
taskCaseId
,
taskName
,
username
,
startTime
,
endTime
,
objectType
,
objectValue
);
String
result
=
pushWaDataService
.
sendTogetherTask
(
taskCaseId
,
taskName
,
username
,
startTime
,
endTime
,
objectType
,
objectValue
);
saveTogetherTask
(
result
,
taskCaseId
,
taskName
,
username
,
startTime
,
endTime
,
objectType
,
objectValue
);
resultVO
=
ResultVOUtil
.
success
(
JSONObject
.
parseObject
(
result
));
resultVO
=
ResultVOUtil
.
success
(
JSONObject
.
parseObject
(
result
));
}
catch
(
InterServiceException
e
){
}
catch
(
InterServiceException
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -144,6 +152,46 @@ public class PushWaDataController {
...
@@ -144,6 +152,46 @@ public class PushWaDataController {
return
resultVO
;
return
resultVO
;
}
}
/**
/**
* 时空伴随-任务保存
* @param result
* @param taskCaseId
* @param taskName
* @param username
* @param startTime
* @param endTime
* @param objectType
* @param objectValue
*/
public
void
saveTogetherTask
(
String
result
,
String
taskCaseId
,
String
taskName
,
String
username
,
String
startTime
,
String
endTime
,
String
objectType
,
String
objectValue
)
{
try
{
TrackTogetherTask
trackParam
=
new
TrackTogetherTask
();
if
(!
StringUtils
.
isEmpty
(
result
)
&&
result
.
contains
(
"{"
))
{
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
if
(
null
!=
resultObject
&&
resultObject
.
containsKey
(
"data"
)
&&
null
!=
resultObject
.
get
(
"data"
))
{
String
taskId
=
resultObject
.
get
(
"data"
).
toString
();
trackParam
.
setTaskId
(
taskId
);
trackParam
.
setProgress
(
"0"
);
trackParam
.
setState
(
"QUEUEING"
);
trackParam
.
setTaskName
(
taskName
);
//设置任务名称
trackParam
.
setTaskCaseId
(
taskCaseId
);
//设置案件编号
trackParam
.
setObjectValue
(
objectValue
);
//设置需要伴随的标识号
if
(!
StringUtil
.
ckeckEmpty
(
objectType
)
&&
!
StringUtil
.
ckeckEmpty
(
objectValue
)
&&
!
StringUtil
.
ckeckEmpty
(
startTime
)
&&
!
StringUtil
.
ckeckEmpty
(
endTime
))
{
trackParam
.
setObjectType
(
objectType
);
//设置标识号类型
trackParam
.
setObjectValue
(
objectValue
);
//设置需要伴随的标识号
Date
kssj
=
startTime
.
contains
(
" "
)
?
DateUtil
.
convertStringToDateTime
(
startTime
)
:
DateUtil
.
convertStringToDate
(
startTime
);
trackParam
.
setStartTime
(
kssj
);
Date
jssj
=
endTime
.
contains
(
" "
)
?
DateUtil
.
convertStringToDateTime
(
endTime
)
:
DateUtil
.
convertStringToDate
(
endTime
);
trackParam
.
setEndTime
(
jssj
);
}
trackTogetherService
.
saveTogetherTask
(
trackParam
);
//任务保存入库
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
/**
* 获取时空伴随任务结果
* 获取时空伴随任务结果
* @param taskId 任务编号
* @param taskId 任务编号
* @return
* @return
...
...
src/main/java/com/founder/interservice/dzgz/controller/DzgzController.java
View file @
a724ae4b
...
@@ -255,6 +255,8 @@ public class DzgzController {
...
@@ -255,6 +255,8 @@ public class DzgzController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
System
.
out
.
println
(
"需要发送的个数++++++++++++++++++++++:"
+
listStartTime
.
size
());
String
glxxXxzlbh
=
KeyUtil
.
getUniqueKey
(
"GL"
);
for
(
int
i
=
0
;
i
<
listStartTime
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
listStartTime
.
size
();
i
++){
String
paramStr
=
null
;
String
paramStr
=
null
;
//发送电子固证任务
//发送电子固证任务
...
@@ -291,27 +293,29 @@ public class DzgzController {
...
@@ -291,27 +293,29 @@ public class DzgzController {
objectParam
.
put
(
"taskName"
,
taskName
);
objectParam
.
put
(
"taskName"
,
taskName
);
objectParam
.
put
(
"username"
,
jh
);
objectParam
.
put
(
"username"
,
jh
);
paramStr
=
objectParam
.
toJSONString
();
paramStr
=
objectParam
.
toJSONString
();
System
.
out
.
println
(
"model++++++++++++++++++++++++++++"
+
paramStr
);
try
{
try
{
String
result
=
pushWaDataService
.
sendDzgzTask
(
paramStr
,
0
);
String
result
=
pushWaDataService
.
sendDzgzTask
(
paramStr
,
0
);
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
System
.
out
.
println
(
"发送电子固证接口返回数据++++++++++++++++++++++++++++"
+
resultObject
);
String
success
=
resultObject
.
getString
(
"success"
);
String
success
=
resultObject
.
getString
(
"success"
);
//String success = "true";
//String success = "true";
if
(
"true"
.
equals
(
success
)){
//发送任务成功
if
(
"true"
.
equals
(
success
)){
//发送任务成功
String
taskId
=
resultObject
.
getString
(
"data"
);
//拿到任务编号
String
taskId
=
resultObject
.
getString
(
"data"
);
//拿到任务编号
//String taskId = node.getString("startTime");//拿到任务编号
//String taskId = node.getString("startTime");//拿到任务编号
System
.
out
.
println
(
"taskId++++++++++++++++++++++++++++"
+
taskId
);
DzgzTask
dzgzTask
=
new
DzgzTask
();
DzgzTask
dzgzTask
=
new
DzgzTask
();
dzgzTask
.
setRwsd
(
""
+
i
);
dzgzTask
.
setRwsd
(
""
+
i
);
dzgzTask
.
setTaskId
(
taskId
);
dzgzTask
.
setTaskId
(
taskId
);
dzgzTask
.
setTaskCaseId
(
asjbh
);
dzgzTask
.
setTaskCaseId
(
asjbh
);
dzgzTask
.
setTaskName
(
"案件名称"
);
dzgzTask
.
setTaskName
(
taskName
);
dzgzTask
.
setQyName
(
node
.
getString
(
"name"
));
dzgzTask
.
setQyName
(
node
.
getString
(
"name"
));
dzgzTask
.
setStartTime
(
new
Date
(
node
.
getLongValue
(
"startTime"
)));
dzgzTask
.
setStartTime
(
new
Date
(
node
.
getLongValue
(
"startTime"
)));
dzgzTask
.
setEndTime
(
new
Date
(
node
.
getLongValue
(
"endTime"
)));
dzgzTask
.
setEndTime
(
new
Date
(
node
.
getLongValue
(
"endTime"
)));
dzgzTask
.
setLc
(
node
.
getJSONArray
(
"lc"
).
toString
());
dzgzTask
.
setLc
(
node
.
getJSONArray
(
"lc"
).
toString
());
dzgzTask
.
setProgress
(
"0"
);
dzgzTask
.
setProgress
(
"0"
);
dzgzTask
.
setState
(
"QUEUEING"
);
dzgzTask
.
setState
(
"QUEUEING"
);
dzgzTask
.
setGlxxXxzjbh
(
KeyUtil
.
getUniqueKey
(
"GL"
)
);
dzgzTask
.
setGlxxXxzjbh
(
glxxXxzlbh
);
if
(
null
!=
user
){
if
(
null
!=
user
){
dzgzTask
.
setFsrJh
(
user
.
getUsername
());
dzgzTask
.
setFsrJh
(
user
.
getUsername
());
dzgzTask
.
setFsrSfzh
(
user
.
getCard_id
());
dzgzTask
.
setFsrSfzh
(
user
.
getCard_id
());
...
@@ -327,6 +331,7 @@ public class DzgzController {
...
@@ -327,6 +331,7 @@ public class DzgzController {
}
}
}
}
System
.
out
.
println
(
"成功发送的个数+++++++++++++++++++++++++:"
+
dzgzTaskList
.
size
());
if
(
dzgzTaskList
!=
null
&&
dzgzTaskList
.
size
()==
7
){
//全部任务发送成功--启动线程进行电子固证具体信息的存储
if
(
dzgzTaskList
!=
null
&&
dzgzTaskList
.
size
()==
7
){
//全部任务发送成功--启动线程进行电子固证具体信息的存储
resultVO
.
setCode
(
0
);
resultVO
.
setCode
(
0
);
resultVO
.
setMsg
(
"成功!"
);
resultVO
.
setMsg
(
"成功!"
);
...
...
src/main/java/com/founder/interservice/dzgz/service/impl/DzgzScheduledServer.java
View file @
a724ae4b
...
@@ -45,7 +45,7 @@ public class DzgzScheduledServer{
...
@@ -45,7 +45,7 @@ public class DzgzScheduledServer{
private
PushWaDataService
pushWaDataService
;
private
PushWaDataService
pushWaDataService
;
@Scheduled
(
initialDelay
=
60000
,
fixedDelay
=
180000
)
//项目启动后延迟1分钟执行,每次执行完后三
分钟后再次执行
@Scheduled
(
initialDelay
=
60000
,
fixedDelay
=
60000
)
//项目启动后延迟1分钟执行,每次执行完后一
分钟后再次执行
public
void
queryTaskResult
(){
public
void
queryTaskResult
(){
System
.
out
.
println
(
"=============DZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============DZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============DZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============DZGZ Thread startting ==============="
);
...
@@ -65,7 +65,7 @@ public class DzgzScheduledServer{
...
@@ -65,7 +65,7 @@ public class DzgzScheduledServer{
if
(
"2"
.
equals
(
progress
)){
//已经拿到查询结果,未解析完成,继续解析
if
(
"2"
.
equals
(
progress
)){
//已经拿到查询结果,未解析完成,继续解析
String
result_str
=
task
.
getRwresult
();
String
result_str
=
task
.
getRwresult
();
getAndSaveInfo
(
result_str
,
task
);
getAndSaveInfo
(
result_str
,
task
);
updateTaskStates
(
taskId
,
"1"
,
"FINISHED"
,
null
);
//
updateTaskStates(taskId,"1","FINISHED",null);
System
.
out
.
println
(
"电子固证信息保存成功++++++++++++++++++++++++++"
);
System
.
out
.
println
(
"电子固证信息保存成功++++++++++++++++++++++++++"
);
}
else
{
}
else
{
//查询比对结果状态
//查询比对结果状态
...
@@ -78,8 +78,8 @@ public class DzgzScheduledServer{
...
@@ -78,8 +78,8 @@ public class DzgzScheduledServer{
//拿到数据,保存数据
//拿到数据,保存数据
updateTaskStates
(
taskId
,
"2"
,
"STARTING"
,
result_str
);
updateTaskStates
(
taskId
,
"2"
,
"STARTING"
,
result_str
);
getAndSaveInfo
(
result_str
,
task
);
getAndSaveInfo
(
result_str
,
task
);
updateTaskStates
(
taskId
,
"1"
,
state
,
null
);
//
updateTaskStates(taskId,"1",state,null);
taskResultMapper
.
deleteRepeatDzgzTaskResult
(
taskId
);
//删除指定task_id重复的电子固证结果数据
System
.
out
.
println
(
"电子固证信息保存成功++++++++++++++++++++++++++"
);
System
.
out
.
println
(
"电子固证信息保存成功++++++++++++++++++++++++++"
);
}
}
}
}
...
@@ -146,11 +146,11 @@ public class DzgzScheduledServer{
...
@@ -146,11 +146,11 @@ public class DzgzScheduledServer{
System
.
out
.
println
(
"电子固证返回的数量:"
+
taskResults
.
size
());
System
.
out
.
println
(
"电子固证返回的数量:"
+
taskResults
.
size
());
//多线程处理 chent
//多线程处理 chent
int
limit
=
12
0
;
//批处理量
int
limit
=
500
0
;
//批处理量
int
size
=
taskResults
.
size
();
int
size
=
taskResults
.
size
();
long
threadNum
=
size
/
limit
;
long
threadNum
=
size
/
limit
;
for
(
int
i
=
0
;
i
<
threadNum
+
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
threadNum
+
1
;
i
++)
{
HandleThread
thread
=
new
HandleThread
(
taskResults
,
i
*
limit
,
((
i
+
1
)
*
limit
));
HandleThread
thread
=
new
HandleThread
(
taskResults
,
i
*
limit
,
((
i
+
1
)
*
limit
)
,
result_str
,
task
.
getTaskId
(),
size
);
thread
.
start
();
thread
.
start
();
}
}
//taskResultMapper.saveDzgzTaskResultBatch(taskResults);
//taskResultMapper.saveDzgzTaskResultBatch(taskResults);
...
@@ -174,11 +174,18 @@ public class DzgzScheduledServer{
...
@@ -174,11 +174,18 @@ public class DzgzScheduledServer{
private
List
<
DzgzTaskResult
>
data
;
private
List
<
DzgzTaskResult
>
data
;
private
int
start
;
private
int
start
;
private
int
end
;
private
int
end
;
private
String
result_str
;
private
String
taskId
;
private
int
size
;
public
HandleThread
(
List
<
DzgzTaskResult
>
data
,
int
start
,
int
end
)
{
public
HandleThread
(
List
<
DzgzTaskResult
>
data
,
int
start
,
int
end
,
String
result_str
,
String
taskId
,
int
size
)
{
this
.
data
=
data
;
this
.
data
=
data
;
this
.
start
=
start
;
this
.
start
=
start
;
this
.
end
=
end
;
this
.
end
=
end
;
this
.
result_str
=
result_str
;
this
.
taskId
=
taskId
;
this
.
size
=
size
;
}
}
public
void
run
()
{
public
void
run
()
{
System
.
out
.
println
(
"进入电子固证保存的线程"
);
System
.
out
.
println
(
"进入电子固证保存的线程"
);
...
@@ -199,8 +206,15 @@ public class DzgzScheduledServer{
...
@@ -199,8 +206,15 @@ public class DzgzScheduledServer{
if
(
paramDzgzTaskResults
!=
null
&&
paramDzgzTaskResults
.
size
()
>
0
){
if
(
paramDzgzTaskResults
!=
null
&&
paramDzgzTaskResults
.
size
()
>
0
){
try
{
try
{
taskResultMapper
.
saveDzgzTaskResultBatch
(
paramDzgzTaskResults
);
taskResultMapper
.
saveDzgzTaskResultBatch
(
paramDzgzTaskResults
);
//查询保存的数量,如果数量与list的数量相等,则更新保存的状态
int
count
=
taskResultMapper
.
getAllResultsByTaskid
(
taskId
);
if
(
count
==
size
){
updateTaskStates
(
taskId
,
"1"
,
"FINISHED"
,
null
);
taskResultMapper
.
deleteRepeatDzgzTaskResult
(
taskId
);
//删除指定task_id重复的电子固证结果数据
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"电子固证数据保存失败!!!"
);
System
.
out
.
println
(
"电子固证数据保存失败!!!"
);
updateTaskStates
(
taskId
,
"2"
,
"STARTING"
,
result_str
);
//保存失败将标志位置为2---表示正在入库
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
...
@@ -347,7 +361,7 @@ public class DzgzScheduledServer{
...
@@ -347,7 +361,7 @@ public class DzgzScheduledServer{
/**
/**
* 进行案前踩点与案后分析模型的分析
* 进行案前踩点与案后分析模型的分析
*/
*/
@Scheduled
(
initialDelay
=
60000
,
fixedDelay
=
180000
)
//项目启动后延迟1分钟执行,每次执行完后三
分钟后再次执行
@Scheduled
(
initialDelay
=
60000
,
fixedDelay
=
60000
)
//项目启动后延迟1分钟执行,每次执行完后一
分钟后再次执行
public
void
getTaskResult
(){
public
void
getTaskResult
(){
System
.
out
.
println
(
"=============AJDZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============AJDZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============AJDZGZ Thread startting ==============="
);
System
.
out
.
println
(
"=============AJDZGZ Thread startting ==============="
);
...
...
src/main/java/com/founder/interservice/mapper/xzxt/DzgzTaskResultMapper.java
View file @
a724ae4b
...
@@ -24,4 +24,6 @@ public interface DzgzTaskResultMapper {
...
@@ -24,4 +24,6 @@ public interface DzgzTaskResultMapper {
List
<
String
>
getAllImsiResultsByTaskid
(
String
taskId
);
List
<
String
>
getAllImsiResultsByTaskid
(
String
taskId
);
void
deleteRepeatDzgzTaskResult
(
String
type
);
void
deleteRepeatDzgzTaskResult
(
String
type
);
int
getAllResultsByTaskid
(
String
taskId
);
}
}
src/main/java/com/founder/interservice/mapper/xzxt/RyhxMapper.java
View file @
a724ae4b
...
@@ -7,13 +7,18 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -7,13 +7,18 @@ import org.apache.ibatis.annotations.Mapper;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
@Repository
@Repository
public
interface
RyhxMapper
{
public
interface
RyhxMapper
{
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotelData
queryHotelDetail
(
String
hotelno
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelDetail
(
Map
map
)
throws
Exception
;
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
;
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
)
;
}
}
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
View file @
a724ae4b
...
@@ -7,11 +7,16 @@ import com.founder.interservice.VO.ResultVO;
...
@@ -7,11 +7,16 @@ import com.founder.interservice.VO.ResultVO;
import
com.founder.interservice.enums.ResultEnum
;
import
com.founder.interservice.enums.ResultEnum
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.protogenesis.service.ProtoService
;
import
com.founder.interservice.protogenesis.service.ProtoService
;
import
com.founder.interservice.regionalanalysis.model.Regional
;
import
com.founder.interservice.regionalanalysis.model.RegionalTask
;
import
com.founder.interservice.regionalanalysis.service.RegionalAnalysisService
;
import
com.founder.interservice.util.DateUtil
;
import
com.founder.interservice.util.DateUtil
;
import
com.founder.interservice.util.KeyUtil
;
import
com.founder.interservice.util.ResultVOUtil
;
import
com.founder.interservice.util.ResultVOUtil
;
import
com.founder.interservice.util.StringUtil
;
import
com.founder.interservice.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
@@ -19,6 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -19,6 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -31,6 +37,8 @@ public class ProtoController {
...
@@ -31,6 +37,8 @@ public class ProtoController {
@Autowired
@Autowired
private
ProtoService
protoService
;
private
ProtoService
protoService
;
@Autowired
private
RegionalAnalysisService
regionalAnalysisService
;
/**
/**
* 获取关联关系接口
* 获取关联关系接口
...
@@ -265,12 +273,69 @@ public class ProtoController {
...
@@ -265,12 +273,69 @@ public class ProtoController {
ResultVO
resultVO
=
null
;
ResultVO
resultVO
=
null
;
try
{
try
{
String
result
=
protoService
.
doPostWaData
(
"multiRegionalsAnalyseTask"
,
param
);
String
result
=
protoService
.
doPostWaData
(
"multiRegionalsAnalyseTask"
,
param
);
saveRegionalTask
(
param
,
result
);
resultVO
=
ResultVOUtil
.
success
(
result
);
resultVO
=
ResultVOUtil
.
success
(
result
);
}
catch
(
InterServiceException
e
){
}
catch
(
InterServiceException
e
){
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
null
);
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
null
);
}
}
return
resultVO
;
return
resultVO
;
}
}
/**
* 保存多区域任务信息
* @param param
* @param result
*/
public
void
saveRegionalTask
(
String
param
,
String
result
){
try
{
if
(!
StringUtils
.
isEmpty
(
result
)
&&
result
.
contains
(
"{"
))
{
JSONObject
resultObject
=
JSONObject
.
parseObject
(
result
);
if
(
null
!=
resultObject
&&
resultObject
.
containsKey
(
"data"
)&&
null
!=
resultObject
.
get
(
"data"
))
{
String
taskId
=
resultObject
.
get
(
"data"
).
toString
();
JSONObject
paramObject
=
JSONObject
.
parseObject
(
param
);
RegionalTask
regionalTask
=
new
RegionalTask
();
List
<
Regional
>
regionalList
=
null
;
regionalTask
.
setTaskId
(
taskId
);
regionalTask
.
setTaskName
(
paramObject
.
getString
(
"taskName"
));
regionalTask
.
setTaskCaseId
(
paramObject
.
getString
(
"taskCaseId"
));
regionalTask
.
setDjsj
(
new
Date
());
regionalTask
.
setProgress
(
"0"
);
regionalTask
.
setState
(
"QUEUEING"
);
if
(
paramObject
!=
null
)
{
JSONObject
jsonObject1
=
paramObject
.
getJSONObject
(
"perform"
);
if
(
jsonObject1
!=
null
)
{
regionalTask
.
setExpression
(
jsonObject1
.
getString
(
"expression"
));
JSONArray
jsonArray
=
jsonObject1
.
getJSONArray
(
"regional"
);
if
(
jsonArray
!=
null
&&
!
jsonArray
.
isEmpty
())
{
regionalList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<=
jsonArray
.
size
()
-
1
;
i
++)
{
JSONObject
object
=
jsonArray
.
getJSONObject
(
i
);
if
(
object
!=
null
)
{
Regional
regional
=
new
Regional
();
regional
.
setTaskId
(
taskId
);
regional
.
setDjsj
(
new
Date
());
regional
.
setRegionalId
(
KeyUtil
.
getUniqueKey
(
"RT"
));
regional
.
setName
(
object
.
getString
(
"name"
));
regional
.
setLc
(
object
.
getJSONArray
(
"lc"
).
toJSONString
());
regional
.
setSource
(
object
.
getJSONArray
(
"source"
).
toJSONString
());
regional
.
setStartTime
(
new
Date
(
object
.
getLong
(
"startTime"
)));
regional
.
setEndTime
(
new
Date
(
object
.
getLong
(
"endTime"
)));
regionalList
.
add
(
regional
);
}
}
}
regionalTask
.
setRegionals
(
regionalList
);
}
}
if
(
regionalTask
!=
null
)
{
regionalAnalysisService
.
saveRegionalTask
(
regionalTask
);
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
//多区域碰撞分析统计-获取结果
//多区域碰撞分析统计-获取结果
@RequestMapping
(
value
=
"/getMultiRegionalsAnalyTask"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getMultiRegionalsAnalyTask"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
@ResponseBody
...
...
src/main/java/com/founder/interservice/regionalanalysis/service/impl/ScheduledService.java
View file @
a724ae4b
...
@@ -9,10 +9,9 @@ import com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail;
...
@@ -9,10 +9,9 @@ import com.founder.interservice.regionalanalysis.model.RegionalTaskResultDetail;
import
com.founder.interservice.regionalanalysis.repository.RegionalTaskRepository
;
import
com.founder.interservice.regionalanalysis.repository.RegionalTaskRepository
;
import
com.founder.interservice.regionalanalysis.repository.RegionalTaskResultRepository
;
import
com.founder.interservice.regionalanalysis.repository.RegionalTaskResultRepository
;
import
com.founder.interservice.regionalanalysis.service.RegionalAnalysisService
;
import
com.founder.interservice.regionalanalysis.service.RegionalAnalysisService
;
import
com.founder.interservice.service.
IphoneTrack
Service
;
import
com.founder.interservice.service.
PushWaData
Service
;
import
com.founder.interservice.util.*
;
import
com.founder.interservice.util.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
@@ -32,19 +31,14 @@ import java.util.*;
...
@@ -32,19 +31,14 @@ import java.util.*;
@Async
@Async
public
class
ScheduledService
{
public
class
ScheduledService
{
@Value
(
value
=
"${wabigdata.regionalAnalysisTaskStatus.url}"
)
@Autowired
private
String
REGIONAL_ANALYSIS_TASK_STATUS
;
//获取任务状态
private
PushWaDataService
pushWaDataService
;
@Value
(
value
=
"${wabigdata.regionalAnalysisTaskInfo.url}"
)
private
String
REGIONAL_ANALYSIS_TASK_INFO
;
//获取任务结果
@Autowired
@Autowired
private
RegionalAnalysisService
regionalAnalysisService
;
private
RegionalAnalysisService
regionalAnalysisService
;
@Autowired
@Autowired
private
RegionalTaskRepository
regionalTaskRepository
;
private
RegionalTaskRepository
regionalTaskRepository
;
@Autowired
@Autowired
private
RegionalTaskResultRepository
taskResultRepository
;
private
RegionalTaskResultRepository
taskResultRepository
;
@Autowired
private
IphoneTrackService
iphoneTrackService
;
//调取网安数据接口
/**
/**
*
*
...
@@ -76,17 +70,14 @@ public class ScheduledService {
...
@@ -76,17 +70,14 @@ public class ScheduledService {
System
.
out
.
println
(
"taskList====================================="
+
taskList
);
System
.
out
.
println
(
"taskList====================================="
+
taskList
);
if
(
taskList
!=
null
&&
!
taskList
.
isEmpty
()){
if
(
taskList
!=
null
&&
!
taskList
.
isEmpty
()){
String
taskId
=
null
,
progress
=
null
,
state
=
null
,
result
=
null
;
Map
<
String
,
String
>
taskMap
=
null
;
String
taskId
=
null
,
progress
=
null
,
state
=
null
,
result
=
null
;
Map
<
String
,
String
>
taskMap
=
null
;
for
(
RegionalTask
task:
taskList
)
{
for
(
RegionalTask
task:
taskList
)
{
taskId
=
task
.
getTaskId
();
taskId
=
task
.
getTaskId
();
//查询比对结果状态
//查询比对结果状态
taskMap
=
queryTaskStates
(
taskId
);
taskMap
=
this
.
queryTaskStates
(
taskId
);
progress
=
taskMap
.
get
(
"progress"
);
progress
=
taskMap
.
get
(
"progress"
);
state
=
taskMap
.
get
(
"state"
);
state
=
taskMap
.
get
(
"state"
);
if
(
"1"
.
equals
(
progress
)
&&
"FINISHED"
.
equals
(
state
)){
if
(
"1"
.
equals
(
progress
)
&&
"FINISHED"
.
equals
(
state
)){
String
info_url
=
REGIONAL_ANALYSIS_TASK_INFO
+
"&taskId="
+
taskId
;
String
taskInfoResult
=
pushWaDataService
.
getRegionalTaskInfo
(
taskId
);
String
taskInfoResult
=
HttpUtil
.
getWaData
(
info_url
);
//String taskInfoResult = "{\"results\":[],\"status\":\"ok\"}";
//调取结果成功 然后将结果保存入库
//调取结果成功 然后将结果保存入库
if
(!
taskInfoResult
.
startsWith
(
"Rate"
)){
if
(!
taskInfoResult
.
startsWith
(
"Rate"
)){
if
(
null
!=
taskInfoResult
&&
taskInfoResult
.
startsWith
(
"{"
)){
if
(
null
!=
taskInfoResult
&&
taskInfoResult
.
startsWith
(
"{"
)){
...
@@ -103,6 +94,30 @@ public class ScheduledService {
...
@@ -103,6 +94,30 @@ public class ScheduledService {
}
}
/**
/**
* 调用新版接口获取任务状态
* @param taskId
* @return
*/
public
Map
<
String
,
String
>
queryTaskStates
(
String
taskId
){
JSONObject
jsonObject
=
null
;
String
progress
=
null
,
state
=
null
;
Map
<
String
,
String
>
map
=
new
HashMap
();
String
result
=
pushWaDataService
.
pushTaskStatus
(
taskId
,
0
);
if
(
null
!=
result
&&
result
.
startsWith
(
"{"
)){
jsonObject
=
JSONObject
.
parseObject
(
result
);
}
if
(
jsonObject
!=
null
){
JSONObject
JSONObjectData
=
jsonObject
.
getJSONObject
(
"data"
);
progress
=
JSONObjectData
.
getString
(
"progress"
);
//进度
state
=
JSONObjectData
.
getString
(
"state"
);
//状态
}
map
.
put
(
"progress"
,
progress
);
map
.
put
(
"state"
,
state
);
return
map
;
}
/**
* 第二步,调取标识号的关联信息
* 第二步,调取标识号的关联信息
* 1.将比对碰撞首次调取标识号成功的任务过滤出来即状态位为FINISHED的
* 1.将比对碰撞首次调取标识号成功的任务过滤出来即状态位为FINISHED的
* 2.开启新线程调取标识号的关联数据
* 2.开启新线程调取标识号的关联数据
...
@@ -123,9 +138,6 @@ public class ScheduledService {
...
@@ -123,9 +138,6 @@ public class ScheduledService {
return
criteriaQuery
.
getRestriction
();
return
criteriaQuery
.
getRestriction
();
}
}
});
});
System
.
out
.
println
(
"开始查询ddddd============================================================"
);
System
.
out
.
println
(
taskList
);
if
(
taskList
!=
null
&&
!
taskList
.
isEmpty
()){
if
(
taskList
!=
null
&&
!
taskList
.
isEmpty
()){
for
(
RegionalTask
task:
taskList
)
{
for
(
RegionalTask
task:
taskList
)
{
List
<
RegionalTaskResult
>
taskResults
=
taskResultRepository
.
findAllByTaskId
(
task
.
getTaskId
());
List
<
RegionalTaskResult
>
taskResults
=
taskResultRepository
.
findAllByTaskId
(
task
.
getTaskId
());
...
@@ -138,14 +150,6 @@ public class ScheduledService {
...
@@ -138,14 +150,6 @@ public class ScheduledService {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
/**
/**
* 通过区域碰撞的结果 使用第四个接口调取关联数据
* 通过区域碰撞的结果 使用第四个接口调取关联数据
*/
*/
...
@@ -159,8 +163,13 @@ public class ScheduledService {
...
@@ -159,8 +163,13 @@ public class ScheduledService {
if
(
objValue
!=
null
&&
!
""
.
equals
(
objValue
))
{
if
(
objValue
!=
null
&&
!
""
.
equals
(
objValue
))
{
//MAC地址、用户名、淘宝旺旺号不去调取关联数据,其它类型都使用第四个接口调取
//MAC地址、用户名、淘宝旺旺号不去调取关联数据,其它类型都使用第四个接口调取
if
(!
Arrays
.
asList
(
"4329"
,
"4342"
,
"45282"
).
contains
(
objType
))
{
if
(!
Arrays
.
asList
(
"4329"
,
"4342"
,
"45282"
).
contains
(
objType
))
{
JSONObject
jsonObj
=
iphoneTrackService
.
getObjectRelationAll
(
objValue
);
//使用网安第三个接口调取关联数据
JSONObject
jsonObj
=
null
;
if
(
jsonObj
!=
null
&&
!
jsonObj
.
isEmpty
())
{
//说明根节点是身份证号
String
relationAll
=
pushWaDataService
.
pushRelationAll
(
DateUtil
.
getYYYYMMDDHHMM
(),
DateUtil
.
getYYYYMMDDHHMM
(),
"admin"
,
objValue
,
3
);
if
(
null
!=
relationAll
&&
relationAll
.
startsWith
(
"{"
)){
JSONObject
json
=
JSONObject
.
parseObject
(
relationAll
);
jsonObj
=
json
.
getJSONObject
(
"data"
);
}
if
(
jsonObj
!=
null
&&
!
jsonObj
.
isEmpty
())
{
RegionalTaskResultDetail
detail
=
new
RegionalTaskResultDetail
();
RegionalTaskResultDetail
detail
=
new
RegionalTaskResultDetail
();
detail
.
setTaskResultId
(
result
.
getXXZJBH
());
detail
.
setTaskResultId
(
result
.
getXXZJBH
());
detail
.
setXXZJBH
(
KeyUtil
.
getUniqueKey
(
"EDZ"
));
detail
.
setXXZJBH
(
KeyUtil
.
getUniqueKey
(
"EDZ"
));
...
@@ -235,7 +244,7 @@ public class ScheduledService {
...
@@ -235,7 +244,7 @@ public class ScheduledService {
public
void
getAndSaveInfo
(
String
taskInfoResult
,
RegionalTask
task
)
throws
RuntimeException
{
public
void
getAndSaveInfo
(
String
taskInfoResult
,
RegionalTask
task
)
throws
RuntimeException
{
try
{
try
{
JSONObject
o
=
JSONObject
.
parseObject
(
taskInfoResult
);
JSONObject
o
=
JSONObject
.
parseObject
(
taskInfoResult
);
JSONArray
jsonArray
=
o
.
getJSONArray
(
"results"
);
JSONArray
jsonArray
=
o
.
getJSON
Object
(
"data"
).
getJSON
Array
(
"results"
);
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
){
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
){
List
<
RegionalTaskResult
>
taskResults
=
jsonArray
.
toJavaList
(
RegionalTaskResult
.
class
);
List
<
RegionalTaskResult
>
taskResults
=
jsonArray
.
toJavaList
(
RegionalTaskResult
.
class
);
taskResults
=
removeDuplicate
(
taskResults
);
taskResults
=
removeDuplicate
(
taskResults
);
...
@@ -260,33 +269,6 @@ public class ScheduledService {
...
@@ -260,33 +269,6 @@ public class ScheduledService {
}
}
}
}
/**
* 查询任务状态
* @param taskId
* @return
*/
public
Map
<
String
,
String
>
queryTaskStates
(
String
taskId
){
JSONObject
jsonObject
=
null
;
String
progress
=
null
,
state
=
null
;
Map
<
String
,
String
>
map
=
new
HashMap
();
String
status_url
=
REGIONAL_ANALYSIS_TASK_STATUS
+
"&taskId="
+
taskId
;
String
result
=
HttpUtil
.
getWaData
(
status_url
);
//String statusStr = "{\"progress\":0.8,\"state\":\"TIMEOUT\"}";
if
(
null
!=
result
&&
result
.
startsWith
(
"{"
)){
jsonObject
=
JSONObject
.
parseObject
(
result
);
}
if
(
jsonObject
!=
null
){
progress
=
jsonObject
.
getString
(
"progress"
);
//进度
state
=
jsonObject
.
getString
(
"state"
);
//状态
}
map
.
put
(
"progress"
,
progress
);
map
.
put
(
"state"
,
state
);
return
map
;
}
/**
/**
* 去除重复数据
* 去除重复数据
* @param list
* @param list
...
...
src/main/java/com/founder/interservice/ryhx/controller/RyhxController.java
View file @
a724ae4b
...
@@ -9,6 +9,7 @@ import com.founder.interservice.model.SysDictitem;
...
@@ -9,6 +9,7 @@ import com.founder.interservice.model.SysDictitem;
import
com.founder.interservice.ryhx.model.TbStAsjAssist
;
import
com.founder.interservice.ryhx.model.TbStAsjAssist
;
import
com.founder.interservice.ryhx.model.TbStCqhotel
;
import
com.founder.interservice.ryhx.model.TbStCqhotel
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
com.founder.interservice.ryhx.model.TbStCqhotelData
;
import
com.founder.interservice.ryhx.model.TbStCqwbdata
;
import
com.founder.interservice.ryhx.service.RyhxService
;
import
com.founder.interservice.ryhx.service.RyhxService
;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
com.founder.interservice.service.DataService
;
import
com.founder.interservice.service.DataService
;
...
@@ -121,47 +122,69 @@ public class RyhxController {
...
@@ -121,47 +122,69 @@ public class RyhxController {
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
return
modelAndView
;
return
modelAndView
;
}
}
/*旅店信息查询
/**
查询表为TB_ST_CQHOTELDATA
* 旅店信息查询
网吧信息查询
* 查询表为TB_ST_CQHOTELDATA
查询表为TB_ST_CQWBDATA
* 网吧信息查询
* */
* 查询表为TB_ST_CQWBDATA
*
* 同房间人,查询当天,同住一个房间的人
* 网吧信息,查所有上网记录
* @param zjhm 身份证号
* @return
*/
@RequestMapping
(
value
=
"/getLdjbxx"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getLdjbxx"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
ModelAndView
getLdjbxx
(
String
zjhm
){
public
ModelAndView
getLdjbxx
(
String
zjhm
){
TbStCqhotelData
tbStCqhotelData
=
null
;
TbStCqhotel
tbStCqhotel
=
null
;
TbStCqhotel
tbStCqhotel
=
null
;
List
<
TbStCqhotel
>
listHotel
=
new
ArrayList
<>();
SysDictitem
sysDictitem
=
new
SysDictitem
();
SysDictitem
sysDictitem
=
new
SysDictitem
();
TbStCqwbdataVOS
tbStCqwbdataVOS
=
null
;
List
<
TbStCqwbdata
>
tbStCqwbdataList
=
null
;
//本人上网信息
List
<
TbStCqhotelData
>
listHotelData
=
null
;
//本人住店信息
List
<
TbStCqhotelData
>
listOtherHotelData
=
null
;
//本人同住人信息
try
{
try
{
if
(
zjhm
!=
null
&&
!
""
.
equals
(
zjhm
)){
if
(
zjhm
!=
null
&&
!
""
.
equals
(
zjhm
)){
String
idcode
=
zjhm
;
//旅店住宿信息
//旅店信息
listHotelData
=
ryhxService
.
queryHotelRzxx
(
zjhm
);
tbStCqhotelData
=
ryhxService
.
queryHotelxx
(
idcode
);
if
(
listHotelData
!=
null
&&
listHotelData
.
size
()
>
0
)
{
String
hotelno
=
tbStCqhotelData
.
getHotelno
();
for
(
TbStCqhotelData
tbStCqhotelData:
listHotelData
)
{
//疑似落脚点
String
hotelno
=
tbStCqhotelData
.
getHotelno
();
if
(
hotelno
!=
null
&&
!
""
.
equals
(
hotelno
)){
String
rzsj
=
tbStCqhotelData
.
getRzsj
();
tbStCqhotel
=
ryhxService
.
queryHotelAddr
(
hotelno
);
String
roomno
=
tbStCqhotelData
.
getRoomno
();
//疑似落脚点(旅店信息)
if
(
null
!=
hotelno
&&
!
""
.
equals
(
hotelno
))
{
tbStCqhotel
=
ryhxService
.
queryHotelAddr
(
hotelno
);
listHotel
.
add
(
tbStCqhotel
);
}
//根据旅店信息,查询同住人员信息
if
(
null
!=
tbStCqhotel
)
{
listOtherHotelData
=
ryhxService
.
queryHotelxx
(
zjhm
,
hotelno
,
rzsj
,
roomno
);
}
}
}
}
//网吧信息
//网吧信息
tbStCqwbdataVOS
=
ryhxService
.
queryWbxx
(
zjhm
);
tbStCqwbdataList
=
ryhxService
.
queryWbxxList
(
zjhm
);
if
(
tbStCqwbdataVOS
!=
null
)
{
if
(
tbStCqwbdataList
!=
null
&&
tbStCqwbdataList
.
size
()
>
0
)
{
String
wbxzqh
=
tbStCqwbdataVOS
.
getWbxzqh
();
for
(
TbStCqwbdata
tbStCqwbdata
:
tbStCqwbdataList
)
{
sysDictitem
.
setCode
(
wbxzqh
);
String
wbxzqh
=
tbStCqwbdata
.
getWbxzqh
();
sysDictitem
.
setGroupid
(
"CODE_UNIT"
);
sysDictitem
.
setCode
(
wbxzqh
);
if
(
wbxzqh
!=
null
&&
!
""
.
equals
(
wbxzqh
))
{
sysDictitem
.
setGroupid
(
"CODE_UNIT"
);
String
wbxzqhmc
=
sysDictService
.
getCodeName
(
sysDictitem
);
if
(
wbxzqh
!=
null
&&
!
""
.
equals
(
wbxzqh
))
{
tbStCqwbdataVOS
.
setWbxzqhmc
(
wbxzqhmc
);
String
wbxzqhmc
=
sysDictService
.
getCodeName
(
sysDictitem
);
tbStCqwbdata
.
setWbxzqhmc
(
wbxzqhmc
);
}
}
}
}
}
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
ModelAndView
modelAndView
=
new
ModelAndView
(
"ryhx/gjxx"
);
ModelAndView
modelAndView
=
new
ModelAndView
();
modelAndView
.
setViewName
(
"ryhx/gjxx"
);
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
modelAndView
.
addObject
(
"zjhm"
,
zjhm
);
modelAndView
.
addObject
(
"hotel"
,
tbStCqhotelData
);
modelAndView
.
addObject
(
"listOtherHotelData"
,
listOtherHotelData
);
//同住人员住宿信息
modelAndView
.
addObject
(
"hotela"
,
tbStCqhotel
);
modelAndView
.
addObject
(
"listHotel"
,
listHotel
);
//本人住宿的酒店信息
modelAndView
.
addObject
(
"wbxx"
,
tbStCqwbdataVOS
);
modelAndView
.
addObject
(
"listHotelData"
,
listHotelData
);
//本人住宿信息
modelAndView
.
addObject
(
"wbxxList"
,
tbStCqwbdataList
);
//本人网吧信息
return
modelAndView
;
return
modelAndView
;
}
}
...
...
src/main/java/com/founder/interservice/ryhx/model/TbStCqhotelData.java
View file @
a724ae4b
...
@@ -38,4 +38,7 @@ public class TbStCqhotelData {
...
@@ -38,4 +38,7 @@ public class TbStCqhotelData {
private
String
gxsj
;
//更新时间
private
String
gxsj
;
//更新时间
private
String
rzsj
;
//入住时间
private
String
ldsj
;
//离店时间
}
}
\ No newline at end of file
src/main/java/com/founder/interservice/ryhx/service/RyhxService.java
View file @
a724ae4b
...
@@ -6,6 +6,9 @@ import com.founder.interservice.ryhx.model.TbStCqwbdata;
...
@@ -6,6 +6,9 @@ import com.founder.interservice.ryhx.model.TbStCqwbdata;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
com.founder.interservice.ryhx.vo.TbStCqwbdataVOS
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @ClassName: RyhxService
* @ClassName: RyhxService
* @Auther: 朱琳瑛
* @Auther: 朱琳瑛
...
@@ -17,9 +20,11 @@ public interface RyhxService {
...
@@ -17,9 +20,11 @@ public interface RyhxService {
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
;
TbStCqhotelData
queryHotelxx
(
String
idcode
)
throws
Exception
;
List
<
TbStCqhotelData
>
queryHotelxx
(
String
zjhm
,
String
hotelno
,
String
rzsj
,
String
roomno
)
throws
Exception
;
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
;
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
;
String
getAsjxxList
(
String
ryhxSaxxUrl
,
String
zjhm
);
String
getAsjxxList
(
String
ryhxSaxxUrl
,
String
zjhm
);
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
);
}
}
src/main/java/com/founder/interservice/ryhx/service/impl/RyhxServiceImpl.java
View file @
a724ae4b
...
@@ -10,29 +10,41 @@ import com.founder.interservice.util.HttpUtil;
...
@@ -10,29 +10,41 @@ import com.founder.interservice.util.HttpUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Service
public
class
RyhxServiceImpl
implements
RyhxService
{
public
class
RyhxServiceImpl
implements
RyhxService
{
@Autowired
@Autowired
private
RyhxMapper
ryhxMapper
;
private
RyhxMapper
ryhxMapper
;
/*根据
证
旅店编号查询旅店地址*/
/*根据旅店编号查询旅店地址*/
@Override
@Override
public
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
{
public
TbStCqhotel
queryHotelAddr
(
String
hotelno
)
throws
Exception
{
TbStCqhotel
tbStCqhotel
=
ryhxMapper
.
queryHotelAddr
(
hotelno
);
TbStCqhotel
tbStCqhotel
=
ryhxMapper
.
queryHotelAddr
(
hotelno
);
return
tbStCqhotel
;
return
tbStCqhotel
;
}
}
/*根据旅店编号查找旅店
详细
信息*/
/*根据旅店编号查找旅店
所有同房间人员住宿
信息*/
@Override
@Override
public
TbStCqhotelData
queryHotelxx
(
String
idcode
)
throws
Exception
{
public
List
<
TbStCqhotelData
>
queryHotelxx
(
String
zjhm
,
String
hotelno
,
String
rzsj
,
String
roomno
)
throws
Exception
{
TbStCqhotelData
tbStCqhotelData
=
ryhxMapper
.
queryHotelDetail
(
idcode
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
return
tbStCqhotelData
;
map
.
put
(
"zjhm"
,
zjhm
);
map
.
put
(
"hotelno"
,
hotelno
);
if
(
null
!=
rzsj
&&
!
""
.
equals
(
rzsj
)){
rzsj
=
rzsj
.
substring
(
0
,
10
);
}
map
.
put
(
"rzsj"
,
rzsj
);
map
.
put
(
"roomno"
,
roomno
);
List
<
TbStCqhotelData
>
tbStCqhotelDataList
=
ryhxMapper
.
queryHotelDetail
(
map
);
return
tbStCqhotelDataList
;
}
}
/*根据证件号码查询网吧表网吧信息*/
/*根据证件号码查询网吧表网吧信息*/
@Override
@Override
public
TbStCqwbdataVOS
queryWbxx
(
String
zjhm
)
throws
Exception
{
public
List
<
TbStCqwbdata
>
queryWbxxList
(
String
zjhm
)
throws
Exception
{
TbStCqwbdataVOS
tbStCqwbdataVOS
=
ryhxMapper
.
queryWbxx
(
zjhm
);
List
<
TbStCqwbdata
>
tbStCqwbdataList
=
ryhxMapper
.
queryWbxxList
(
zjhm
);
return
tbStCqwbdata
VOS
;
return
tbStCqwbdata
List
;
}
}
@Override
@Override
...
@@ -47,4 +59,10 @@ public class RyhxServiceImpl implements RyhxService {
...
@@ -47,4 +59,10 @@ public class RyhxServiceImpl implements RyhxService {
}
}
return
jsonStr
;
return
jsonStr
;
}
}
@Override
public
List
<
TbStCqhotelData
>
queryHotelRzxx
(
String
zjhm
)
{
List
<
TbStCqhotelData
>
tbStCqhotelDataRzxxList
=
ryhxMapper
.
queryHotelRzxx
(
zjhm
);
return
tbStCqhotelDataRzxxList
;
}
}
}
src/main/resources/mybatis/mapper/xzxt/DzgzTaskResultMapper.xml
View file @
a724ae4b
...
@@ -177,4 +177,10 @@
...
@@ -177,4 +177,10 @@
group by TASK_ID, OBJECT_TYPE, OBJECT_VALUE
group by TASK_ID, OBJECT_TYPE, OBJECT_VALUE
having count(*) > 1 )
having count(*) > 1 )
</delete>
</delete>
<select
id =
"getAllResultsByTaskid"
parameterType =
"String"
resultType=
"int"
>
select count(*)
from TB_ST_DZGZTASKRESULT
where TASK_ID = #{taskId}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/xzxt/RyhxMapper.xml
View file @
a724ae4b
...
@@ -3,34 +3,34 @@
...
@@ -3,34 +3,34 @@
<mapper
namespace=
"com.founder.interservice.mapper.xzxt.RyhxMapper"
>
<mapper
namespace=
"com.founder.interservice.mapper.xzxt.RyhxMapper"
>
<sql
id =
"getHoteldetail_where"
>
<sql
id =
"getHoteldetail_where"
>
<if
test=
"xxzjbh != null and xxzjbh != ''"
>
<if
test=
"xxzjbh != null and xxzjbh != ''"
>
and xxzjbh = #{xxzjbh}
and xxzjbh = #{xxzjbh
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"xm != null and xm != ''"
>
<if
test=
"xm != null and xm != ''"
>
and xm = #{xm}
and xm = #{xm
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"py != null and py != ''"
>
<if
test=
"py != null and py != ''"
>
and py = #{py}
and py = #{py
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"idcode != null and idcode != ''"
>
<if
test=
"idcode != null and idcode != ''"
>
and idcode = #{idcode}
and idcode = #{idcode
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"csrq != null and csrq != ''"
>
<if
test=
"csrq != null and csrq != ''"
>
and csrq = #{csrq}
and csrq = #{csrq}
</if>
</if>
<if
test=
"xb != null and xb != ''"
>
<if
test=
"xb != null and xb != ''"
>
and xb = #{xb}
and xb = #{xb
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"mz != null and mz != ''"
>
<if
test=
"mz != null and mz != ''"
>
and mz = #{mz}
and mz = #{mz
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"address != null and address != ''"
>
<if
test=
"address != null and address != ''"
>
and address = #{address}
and address = #{address
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"hotelno != null and hotelno != ''"
>
<if
test=
"hotelno != null and hotelno != ''"
>
and hotelno = #{hotelno}
and hotelno = #{hotelno
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"roomno != null and roomno != ''"
>
<if
test=
"roomno != null and roomno != ''"
>
and roomno = #{roomno}
and roomno = #{roomno
, jdbcType=VARCHAR
}
</if>
</if>
<if
test=
"createtime != null and createtime != ''"
>
<if
test=
"createtime != null and createtime != ''"
>
and createtime = #{createtime}
and createtime = #{createtime}
...
@@ -60,23 +60,70 @@
...
@@ -60,23 +60,70 @@
gxsj as gxsj,
gxsj as gxsj,
rksj as rksj
rksj as rksj
from TB_ST_CQHOTEL
from TB_ST_CQHOTEL
where HNO = #{hotelno}
where HNO = #{hotelno
, jdbcType=VARCHAR
}
</select>
</select>
<select
id=
"queryHotelDetail"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select
<!-- 查询某旅店所有同住人员住店信息 -->
<select
id=
"queryHotelDetail"
parameterType=
"java.util.Map"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select xxzjbh as xxzjbh,
xm as xm,
py as py,
idcode as idcode,
to_char(csrq,'yyyy-MM-dd hh24:mi:ss') as csrq,
xb as xb,
mz as mz,
address as address,
hotelno as hotelno,
roomno as roomno,
to_char(createtime,'yyyy-MM-dd hh24:mi:ss') as createtime,
to_char(rksj,'yyyy-MM-dd hh24:mi:ss') as rksj,
to_char(gxsj,'yyyy-MM-dd hh24:mi:ss') as gxsj,
to_char(rzsj,'yyyy-MM-dd hh24:mi:ss') as rzsj,
to_char(ldsj,'yyyy-MM-dd hh24:mi:ss') as ldsj
from TB_ST_CQHOTELDATA
where 1=1
<if
test=
"zjhm != null and zjhm != ''"
>
and IDCODE
<![CDATA[!=]]>
#{zjhm, jdbcType=VARCHAR}
</if>
<if
test=
"hotelno != null and hotelno != ''"
>
and HOTELNO = #{hotelno, jdbcType=VARCHAR}
</if>
<if
test=
"roomno != null and roomno != ''"
>
and ROOMNO = #{roomno, jdbcType=VARCHAR}
</if>
<if
test=
"rzsj!=null and rzsj!=''"
>
and RZSJ
<![CDATA[>=]]>
(to_date(#{rzsj, jdbcType=VARCHAR},'yyyy-MM-dd') - numtodsinterval(10,'hour'))
and RZSJ
<![CDATA[<=]]>
(to_date(#{rzsj, jdbcType=VARCHAR},'yyyy-MM-dd') + numtodsinterval(14,'hour'))
</if>
</select>
<!-- 查询本人所有旅店入住信息-->
<select
id=
"queryHotelRzxx"
parameterType=
"java.util.Map"
resultType=
"com.founder.interservice.ryhx.model.TbStCqhotelData"
>
select xxzjbh as xxzjbh,
xm as xm,
py as py,
idcode as idcode,
to_char(csrq,'yyyy-MM-dd hh24:mi:ss') as csrq,
xb as xb,
mz as mz,
address as address,
hotelno as hotelno,
hotelno as hotelno,
createtime as createtime,
roomno as roomno,
rksj as rksj,
to_char(createtime,'yyyy-MM-dd hh24:mi:ss') as createtime,
gxsj as gxsj
to_char(rksj,'yyyy-MM-dd hh24:mi:ss') as rksj,
to_char(gxsj,'yyyy-MM-dd hh24:mi:ss') as gxsj,
to_char(rzsj,'yyyy-MM-dd hh24:mi:ss') as rzsj,
to_char(ldsj,'yyyy-MM-dd hh24:mi:ss') as ldsj
from TB_ST_CQHOTELDATA
from TB_ST_CQHOTELDATA
where IDCODE = #{
idcode
}
where IDCODE = #{
zjhm, jdbcType=VARCHAR
}
</select>
</select>
<select
id=
"queryWbxx"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.vo.TbStCqwbdataVOS"
>
<select
id=
"queryWbxxList"
parameterType=
"String"
resultType=
"com.founder.interservice.ryhx.model.TbStCqwbdata"
>
select
select
wbmc as wbmc,
wbmc as wbmc,
wbxzqh as wbxzqh,
wbxzqh as wbxzqh,
wbdz as wbdz
wbdz as wbdz
from TB_ST_CQWBDATA
from TB_ST_CQWBDATA
where ZJHM = #{zjhm}
where ZJHM = #{zjhm
, jdbcType=VARCHAR
}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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