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
bf8baab4
Commit
bf8baab4
authored
Mar 09, 2021
by
chentian
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
edc63157
8f00814c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
72 deletions
+35
-72
common/service_base/src/main/java/com/founder/servicebase/SwaggerConfig.java
+12
-1
service/publicapi/src/main/java/com/founder/publicapi/MapRedisApplication.java
+1
-1
service/publicapi/src/main/java/com/founder/publicapi/controller/RyController.java
+13
-63
service/publicapi/src/main/java/com/founder/publicapi/mapper/SysDictitemMapper.java
+4
-2
service/publicapi/src/main/java/com/founder/publicapi/service/SysDictitemService.java
+1
-1
service/publicapi/src/main/java/com/founder/publicapi/service/serviceimpl/SysDictitemServiceImpl.java
+3
-3
service/publicapi/src/main/resources/mybatis/mapper/oracle/SysDictitemMapper.xml
+1
-1
No files found.
common/service_base/src/main/java/com/founder/servicebase/SwaggerConfig.java
View file @
bf8baab4
...
...
@@ -17,6 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
public
class
SwaggerConfig
{
public
static
final
String
asjApi
=
"com.founder.asj"
;
public
static
final
String
esApi
=
"com.founder.eszy"
;
public
static
final
String
publicApi
=
"com.founder.publicapi"
;
//public static final String carApi = "com.founder.asj.controller2";
@Bean
public
Docket
asjApi
(){
...
...
@@ -40,7 +41,17 @@ public class SwaggerConfig {
.
paths
(
Predicates
.
not
(
PathSelectors
.
regex
(
"/admin/.*"
)))
.
paths
(
Predicates
.
not
(
PathSelectors
.
regex
(
"/error.*"
)))
.
build
();
}
@Bean
public
Docket
publicApi
(){
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
groupName
(
"publicApi"
)
.
apiInfo
(
webApiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
publicApi
))
.
paths
(
Predicates
.
not
(
PathSelectors
.
regex
(
"/admin/.*"
)))
.
paths
(
Predicates
.
not
(
PathSelectors
.
regex
(
"/error.*"
)))
.
build
();
}
private
ApiInfo
webApiInfo
(){
...
...
service/publicapi/src/main/java/com/founder/pulicapi/MapRedisApplication.java
→
service/publicapi/src/main/java/com/founder/pu
b
licapi/MapRedisApplication.java
View file @
bf8baab4
package
com
.
founder
.
pulicapi
;
package
com
.
founder
.
pu
b
licapi
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
service/publicapi/src/main/java/com/founder/pulicapi/controller/RyController.java
→
service/publicapi/src/main/java/com/founder/pu
b
licapi/controller/RyController.java
View file @
bf8baab4
package
com
.
founder
.
pulicapi
.
controller
;
package
com
.
founder
.
pu
b
licapi
.
controller
;
import
com.founder.commonutils.peopleEntity.TbStRy
;
import
com.founder.commonutils.publicEntity.R
;
...
...
@@ -7,7 +7,10 @@ import com.founder.commonutils.carEntity.CarReceiving;
import
com.founder.commonutils.carEntity.CarRy
;
import
com.founder.commonutils.carEntity.QgjdcModel
;
import
com.founder.commonutils.util.HttpUtil
;
import
com.founder.pulicapi.service.SysDictitemService
;
import
com.founder.publicapi.service.SysDictitemService
;
import
com.founder.servicebase.logs.OperLog
;
import
com.founder.servicebase.logs.OperationType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.dom4j.Document
;
import
org.dom4j.DocumentHelper
;
...
...
@@ -25,12 +28,16 @@ import java.util.List;
* 全国人员常口接口
*
*/
@Api
(
description
=
"全国人员常口接口"
)
@RestController
@RequestMapping
(
value
=
"/ryRedis"
)
public
class
RyController
{
@Autowired
private
SysDictitemService
sysDictitemService
;
@ApiOperation
(
value
=
"获取全国常住人口信息"
)
@OperLog
(
message
=
"获取全国常住人口信息"
,
operation
=
OperationType
.
QUERY
)
@PostMapping
(
"/ryxxQg"
)
public
R
getQgckAllxxXml
(
@RequestBody
RyReceiving
receiving
){
TbStRy
ryxx
=
new
TbStRy
();
...
...
@@ -47,24 +54,6 @@ public class RyController {
return
R
.
ok
().
code
(
200
).
message
(
"成功获取全国常口人员信息"
).
data
(
"ryxx"
,
ryxx
);
}
@PostMapping
(
"/ryxxQgInfo"
)
public
TbStRy
getQgckAllxxXmlInfo
(
@RequestBody
RyReceiving
receiving
){
TbStRy
ryxx
=
new
TbStRy
();
String
esbServiceReturn
=
""
;
//String url="http://10.100.17.115:8080/NmgEsbQueryService/QueryLocalPersonForOther?conditions=sfzh="+"'"+zjhm+"'";
String
url
=
getConn
()+
"'"
+
receiving
.
getSfzh
()+
"'"
;
HttpUtil
hu
=
new
HttpUtil
();
try
{
esbServiceReturn
=
hu
.
doGet
(
url
);
}
catch
(
Exception
e
)
{
// TODO: handle exception
}
ryxx
=
getryJbxxxmls
(
esbServiceReturn
);
//XzxtRestResult result = XzxtRestResult.build(200,"成功获取全国常口人员信息",null,ryxx);
return
ryxx
;
}
public
TbStRy
getryJbxxxmls
(
String
esb_result
){
TbStRy
resulryxx
=
new
TbStRy
();
/* esb_result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
...
...
@@ -211,7 +200,9 @@ public class RyController {
return
url
;
}
@ApiOperation
(
value
=
"查询车辆基本信息-公安部机动车数据查询服务返回"
)
@OperLog
(
message
=
"查询车辆基本信息-公安部机动车数据查询服务返回"
,
operation
=
OperationType
.
QUERY
)
//查询车辆基本信息-公安部机动车数据查询服务返回
@PostMapping
(
"/getCarxx"
)
public
R
getVehicleTrackCarxx
(
@RequestBody
CarReceiving
carReceiving
){
...
...
@@ -256,50 +247,7 @@ public class RyController {
return
R
.
error
().
code
(
500
).
message
(
"请求失败"
).
data
(
null
);
}
}
//查询车辆基本信息-公安部机动车数据查询服务返回
@PostMapping
(
"/getCarxxInfo"
)
public
CarRy
getVehicleTrackCarxxInfo
(
@RequestBody
CarReceiving
carReceiving
){
String
carNum
=
carReceiving
.
getObjectValue
();
//车牌号
HashMap
<
String
,
String
>
codeMap
=
new
HashMap
<
String
,
String
>();
try
{
// 全国机动车信息
QgjdcModel
qgjdc
=
new
QgjdcModel
();
// 全国人员常口
TbStRy
ry
=
new
TbStRy
();
CarRy
carRy
=
new
CarRy
();
// 调用全国机动车信息根据号牌号码查询所有人身份证号
qgjdc
=
getQgclAllxxXml
(
carNum
);
// 调用全国常口接口 根据zjhm查询人员的基本信息
ry
=
getQgckAllxxXml
(
qgjdc
.
getSfzh
());
carRy
.
setXm
(
ry
.
getXm
());
// 人员姓名
// 名族转为汉字
codeMap
.
put
(
"groupid"
,
"CODE_MZ"
);
codeMap
.
put
(
"code"
,
ry
.
getMz
());
String
mz
=
sysDictitemService
.
getNameByCode
(
codeMap
);
carRy
.
setMz
(
mz
);
// 民族
// 性别转为汉字
codeMap
.
put
(
"groupid"
,
"CODE_XB"
);
codeMap
.
put
(
"code"
,
ry
.
getXb
());
String
xb
=
sysDictitemService
.
getNameByCode
(
codeMap
);
carRy
.
setXb
(
xb
);
// 性别
carRy
.
setSfzhm
(
qgjdc
.
getSfzh
());
//证件号码set
carRy
.
setCsdzmc
(
ry
.
getCsdzmc
());
//出生地址名称
carRy
.
setXzzdzmc
(
ry
.
getXzzdzmc
());
//现住址地址名称
carRy
.
setImg
(
ry
.
getImg
());
// 人员照片
carRy
.
setPhone
(
qgjdc
.
getLxfs
());
// 联系电话
carRy
.
setObjValue
(
qgjdc
.
getHphm
());
// 值为车牌号
carRy
.
setCarType
(
qgjdc
.
getClpp1
());
// 车辆_品牌型号
carRy
.
setHjdqhdz
(
ry
.
getHjdqhdz
());
// 户籍地地址
carRy
.
setCsrq
(
ry
.
getCsrq
());
// 出生日期
return
carRy
;
}
catch
(
Exception
e
){
return
null
;
}
}
/**
* 根据ajhm查询人员的基本信息
* @param zjhm
...
...
@@ -319,6 +267,7 @@ public class RyController {
ryxx
=
getryJbxxxml
(
esbServiceReturn
);
return
ryxx
;
}
public
TbStRy
getryJbxxxml
(
String
esb_result
){
TbStRy
resulryxx
=
new
TbStRy
();
/* esb_result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
...
...
@@ -472,6 +421,7 @@ public class RyController {
qgjdc
=
getclJbxxxml
(
esbServiceReturn
);
return
qgjdc
;
}
public
static
QgjdcModel
getclJbxxxml
(
String
esb_result
){
QgjdcModel
qgjdc
=
new
QgjdcModel
();
/*esb_result ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
...
...
service/publicapi/src/main/java/com/founder/pulicapi/mapper/SysDictitemMapper.java
→
service/publicapi/src/main/java/com/founder/pu
b
licapi/mapper/SysDictitemMapper.java
View file @
bf8baab4
package
com
.
founder
.
pulicapi
.
mapper
;
package
com
.
founder
.
pu
b
licapi
.
mapper
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.Map
;
@Mapper
public
interface
SysDictitemMapper
{
String
getNameByCode
(
Map
<
String
,
String
>
map
);
}
service/publicapi/src/main/java/com/founder/pulicapi/service/SysDictitemService.java
→
service/publicapi/src/main/java/com/founder/pu
b
licapi/service/SysDictitemService.java
View file @
bf8baab4
package
com
.
founder
.
pulicapi
.
service
;
package
com
.
founder
.
pu
b
licapi
.
service
;
import
java.util.Map
;
...
...
service/publicapi/src/main/java/com/founder/pulicapi/service/serviceimpl/SysDictitemServiceImpl.java
→
service/publicapi/src/main/java/com/founder/pu
b
licapi/service/serviceimpl/SysDictitemServiceImpl.java
View file @
bf8baab4
package
com
.
founder
.
pulicapi
.
service
.
serviceimpl
;
package
com
.
founder
.
pu
b
licapi
.
service
.
serviceimpl
;
import
com.founder.pulicapi.mapper.SysDictitemMapper
;
import
com.founder.pulicapi.service.SysDictitemService
;
import
com.founder.pu
b
licapi.mapper.SysDictitemMapper
;
import
com.founder.pu
b
licapi.service.SysDictitemService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
...
...
service/publicapi/src/main/resources/mybatis/mapper/oracle/SysDictitemMapper.xml
View file @
bf8baab4
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.founder.pulicapi.mapper.SysDictitemMapper"
>
<mapper
namespace=
"com.founder.pu
b
licapi.mapper.SysDictitemMapper"
>
<!-- 根据code和groupid查询name值-->
<select
id=
"getNameByCode"
parameterType=
"java.util.Map"
resultType=
"java.lang.String"
>
...
...
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