Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-app-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
Administrator
xzxt-app-report
Commits
ea3a77e0
Commit
ea3a77e0
authored
Aug 12, 2021
by
雷紫添
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/master'
parents
0153f47e
97bd1935
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
209 additions
and
72 deletions
+209
-72
src/main/java/org/springblade/founder/asj/controller/StAsjXxtqController.java
+0
-6
src/main/java/org/springblade/founder/asj/mapper/MaAsjglMapper.xml
+25
-10
src/main/java/org/springblade/founder/asj/service/StAsjXxtqService.java
+75
-36
src/main/java/org/springblade/founder/asj/service/impl/AjspServiceImpl.java
+4
-4
src/main/java/org/springblade/founder/asj/service/impl/MaAsjglServiceImpl.java
+14
-0
src/main/java/org/springblade/founder/asj/util/StringUtil.java
+6
-2
src/main/java/org/springblade/founder/rybh/controller/XwRybhController.java
+6
-1
src/main/java/org/springblade/founder/utils/HttpUtil.java
+2
-2
src/main/java/org/springblade/founder/xtrz/controller/XtrzController.java
+2
-4
src/main/java/org/springblade/founder/xtrz/service/IXtrzService.java
+3
-1
src/main/java/org/springblade/founder/xtrz/service/impl/IXtrzServiceImpl.java
+66
-5
src/main/java/org/springblade/founder/zbfzxyr/controller/XwZbfzxyrController.java
+6
-1
No files found.
src/main/java/org/springblade/founder/asj/controller/StAsjXxtqController.java
View file @
ea3a77e0
...
...
@@ -383,11 +383,5 @@ public class StAsjXxtqController extends BladeController {
}
}
@RequestMapping
(
"/addSjjc"
)
@ResponseBody
public
R
addSjjc
(){
xxtqService
.
getMyCzrz
();
return
R
.
ok
();
}
}
src/main/java/org/springblade/founder/asj/mapper/MaAsjglMapper.xml
View file @
ea3a77e0
...
...
@@ -506,52 +506,67 @@
and (now() - la.SPSJ)
<![CDATA[>]]>
'5'
</if>
</if>
<!--案件业务状态查询条件-->
<if
test=
"ajzt!=null and ajzt!=''"
>
<if
test=
"laywsjztList !=null and zczjywsjztList == null"
>
AND
(
and (
(
<foreach
collection=
"laywsjztList"
item=
"item"
open=
"("
separator=
"or"
close=
")"
>
<if
test=
"item == '00'"
>
asjcz.laywsjzt is null or asjcz.laywsjzt = '' or asjcz.laywsjzt = #{item , jdbcType=VARCHAR }
</if>
<if
test=
" item != null and item !=
null and item != '00
'"
>
<if
test=
" item != null and item !=
'' and item != '00' and item != '05
'"
>
asjcz.laywsjzt = #{item , jdbcType=VARCHAR }
</if>
</foreach>
and (asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = ''))
<if
test=
" sfcxajPdbz != null and sfcxajPdbz != ''"
>
or asjcz.laywsjzt = '05'
</if>
)
</if>
<if
test=
"laywsjztList ==null and zczjywsjztList == null and sfcxajPdbz !=null and sfcxajPdbz != ''"
>
and asjcz.laywsjzt = '05'
</if>
<if
test=
"zczjywsjztList != null and laywsjztList == null"
>
AND
asjcz.laywsjzt = '02' and
and ((
asjcz.laywsjzt = '02' and
<foreach
collection=
"zczjywsjztList"
item=
"item"
open=
"("
separator=
"or"
close=
")"
>
<if
test=
"item == '00'"
>
asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = '' or asjcz.zczjywsjzt = #{item , jdbcType=VARCHAR }
asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = '' or asjcz.zczjywsjzt =
#{item , jdbcType=VARCHAR }
</if>
<if
test=
" item != null and item !=
null
and item != '00'"
>
<if
test=
" item != null and item !=
''
and item != '00'"
>
asjcz.zczjywsjzt = #{item , jdbcType=VARCHAR }
</if>
</foreach>
</foreach>
)
<if
test=
" sfcxajPdbz != null and sfcxajPdbz != ''"
>
or asjcz.laywsjzt = '05'
</if>
)
</if>
<if
test=
"zczjywsjztList != null and laywsjztList != null"
>
AND
((
and
((
<foreach
collection=
"laywsjztList"
item=
"item"
open=
"("
separator=
"or"
close=
")"
>
<if
test=
"item == '00'"
>
asjcz.laywsjzt is null or asjcz.laywsjzt = '' or asjcz.laywsjzt = #{item , jdbcType=VARCHAR }
</if>
<if
test=
" item != null and item !=
null and item != '00
'"
>
<if
test=
" item != null and item !=
'' and item != '00' and item != '05
'"
>
asjcz.laywsjzt = #{item , jdbcType=VARCHAR }
</if>
</foreach>
and (asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = ''))
<if
test=
" sfcxajPdbz != null and sfcxajPdbz != ''"
>
or asjcz.laywsjzt = '05'
</if>
or (asjcz.laywsjzt = '02' and
<foreach
collection=
"zczjywsjztList"
item=
"item"
open=
"("
separator=
"or"
close=
")"
>
<if
test=
"item == '00'"
>
asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = '' or asjcz.zczjywsjzt = #{item , jdbcType=VARCHAR }
</if>
<if
test=
" item != null and item !=
null
and item != '00'"
>
<if
test=
" item != null and item !=
''
and item != '00'"
>
asjcz.zczjywsjzt = #{item , jdbcType=VARCHAR }
</if>
</foreach>
))
</if>
</if>
<if
test=
"typeFlag=='toSq'"
>
<!--涉枪信息查询列表 -->
...
...
src/main/java/org/springblade/founder/asj/service/StAsjXxtqService.java
View file @
ea3a77e0
...
...
@@ -14,15 +14,23 @@ import org.springblade.founder.glasjry.service.ITbGlAsjRyService;
import
org.springblade.founder.rybh.entity.XwRybh
;
import
org.springblade.founder.rybh.service.IXwRybhService
;
import
org.springblade.founder.utils.HttpClientUtil
;
import
org.springblade.founder.utils.HttpUtil
;
import
org.springblade.founder.utils.R
;
import
org.springblade.founder.xtrz.entity.SysGnsyrz
;
import
org.springblade.founder.xtrz.mapper.XtrzMapper
;
import
org.springblade.founder.xtrz.service.IXtrzService
;
import
org.springblade.founder.zbfzxyr.entity.XwZbfzxyr
;
import
org.springblade.founder.zbfzxyr.service.IXwZbfzxyrService
;
import
org.springblade.modules.auth.utils.TokenUtil
;
import
org.springblade.modules.system.entity.XzxtUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
java.awt.*
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.List
;
import
org.springblade.founder.utils.DataFormatUtil
;
...
...
@@ -35,6 +43,8 @@ public class StAsjXxtqService {
@Autowired
private
ITbXwBaService
tbXwBaService
;
@Autowired
private
IXtrzService
xtrzService
;
@Autowired
private
IXwRybhService
xwRybhService
;
@Autowired
private
ITbGlAsjRyService
glAsjRyService
;
...
...
@@ -192,6 +202,8 @@ public class StAsjXxtqService {
String
token
=
getToken
();
TbStAsj
tbStAsj
=
getTbStAsj
(
asjbh
);
if
(
tbStAsj
==
null
){
XzxtUser
user
=
SecureUtil
.
getUserXzxt
();
xtrzService
.
addAjtqGnsyrz
(
user
,
"01"
,
"提取案件基本信息"
,
asjbh
);
getSysjjcUrl
(
asjbh
,
token
);
}
if
(
data
!=
null
){
...
...
@@ -207,7 +219,7 @@ public class StAsjXxtqService {
}
return
R
.
ok
().
data
(
"data"
,
data
);
}
else
{
String
detailUrl
=
getDetailUrl
(
asjbh
,
token
);
String
detailUrl
=
getDetailUrl
(
asjbh
);
return
R
.
error
().
data
(
"detailUrl"
,
detailUrl
).
message
(
"案件信息为空,无法提取。"
+
getLxrAndLxfs
());
}
}
...
...
@@ -222,6 +234,8 @@ public class StAsjXxtqService {
String
token
=
getToken
();
TbStAsj
tbStAsj
=
getTbStAsj
(
asjbh
);
if
(
tbStAsj
!=
null
){
XzxtUser
user
=
SecureUtil
.
getUserXzxt
();
xtrzService
.
addAjtqGnsyrz
(
user
,
"01"
,
"提取犯罪嫌疑人信息信息"
,
asjbh
);
getSysjjcUrl
(
asjbh
,
token
);
}
if
(
data
!=
null
&&
!
data
.
isEmpty
()){
...
...
@@ -283,7 +297,7 @@ public class StAsjXxtqService {
if
(!
StringUtils
.
isEmpty
(
errorMsg
)){
msg
+=
"<br/>"
+
errorMsg
;
}
String
detailUrl
=
getDetailUrl
(
asjbh
,
token
);
String
detailUrl
=
getDetailUrl
(
asjbh
);
return
R
.
error
().
data
(
"detailUrl"
,
detailUrl
).
message
(
msg
);
}
else
{
if
(!
StringUtils
.
isEmpty
(
errorMsg
)){
...
...
@@ -294,7 +308,7 @@ public class StAsjXxtqService {
}
}
}
else
{
String
detailUrl
=
getDetailUrl
(
asjbh
,
token
);
String
detailUrl
=
getDetailUrl
(
asjbh
);
return
R
.
error
().
data
(
"detailUrl"
,
detailUrl
).
message
(
"全国基础库抓捕犯罪嫌疑人信息无数据,暂时无法提取。"
+
getLxrAndLxfs
());
}
}
...
...
@@ -309,6 +323,8 @@ public class StAsjXxtqService {
String
token
=
getToken
();
TbStAsj
tbStAsj
=
getTbStAsj
(
asjbh
);
if
(
tbStAsj
!=
null
){
XzxtUser
user
=
SecureUtil
.
getUserXzxt
();
xtrzService
.
addAjtqGnsyrz
(
user
,
"01"
,
"提取案件基本信息"
,
asjbh
);
getSysjjcUrl
(
asjbh
,
token
);
}
if
(
data
!=
null
&&
!
data
.
isEmpty
()){
...
...
@@ -370,7 +386,7 @@ public class StAsjXxtqService {
if
(!
StringUtils
.
isEmpty
(
errorMsg
)){
msg
+=
"<br/>"
+
errorMsg
;
}
String
detailUrl
=
getDetailUrl
(
asjbh
,
token
);
String
detailUrl
=
getDetailUrl
(
asjbh
);
return
R
.
error
().
data
(
"detailUrl"
,
detailUrl
).
message
(
msg
);
}
else
{
if
(!
StringUtils
.
isEmpty
(
errorMsg
)){
...
...
@@ -381,7 +397,7 @@ public class StAsjXxtqService {
}
}
}
else
{
String
detailUrl
=
getDetailUrl
(
asjbh
,
token
);
String
detailUrl
=
getDetailUrl
(
asjbh
);
return
R
.
error
().
data
(
"detailUrl"
,
detailUrl
).
message
(
"全国基础库被害人信息无数据,暂时无法提取。"
+
getLxrAndLxfs
());
}
}
...
...
@@ -438,14 +454,64 @@ public class StAsjXxtqService {
}
//获取思悦数据详情页面地址
private
String
getDetailUrl
(
String
asjbh
,
String
token
)
{
private
String
getDetailUrl
(
String
asjbh
)
{
String
url
=
"http://10.2.164.178:8058/db/fzAj/"
+
asjbh
;
System
.
out
.
println
(
"url*************:"
+
url
);
String
upid
=
getUpid
(
url
);
for
(
int
i
=
1
;
i
<
5
;
i
++){
if
(!
StringUtils
.
isEmpty
(
upid
))
{
if
(
"0"
.
equals
(
upid
))
{
System
.
out
.
println
(
"upid正在入库:"
+
upid
);
upid
=
getUpid
(
url
);
}
else
{
System
.
out
.
println
(
"upid已获取到:"
+
upid
);
break
;
}
}
else
{
System
.
out
.
println
(
"获取upid失败"
);
break
;
}
}
System
.
out
.
println
(
"upid-------------------------------"
+
upid
);
String
detailUrl
=
""
;
if
(
token
!=
null
){
detailUrl
=
"http://10.2.164.178:8086/dataDetection/#/testing?ajbh="
+
asjbh
+
"&token="
+
token
;
if
(
upid
!=
null
&&!
"0"
.
equals
(
upid
)){
detailUrl
=
"http://10.2.164.178:8086/dataDetection/#/testing?upid="
+
upid
;
System
.
out
.
println
(
"============================get upid success:"
+
detailUrl
+
"==========================="
);
}
return
detailUrl
;
}
//获取思悦日志快照的upid
private
String
getUpid
(
String
url
){
String
resultStr
=
null
;
try
{
Thread
.
sleep
(
1000
);
resultStr
=
HttpUtil
.
doGet
(
url
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
String
upid
=
null
;
if
(!
StringUtils
.
isEmpty
(
resultStr
)){
try
{
JSONObject
result
=
JSON
.
parseObject
(
resultStr
);
System
.
out
.
println
(
"result**************:"
+
result
);
if
(
result
!=
null
){
upid
=
result
.
getString
(
"data"
);
}
else
{
System
.
out
.
println
(
"获取思悦数据详情页面upid返回值没有data。返回结果:"
+
resultStr
);
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"解析思悦数据详情页面upid返回值发生异常。"
+
resultStr
);
e
.
printStackTrace
();
}
}
else
{
System
.
out
.
println
(
"获取思悦数据详情页面upid没有返回值。"
);
}
return
upid
;
}
//根据思悦给的地址生成Token
private
String
getToken
(){
XzxtUser
xzxtUser
=
SecureUtil
.
getUserXzxt
();
...
...
@@ -479,7 +545,7 @@ public class StAsjXxtqService {
}
//请求思悦
数据检测详情页面地址
//请求思悦
记录数据检测日志接口
public
void
getSysjjcUrl
(
String
asjbh
,
String
token
){
String
url
=
"http://10.2.164.178:8058/db/fzAj"
;
String
json
=
"{\"ajbh\":\""
+
asjbh
+
"\"}"
;
...
...
@@ -577,31 +643,4 @@ public class StAsjXxtqService {
return
ajDetailService
.
getAsjByAsjbh
(
asjbh
);
}
public
void
getMyCzrz
(){
List
<
TbStAsj
>
list
=
ajDetailService
.
getAsjByRsksj
();
for
(
TbStAsj
tbStAsj:
list
)
{
String
asjbh
=
tbStAsj
.
getAsjbh
();
String
zjhm
=
tbStAsj
.
getXxdjryGmsfhm
();
String
tokenYrl
=
"http://10.2.164.178:8058/sys/oauth2/token"
;
Map
<
String
,
String
>
param
=
new
HashMap
<>();
param
.
put
(
"username"
,
zjhm
);
String
resultStr
=
null
;
try
{
resultStr
=
HttpClientUtil
.
doGet
(
tokenYrl
,
param
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
String
token
=
null
;
JSONObject
result
=
JSON
.
parseObject
(
resultStr
);
if
(
result
!=
null
){
token
=
result
.
getString
(
"data"
);
}
else
{
System
.
out
.
println
(
"获取思悦数据详情页面token返回值没有data。返回结果:"
+
resultStr
);
}
getSysjjcUrl
(
asjbh
,
token
);
}
}
}
src/main/java/org/springblade/founder/asj/service/impl/AjspServiceImpl.java
View file @
ea3a77e0
...
...
@@ -160,13 +160,13 @@ public class AjspServiceImpl implements IAjspService {
deteilMap
.
put
(
"zczjyj"
,
sfNotNull
(
tbStAsj
.
getZczjZcxwyjms
()));
deteilMap
.
put
(
"pasd"
,
sfNotNull
(
tbStAsj
.
getPasddm
()));
String
fayy
=
tbStAsj
.
getZadjdm
();
//发案原因
if
(
StringUtils
.
isNotEmpty
(
fayy
)
&&
!
"待定"
.
equals
(
fayy
)
&&!
"其他"
.
equals
(
fayy
)
){
if
(
StringUtils
.
isNotEmpty
(
fayy
)
&&
!
"待定"
.
equals
(
fayy
)){
deteilMap
.
put
(
"fayy"
,
"1"
);
}
else
{
deteilMap
.
put
(
"fayy"
,
"0"
);
}
String
zasd
=
tbStAsj
.
getTssddm
();
//作案手段(作案工具)
if
(
StringUtils
.
isNotEmpty
(
zasd
)
&&
!
"待定"
.
equals
(
zasd
)
&&!
"其他"
.
equals
(
zasd
)
){
if
(
StringUtils
.
isNotEmpty
(
zasd
)
&&
!
"待定"
.
equals
(
zasd
)){
deteilMap
.
put
(
"zasd"
,
"1"
);
}
else
{
deteilMap
.
put
(
"zasd"
,
"0"
);
...
...
@@ -194,7 +194,7 @@ public class AjspServiceImpl implements IAjspService {
deteilMap
.
put
(
"ajdy"
,
sfNotNull
(
tbStAsj
.
getAsjfsddDylbdm
()));
deteilMap
.
put
(
"sacs"
,
sfNotNull
(
tbStAsj
.
getAsjfsddSacsSacslbdm
()));
String
zasd
=
tbStAsj
.
getTssddm
();
//作案手段(作案工具)
if
(
StringUtils
.
isNotEmpty
(
zasd
)
&&
!
"待定"
.
equals
(
zasd
)
&&!
"其他"
.
equals
(
zasd
)
){
if
(
StringUtils
.
isNotEmpty
(
zasd
)
&&
!
"待定"
.
equals
(
zasd
)){
deteilMap
.
put
(
"zasd"
,
"1"
);
}
else
{
deteilMap
.
put
(
"zasd"
,
"0"
);
...
...
@@ -224,7 +224,7 @@ public class AjspServiceImpl implements IAjspService {
deteilMap
.
put
(
"pasd"
,
sfNotNull
(
tbStAsj
.
getPasddm
()));
String
fayy
=
tbStAsj
.
getZadjdm
();
//发案原因
if
(
StringUtils
.
isNotEmpty
(
fayy
)
&&
!
"待定"
.
equals
(
fayy
)
&&!
"其他"
.
equals
(
fayy
)
){
if
(
StringUtils
.
isNotEmpty
(
fayy
)
&&
!
"待定"
.
equals
(
fayy
)){
deteilMap
.
put
(
"fayy"
,
"1"
);
}
else
{
deteilMap
.
put
(
"fayy"
,
"0"
);
...
...
src/main/java/org/springblade/founder/asj/service/impl/MaAsjglServiceImpl.java
View file @
ea3a77e0
...
...
@@ -74,8 +74,13 @@ public class MaAsjglServiceImpl implements IMaAsjglService {
}
String
[]
ajzt
=
tbStAsj
.
getAjzt
();
Map
<
String
,
List
<
String
>>
map
=
StringUtil
.
getAjzt
(
ajzt
);
List
<
String
>
ycxajList
=
map
.
get
(
"ycxajList"
);
tbStAsj
.
setLaywsjztList
(
map
.
get
(
"laztList"
));
tbStAsj
.
setZczjywsjztList
(
map
.
get
(
"zczjztList"
));
if
(
ycxajList
!=
null
&&
ycxajList
.
size
()>
0
){
tbStAsj
.
setSfcxajPdbz
(
"1"
);
}
Integer
totalCount
=
queryAllMaAsjxxTotalCount
(
tbStAsj
);
List
<
TbStAsj
>
maAsjList
=
tbStAsjMapper
.
queryAllMaAsjxx
(
tbStAsj
);
Map
<
String
,
Object
>
resultMapHtml
=
new
HashMap
<>();
...
...
@@ -164,6 +169,15 @@ public class MaAsjglServiceImpl implements IMaAsjglService {
/*tbStAsj.setXxdjdwGajgjgdm(null);*/
tbStAsj
.
setDefaultGajgjgdm
(
xzxtUser
.
getUnitcode
());
}
String
[]
ajzt
=
tbStAsj
.
getAjzt
();
Map
<
String
,
List
<
String
>>
map
=
StringUtil
.
getAjzt
(
ajzt
);
List
<
String
>
ycxajList
=
map
.
get
(
"ycxajList"
);
tbStAsj
.
setLaywsjztList
(
map
.
get
(
"laztList"
));
tbStAsj
.
setZczjywsjztList
(
map
.
get
(
"zczjztList"
));
if
(
ycxajList
!=
null
&&
ycxajList
.
size
()>
0
){
tbStAsj
.
setSfcxajPdbz
(
"1"
);
}
List
<
TbStAsj
>
ryAsjxx
=
tbStAsjMapper
.
queryDupliRyAsjxx
(
tbStAsj
);
Integer
count
=
tbStAsjMapper
.
queryDupliRyAsjxxTotalCount
(
tbStAsj
);
Map
<
String
,
Object
>
resultMapHtml
=
new
HashMap
<>();
...
...
src/main/java/org/springblade/founder/asj/util/StringUtil.java
View file @
ea3a77e0
...
...
@@ -142,10 +142,13 @@ public class StringUtil {
List
<
String
>
ajztList
=
Arrays
.
asList
(
ajzt
);
List
<
String
>
laztList
=
new
ArrayList
<>();
List
<
String
>
zczjztList
=
new
ArrayList
<>();
List
<
String
>
ycxajList
=
new
ArrayList
<>();
for
(
String
ajywzt
:
ajztList
)
{
if
(
"00"
.
equals
(
ajywzt
)
||
"01"
.
equals
(
ajywzt
)
||
"02"
.
equals
(
ajywzt
)
||
"03"
.
equals
(
ajywzt
)
||
"05"
.
equals
(
ajywzt
)
)
{
if
(
"00"
.
equals
(
ajywzt
)
||
"01"
.
equals
(
ajywzt
)
||
"02"
.
equals
(
ajywzt
)
||
"03"
.
equals
(
ajywzt
))
{
laztList
.
add
(
ajywzt
);
}
else
if
(
"06"
.
equals
(
ajywzt
)){
}
else
if
(
"05"
.
equals
(
ajywzt
)){
ycxajList
.
add
(
"05"
);
}
else
if
(
"06"
.
equals
(
ajywzt
)){
zczjztList
.
add
(
"00"
);
}
else
if
(
"07"
.
equals
(
ajywzt
)){
zczjztList
.
add
(
"01"
);
...
...
@@ -163,6 +166,7 @@ public class StringUtil {
}
map
.
put
(
"laztList"
,
laztList
);
map
.
put
(
"zczjztList"
,
zczjztList
);
map
.
put
(
"ycxajList"
,
ycxajList
);
}
return
map
;
}
...
...
src/main/java/org/springblade/founder/rybh/controller/XwRybhController.java
View file @
ea3a77e0
...
...
@@ -50,7 +50,9 @@ import org.springblade.core.boot.ctrl.BladeController;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 控制器
...
...
@@ -160,7 +162,10 @@ public class XwRybhController extends BladeController {
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
//queryWrapper.eq("asjbh",xwRybh.getAsjbh());
//queryWrapper.eq("bhrAsjxgrybh",xwRybh.getBhrAsjxgrybh());
queryWrapper
.
eq
(
"xxzjbh"
,
xwRybh
.
getXxzjbh
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"xxzjbh"
,
xwRybh
.
getXxzjbh
());
map
.
put
(
"xxscPdbz"
,
"0"
);
queryWrapper
.
allEq
(
map
);
int
r
=
xwRybhService
.
count
(
queryWrapper
);
if
(
r
>
0
){
UpdateWrapper
wrapper
=
new
UpdateWrapper
();
...
...
src/main/java/org/springblade/founder/utils/HttpUtil.java
View file @
ea3a77e0
...
...
@@ -30,8 +30,8 @@ public class HttpUtil {
// Prepare a request object
HttpGet
httpget
=
new
HttpGet
(
uri
);
RequestConfig
requestConfig
=
RequestConfig
.
custom
().
setConnectTimeout
(
5000
).
setConnectionRequestTimeout
(
5000
).
setSocketTimeout
(
5000
).
build
();
httpget
.
setConfig
(
requestConfig
);
//
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(5000).setSocketTimeout(5000).build();
//
httpget.setConfig(requestConfig);
// Execute the request
HttpResponse
response
=
null
;
try
{
...
...
src/main/java/org/springblade/founder/xtrz/controller/XtrzController.java
View file @
ea3a77e0
...
...
@@ -4,15 +4,13 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springblade.core.secure.utils.SecureUtil
;
import
org.springblade.founder.utils.R
;
import
org.springblade.founder.xtrz.service.
x
trzService
;
import
org.springblade.founder.xtrz.service.
IX
trzService
;
import
org.springblade.modules.system.entity.XzxtUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
/**
* Created by libin on 2018/4/12.
* 登录控制类
...
...
@@ -22,7 +20,7 @@ public class XtrzController {
private
Logger
log
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
@Autowired
private
x
trzService
loginService
;
private
IX
trzService
loginService
;
@RequestMapping
(
"/addSysDlrz"
)
@ResponseBody
...
...
src/main/java/org/springblade/founder/xtrz/service/
x
trzService.java
→
src/main/java/org/springblade/founder/xtrz/service/
IX
trzService.java
View file @
ea3a77e0
...
...
@@ -6,7 +6,9 @@ import org.springblade.modules.system.entity.XzxtUser;
/**
* Created by libin on 2018/4/12.
*/
public
interface
x
trzService
{
public
interface
IX
trzService
{
String
saveSysDlrz
(
XzxtUser
user
)
throws
Exception
;
void
addAjtqGnsyrz
(
XzxtUser
user
,
String
czxxLbdm
,
String
yymcJyqk
,
String
czxxParam
);
}
src/main/java/org/springblade/founder/xtrz/service/impl/XtrzServiceImpl.java
→
src/main/java/org/springblade/founder/xtrz/service/impl/
I
XtrzServiceImpl.java
View file @
ea3a77e0
package
org
.
springblade
.
founder
.
xtrz
.
service
.
impl
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
org.springblade.founder.xtrz.entity.SysDlrz
;
import
org.springblade.founder.xtrz.entity.SysGnsyrz
;
import
org.springblade.founder.xtrz.mapper.XtrzMapper
;
import
org.springblade.founder.xtrz.service.
x
trzService
;
import
org.springblade.founder.xtrz.service.
IX
trzService
;
import
org.springblade.modules.auth.utils.TokenUtil
;
import
org.springblade.modules.system.entity.XzxtUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -18,7 +17,7 @@ import java.util.*;
* Created by libin on 2018/4/12.
*/
@Service
public
class
XtrzServiceImpl
implements
x
trzService
{
public
class
IXtrzServiceImpl
implements
IX
trzService
{
@Autowired
private
XtrzMapper
loginDao
;
...
...
@@ -63,6 +62,68 @@ public class XtrzServiceImpl implements xtrzService {
return
rzlsh
;
}
//记录功能使用日志
@Override
@DS
(
"db1"
)
public
void
addAjtqGnsyrz
(
XzxtUser
user
,
String
czxxLbdm
,
String
yymcJyqk
,
String
czxxParam
)
{
//拼接日志流水号
//公安机关机构代码(前6位)
String
qlw
=
user
.
getUnitcode
().
substring
(
0
,
6
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
//8位年月日
String
sjdate
=
formatter
.
format
(
new
Date
());
String
lsh
=
getOrderIdByUUId
();
String
yrzlsh
=
qlw
+
sjdate
+
lsh
;
String
rzlsh
=
yrzlsh
.
replace
(
" "
,
""
);
SysGnsyrz
sysGnsyrz
=
new
SysGnsyrz
();
sysGnsyrz
.
setRzlsh
(
rzlsh
);
sysGnsyrz
.
setYymcJyqk
(
yymcJyqk
);
sysGnsyrz
.
setYhGmsfhm
(
user
.
getIdentitycard
());
// 1.6新增字段
sysGnsyrz
.
setYhXm
(
user
.
getRealname
());
sysGnsyrz
.
setYymcdm
(
""
);
sysGnsyrz
.
setYwbhlxdm
(
""
);
sysGnsyrz
.
setYwbh
(
""
);
sysGnsyrz
.
setCxnrlbdm
(
""
);
sysGnsyrz
.
setCxnrbh
(
""
);
sysGnsyrz
.
setCxxxjg
(
""
);
String
ip
=
""
;
try
{
ip
=
TokenUtil
.
getIp
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
sysGnsyrz
.
setYhIp
(
ip
);
sysGnsyrz
.
setYhdwGajgjgdm
(
user
.
getUnitcode
());
sysGnsyrz
.
setYhdwGajgmc
(
user
.
getUnitname
());
sysGnsyrz
.
setCzlxdm
(
czxxLbdm
);
sysGnsyrz
.
setCzxxJyqk
(
czxxParam
);
sysGnsyrz
.
setXxscPdbz
(
"0"
);
sysGnsyrz
.
setXxdjdwGajgjgdm
(
user
.
getUnitcode
());
sysGnsyrz
.
setXxdjdwGajgmc
(
user
.
getUnitname
());
sysGnsyrz
.
setXxdjryXm
(
user
.
getRealname
());
sysGnsyrz
.
setXxdjryGmsfhm
(
user
.
getIdentitycard
());
sysGnsyrz
.
setXxdjryLxdh
(
user
.
getPhone
());
sysGnsyrz
.
setXxczdwGajgjgdm
(
user
.
getUnitcode
());
sysGnsyrz
.
setXxczdwGajgmc
(
user
.
getUnitname
());
sysGnsyrz
.
setXxczryXm
(
user
.
getRealname
());
sysGnsyrz
.
setXxczryGmsfhm
(
user
.
getIdentitycard
());
sysGnsyrz
.
setXxlyms
(
"系统功能日志"
);
sysGnsyrz
.
setXtlx
(
"MAXT"
);
try
{
loginDao
.
addGnsyrz
(
sysGnsyrz
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
static
String
getOrderIdByUUId
()
{
int
machineId
=
1
;
//最大支持1-9个集群机器部署
int
hashCodeV
=
UUID
.
randomUUID
().
toString
().
hashCode
();
...
...
src/main/java/org/springblade/founder/zbfzxyr/controller/XwZbfzxyrController.java
View file @
ea3a77e0
...
...
@@ -50,7 +50,9 @@ import org.springblade.core.boot.ctrl.BladeController;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 控制器
...
...
@@ -87,7 +89,10 @@ public class XwZbfzxyrController extends BladeController {
xwZbfzxyr
.
setXxscPdbz
(
"0"
);
boolean
flag
=
false
;
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"xxzjbh"
,
xwZbfzxyr
.
getXxzjbh
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"xxzjbh"
,
xwZbfzxyr
.
getXxzjbh
());
map
.
put
(
"xxscPdbz"
,
"0"
);
queryWrapper
.
allEq
(
map
);
int
r
=
xwZbfzxyrService
.
count
(
queryWrapper
);
if
(
r
>
0
){
UpdateWrapper
wrapper
=
new
UpdateWrapper
();
...
...
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