Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
常超
map-parent
Commits
8a5f334c
Commit
8a5f334c
authored
Sep 13, 2021
by
张永田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改成mongodb的数据库
parent
3fa296a4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
102 additions
and
36 deletions
+102
-36
service/es/src/main/java/com/founder/eszy/esExtract/EsTbZyCameraTranslation.java
+2
-2
serviceapi/peopleapi/pom.xml
+10
-0
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/dao/Car.java
+23
-0
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/service/PeopleService.java
+4
-1
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/service/impl/PeopleServiceImpl.java
+51
-29
serviceapi/peopleapi/src/main/resources/bootstrap.properties
+7
-4
serviceapi/pom.xml
+5
-0
No files found.
service/es/src/main/java/com/founder/eszy/esExtract/EsTbZyCameraTranslation.java
View file @
8a5f334c
...
@@ -64,8 +64,8 @@ public class EsTbZyCameraTranslation {
...
@@ -64,8 +64,8 @@ public class EsTbZyCameraTranslation {
//System.out.println("批量分流===========开始"+startnum+"===结束==="+endnum);
//System.out.println("批量分流===========开始"+startnum+"===结束==="+endnum);
List
<
TbZyCamera
>
list
=
tbZyCameraMapper
.
selectTbZyCameraList
(
receiving
);
List
<
TbZyCamera
>
list
=
tbZyCameraMapper
.
selectTbZyCameraList
(
receiving
);
System
.
out
.
println
(
"批量分流===========开始"
+
startnum
+
"===结束==="
+
endnum
+
"====总数"
+
list
.
size
());
System
.
out
.
println
(
"批量分流===========开始"
+
startnum
+
"===结束==="
+
endnum
+
"====总数"
+
list
.
size
());
//
HandleThread thread = new HandleThread(list,camera_index);
HandleThread
thread
=
new
HandleThread
(
list
,
camera_index
);
//
executorService1.execute(thread);
executorService1
.
execute
(
thread
);
}
}
return
null
;
return
null
;
}
}
...
...
serviceapi/peopleapi/pom.xml
View file @
8a5f334c
...
@@ -13,5 +13,14 @@
...
@@ -13,5 +13,14 @@
<build>
<build>
<finalName>
peopleapi
</finalName>
<finalName>
peopleapi
</finalName>
</build>
</build>
<dependencies>
<!-- 阿里云的时候使用-->
<!-- <dependency>-->
<!-- <groupId>com.alibaba</groupId>-->
<!-- <artifactId>druid</artifactId>-->
<!-- <version>1.1.10</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
</dependencies>
</project>
</project>
\ No newline at end of file
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/dao/Car.java
0 → 100644
View file @
8a5f334c
package
com
.
founder
.
peopleapi
.
dao
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
Car
{
private
String
ceco
;
private
String
cety
;
private
String
copl
;
private
Integer
coun
;
private
String
daso
;
private
String
deid
;
private
String
dtc
;
private
Date
fitm
;
private
Date
imtm
;
private
Date
latm
;
private
String
nm
;
private
String
remr
;
private
String
rver
;
private
String
sele
;
private
String
veco
;
}
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/service/PeopleService.java
View file @
8a5f334c
...
@@ -7,7 +7,7 @@ import java.util.List;
...
@@ -7,7 +7,7 @@ import java.util.List;
public
interface
PeopleService
{
public
interface
PeopleService
{
MapRestResult
getXsSfXx
(
String
objectType
,
String
objectValue
);
//
MapRestResult getXsSfXx(String objectType,String objectValue);
PeopleInfo
xsxxByZjhm
(
String
objectType
,
String
objectValue
);
PeopleInfo
xsxxByZjhm
(
String
objectType
,
String
objectValue
);
...
@@ -16,4 +16,7 @@ public interface PeopleService {
...
@@ -16,4 +16,7 @@ public interface PeopleService {
List
getSjSmInfo
(
String
objectType
,
String
objectValue
);
List
getSjSmInfo
(
String
objectType
,
String
objectValue
);
List
getXnXxInfo
(
String
objectType
,
String
objectValue
);
List
getXnXxInfo
(
String
objectType
,
String
objectValue
);
//新添加的方法根据车牌号返回身份证号码
MapRestResult
getXsSfXx
(
String
objectType
,
String
objectValue
);
}
}
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/service/impl/PeopleServiceImpl.java
View file @
8a5f334c
...
@@ -3,9 +3,14 @@ package com.founder.peopleapi.service.impl;
...
@@ -3,9 +3,14 @@ package com.founder.peopleapi.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.commonutils.peopleEntity.PeopleInfo
;
import
com.founder.commonutils.peopleEntity.PeopleInfo
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.peopleapi.dao.Car
;
import
com.founder.peopleapi.service.PeopleService
;
import
com.founder.peopleapi.service.PeopleService
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -19,37 +24,39 @@ public class PeopleServiceImpl implements PeopleService {
...
@@ -19,37 +24,39 @@ public class PeopleServiceImpl implements PeopleService {
@Autowired
@Autowired
MongoTemplate
mongoTemplate
;
@Autowired
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
/*objectType 01:车牌号 03:证件号 04:手机号 05:IMSI 06:QQ 07:微信 08:IMEI*/
/*objectType 01:车牌号 03:证件号 04:手机号 05:IMSI 06:QQ 07:微信 08:IMEI*/
@Override
//
@Override
public
MapRestResult
getXsSfXx
(
String
objectType
,
String
objectValue
)
{
//
public MapRestResult getXsSfXx(String objectType, String objectValue) {
List
resultList
=
new
ArrayList
();
//
List resultList = new ArrayList();
if
(
"01"
.
equals
(
objectType
))
{
//
if ("01".equals(objectType)) {
List
<
PeopleInfo
>
czList
=
getCarInfo
(
objectType
,
objectValue
);
//
List<PeopleInfo> czList = getCarInfo(objectType, objectValue);
for
(
PeopleInfo
peopleInfo
:
czList
)
{
//
for (PeopleInfo peopleInfo : czList) {
if
(
"03"
.
equals
(
peopleInfo
.
getObjectType
()))
{
//
if ("03".equals(peopleInfo.getObjectType())) {
PeopleInfo
peopleInfo1
=
xsxxByZjhm
(
peopleInfo
.
getObjectType
(),
peopleInfo
.
getObjectValue
());
//
PeopleInfo peopleInfo1 = xsxxByZjhm(peopleInfo.getObjectType(), peopleInfo.getObjectValue());
resultList
.
add
(
peopleInfo1
);
//
resultList.add(peopleInfo1);
}
//
}
}
//
}
}
else
if
(
"03"
.
equals
(
objectType
))
{
//
} else if ("03".equals(objectType)) {
PeopleInfo
peopleInfo
=
xsxxByZjhm
(
objectType
,
objectValue
);
//
PeopleInfo peopleInfo = xsxxByZjhm(objectType, objectValue);
resultList
.
add
(
peopleInfo
);
//
resultList.add(peopleInfo);
}
else
if
(
"04"
.
equals
(
objectType
))
{
//
} else if ("04".equals(objectType)) {
List
<
PeopleInfo
>
czList
=
getSjSmInfo
(
objectType
,
objectValue
);
//
List<PeopleInfo> czList = getSjSmInfo(objectType, objectValue);
for
(
PeopleInfo
peopleInfo
:
czList
)
{
//
for (PeopleInfo peopleInfo : czList) {
if
(
"03"
.
equals
(
peopleInfo
.
getObjectType
()))
{
//
if ("03".equals(peopleInfo.getObjectType())) {
PeopleInfo
peopleInfo1
=
xsxxByZjhm
(
peopleInfo
.
getObjectType
(),
peopleInfo
.
getObjectValue
());
//
PeopleInfo peopleInfo1 = xsxxByZjhm(peopleInfo.getObjectType(), peopleInfo.getObjectValue());
resultList
.
add
(
peopleInfo1
);
//
resultList.add(peopleInfo1);
}
//
}
}
//
}
}
else
{
//
} else {
return
MapRestResult
.
error
(
"无法查询此标识号类型"
);
//
return MapRestResult.error("无法查询此标识号类型");
}
//
}
//
return
MapRestResult
.
build
(
200
,
"成功获取虚实身份信息!"
,
resultList
);
//
return MapRestResult.build(200,"成功获取虚实身份信息!",resultList);
}
//
}
/*通过证件号获取各类信息*/
/*通过证件号获取各类信息*/
@Override
@Override
...
@@ -206,5 +213,20 @@ public class PeopleServiceImpl implements PeopleService {
...
@@ -206,5 +213,20 @@ public class PeopleServiceImpl implements PeopleService {
return
childrenList
;
return
childrenList
;
}
}
@Override
public
MapRestResult
getXsSfXx
(
String
objectType
,
String
objectValue
)
{
Car
resCar
=
null
;
if
(
objectType
.
equals
(
"01"
)){
Query
query
=
new
Query
();
Criteria
criteria
=
Criteria
.
where
(
"veco"
).
is
(
objectValue
);
query
.
addCriteria
(
criteria
);
resCar
=
mongoTemplate
.
findOne
(
query
,
Car
.
class
,
"wb0099carowner"
);
PeopleInfo
peopleInfo
=
new
PeopleInfo
();
peopleInfo
.
setObjectType
(
"03"
);
peopleInfo
.
setObjectValue
(
resCar
.
getCeco
());
return
MapRestResult
.
build
(
200
,
"成功获取身份信息!"
,
peopleInfo
);
}
else
{
return
MapRestResult
.
error
(
"无法查询此标识号类型"
);
}
}
}
}
serviceapi/peopleapi/src/main/resources/bootstrap.properties
View file @
8a5f334c
#配置中心地址
#配置中心地址
spring.cloud.nacos.config.server-addr
=
47.92.48.137:8848
#
spring.cloud.nacos.config.server-addr=47.92.48.137:8848
spring.cloud.nacos.discovery.server-addr
=
47.92.48.137:8848
#
spring.cloud.nacos.discovery.server-addr=47.92.48.137:8848
#spring.cloud.nacos.config.server-addr=26.3.13.184:8848
spring.cloud.nacos.config.server-addr
=
47.92.48.137:9949
#spring.cloud.nacos.discovery.server-addr=26.3.13.184:8848
#spring.cloud.nacos.discovery.server-addr=26.3.13.184:8848
spring.profiles.active
=
dev
spring.profiles.active
=
dev
# 该配置影响统一配置中心中的dataId
# 该配置影响统一配置中心中的dataId
spring.application.name
=
peopleapi
spring.application.name
=
peopleapi
spring.cloud.nacos.config.namespace
=
dev
spring.cloud.nacos.config.namespace
=
f1160b5f-cef5-4e86-bddc-c55e28c2d8b0
spring.cloud.nacos.config.group
=
peopleapi
spring.cloud.nacos.config.refreshable-dataids
=
peopleapi.properties
#spring.cloud.nacos.config.ext-config[0].data-id=image.properties
#spring.cloud.nacos.config.ext-config[0].data-id=image.properties
# 开启动态刷新配置,否则配置文件修改,工程无法感知
# 开启动态刷新配置,否则配置文件修改,工程无法感知
...
...
serviceapi/pom.xml
View file @
8a5f334c
...
@@ -24,6 +24,11 @@
...
@@ -24,6 +24,11 @@
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-ribbon
</artifactId>
<artifactId>
spring-cloud-starter-netflix-ribbon
</artifactId>
</dependency>
</dependency>
...
...
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