Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
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
雷紫添
xzxt-api-report
Commits
bccd8f11
Commit
bccd8f11
authored
Nov 03, 2022
by
liulianglang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资源概况统计
parent
877697e2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
450 additions
and
4 deletions
+450
-4
src/main/java/com/founder/controller/GgfwGjController.java
+2
-0
src/main/java/com/founder/controller/GjController.java
+100
-4
src/main/java/com/founder/dao/SysGnsyrzOpenApiDao.java
+5
-0
src/main/java/com/founder/model/Face.java
+10
-0
src/main/java/com/founder/model/ZyfwQueryParam.java
+8
-0
src/main/java/com/founder/service/GjService.java
+18
-0
src/main/java/com/founder/service/impl/GjServiceImpl.java
+287
-0
src/main/resources/application-dev.yml
+6
-0
src/main/resources/mybatis/mapper/SysGnsyrzOpenApiMapper.xml
+14
-0
No files found.
src/main/java/com/founder/controller/GgfwGjController.java
View file @
bccd8f11
...
...
@@ -286,4 +286,6 @@ public class GgfwGjController {
String
appSecret
=
request
.
getHeader
(
AuthorizationInterceptor
.
appSecret
);
return
authorizationMapper
.
getFwidAndXtmc
(
appId
,
appSecret
);
}
}
src/main/java/com/founder/controller/GjController.java
View file @
bccd8f11
...
...
@@ -3,10 +3,7 @@ package com.founder.controller;
import
com.founder.common.IpADdress
;
import
com.founder.common.IpADressLock
;
import
com.founder.common.LogsUtil
;
import
com.founder.model.HcHbQueryParam
;
import
com.founder.model.Result
;
import
com.founder.model.XyrParam
;
import
com.founder.model.ZtryParam
;
import
com.founder.model.*
;
import
com.founder.service.GjService
;
import
com.founder.service.SysGnsyrzOpenApiService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -78,6 +75,105 @@ public class GjController {
return
reslt
;
}
@PostMapping
(
"/getBlzz"
)
public
void
getBlzz
(
HttpServletRequest
requestIp
){
Result
reslt
=
new
Result
();
HttpServletRequest
request
=
IpADdress
.
getRequest
();
String
header
=
request
.
getHeader
(
"founder.authorization"
);
try
{
Map
<
String
,
Object
>
mapResult
=
new
HashMap
();
mapResult
=
gjService
.
getBlzz
(
request
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
@PostMapping
(
"/getLdgjCount"
)
public
R
getLdgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getLdgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getMhgjCount"
)
public
R
getMhgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getMhgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getWbgjCount"
)
public
R
getWbgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getWbgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getTlgjCount"
)
public
R
getTlgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getTlgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getHydjgjCount"
)
public
R
getHydjgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getHydjgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getThdjgjCount"
)
public
R
getThdjgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getThdjgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getClwzgjCount"
)
public
R
getClwzgjCount
(
@RequestBody
ZyfwQueryParam
zyfwQueryParam
)
{
try
{
HttpServletRequest
request
=
IpADdress
.
getRequest
();
int
total
=
gjService
.
getClwzgjCount
(
request
,
zyfwQueryParam
.
getIsZl
());
System
.
out
.
println
(
"ldzs="
+
total
);
return
R
.
ok
().
data
(
"total"
,
total
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 车牌号获取车主信息
* @param xyrParam
...
...
src/main/java/com/founder/dao/SysGnsyrzOpenApiDao.java
View file @
bccd8f11
package
com
.
founder
.
dao
;
import
com.founder.model.Face
;
import
com.founder.model.SysGnsyrzOpenApi
;
import
com.founder.model.SysLogJccjXxbs
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
@Mapper
public
interface
SysGnsyrzOpenApiDao
{
void
saveSysgnsyrz
(
SysGnsyrzOpenApi
var1
);
List
<
Face
>
queryList
();
void
updateList
(
Face
face
);
}
src/main/java/com/founder/model/Face.java
View file @
bccd8f11
...
...
@@ -6,6 +6,16 @@ package com.founder.model;
public
class
Face
{
private
String
id
;
private
String
identitycard
;
public
String
getNum
()
{
return
num
;
}
public
void
setNum
(
String
num
)
{
this
.
num
=
num
;
}
private
String
num
;
private
byte
[]
facephoto
;
public
String
getId
()
{
...
...
src/main/java/com/founder/model/ZyfwQueryParam.java
0 → 100644
View file @
bccd8f11
package
com
.
founder
.
model
;
import
lombok.Data
;
@Data
public
class
ZyfwQueryParam
{
private
String
isZl
;
}
src/main/java/com/founder/service/GjService.java
View file @
bccd8f11
...
...
@@ -10,6 +10,24 @@ import java.util.Map;
import
java.util.concurrent.ExecutionException
;
public
interface
GjService
{
int
getLdgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getMhgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getWbgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getTlgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getHydjgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getThdjgjCount
(
HttpServletRequest
request
,
String
isZl
);
int
getClwzgjCount
(
HttpServletRequest
request
,
String
isZl
);
Map
<
String
,
Object
>
getBlzz
(
HttpServletRequest
request
)
throws
Exception
;
Map
<
String
,
Object
>
getWbxx
(
HttpServletRequest
request
,
XyrParam
xyrParam
)
throws
Exception
;
Map
<
String
,
Object
>
getCzxx
(
HttpServletRequest
request
,
XyrParam
xyrParam
)
throws
Exception
;
Map
<
String
,
Object
>
getMhXx
(
HttpServletRequest
request
,
XyrParam
xyrParam
)
throws
Exception
;
...
...
src/main/java/com/founder/service/impl/GjServiceImpl.java
View file @
bccd8f11
...
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.callable.MyCallable
;
import
com.founder.dao.AuthorizationMapper
;
import
com.founder.dao.SysGnsyrzOpenApiDao
;
import
com.founder.model.Face
;
import
com.founder.model.HcHbQueryParam
;
import
com.founder.model.XyrParam
;
import
com.founder.service.GjService
;
...
...
@@ -23,6 +25,291 @@ import java.util.stream.Collectors;
@Service
public
class
GjServiceImpl
implements
GjService
{
@Autowired
private
SysGnsyrzOpenApiDao
sysGnsyrzOpenApiDao
;
@Override
public
int
getLdgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_trail01 where _type= 'lg' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getMhgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_trail01 where _type= 'mhjcgall' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getWbgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_trail01 where _type= 'wb' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getTlgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_trail01 where GJLX= 'hc' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getHydjgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_type01 where _type= 'mzhydjxx' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getThdjgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM people_type01 where _type='zaczrkhzls' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
int
getClwzgjCount
(
HttpServletRequest
request
,
String
isZl
)
{
if
(
"1"
.
equals
(
isZl
)){
return
0
;
}
else
{
String
sql2
=
"select count(*) FROM vehicle_trail03 where _type='dzwz' "
;
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
num
=
""
;
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num
=
job
.
getString
(
"count"
);
//总数
}
}
if
(
StringUtils
.
isNoneBlank
(
num
)){
return
Integer
.
parseInt
(
num
);
}
else
{
return
0
;
}
}
}
@Override
public
Map
<
String
,
Object
>
getBlzz
(
HttpServletRequest
request
)
throws
Exception
{
List
<
Face
>
list
=
sysGnsyrzOpenApiDao
.
queryList
();
List
<
Face
>
result2
=
new
ArrayList
<>();
int
hh
=
0
;
for
(
int
yi
=
0
;
yi
<
list
.
size
();
yi
++){
String
sql2
=
list
.
get
(
yi
).
getIdentitycard
();
String
xh
=
list
.
get
(
yi
).
getId
();
Map
<
String
,
Object
>
map2
=
EsUtils
.
newQueryEs
(
request
,
sql2
);
//查询全国常口信息
String
StrData2
=
map2
.
get
(
"data"
).
toString
();
int
total2
=
(
int
)
map2
.
get
(
"count"
);
JSONArray
backBodyJson2
=
JSONArray
.
parseArray
(
StrData2
);
System
.
out
.
println
(
backBodyJson2
.
toJSONString
());
// 首先把字符串转成 JSONArray 对象
if
(
backBodyJson2
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
backBodyJson2
.
size
();
i
++)
{
Face
mapnr
=
new
Face
();
JSONObject
job
=
backBodyJson2
.
getJSONObject
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
String
num
=
job
.
getString
(
"count"
);
//证件号码
mapnr
.
setNum
(
num
);
mapnr
.
setId
(
xh
);
try
{
hh
++;
sysGnsyrzOpenApiDao
.
updateList
(
mapnr
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
System
.
out
.
println
(
mapnr
.
toString
());
}
}
}
}
System
.
out
.
println
(
hh
);
return
null
;
}
@Override
public
Map
<
String
,
Object
>
getWbxx
(
HttpServletRequest
request
,
XyrParam
xyrParam
)
throws
Exception
{
...
...
src/main/resources/application-dev.yml
View file @
bccd8f11
spring
:
datasource
:
xzxt
:
# driver-class-name: com.mysql.cj.jdbc.Driver
# jdbc-url: jdbc:mysql://65.26.10.145:4306/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
# username: xzxt
# password: Hn_Xzxt43
# type: com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
xzxt
password
:
xzxt
jdbc-url
:
jdbc:mysql://47.92.223.200:3365/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
type
:
com.alibaba.druid.pool.DruidDataSource
manager
:
driver-class-name
:
oracle.jdbc.OracleDriver
username
:
manager
...
...
src/main/resources/mybatis/mapper/SysGnsyrzOpenApiMapper.xml
View file @
bccd8f11
...
...
@@ -56,5 +56,19 @@
)
</insert>
<update
id=
"updateList"
parameterType=
"com.founder.model.Face"
>
update tb_bjg
set
NUM=#{num, jdbcType=VARCHAR}
where XH = #{id, jdbcType=VARCHAR}
</update>
<select
id=
"queryList"
resultType=
"com.founder.model.Face"
>
select XH id,SQL_TEXT identitycard from tb_bjg where LX='表名'
</select>
</mapper>
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