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
6830d515
Commit
6830d515
authored
Mar 30, 2023
by
宋珺琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
....
parent
4f3b7b94
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
5 deletions
+189
-5
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KshServicePojo.java
+7
-0
common/service_base/src/main/java/com/founder/servicebase/controller/KshServiceController.java
+103
-3
service/publicapi/src/main/java/com/founder/publicapi/controller/KshService/KshSlServiceController.java
+6
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/yangyang/ZtryController.java
+73
-2
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KshServicePojo.java
View file @
6830d515
...
@@ -78,4 +78,11 @@ public class KshServicePojo extends Model<KshServicePojo> {
...
@@ -78,4 +78,11 @@ public class KshServicePojo extends Model<KshServicePojo> {
@ApiModelProperty
(
value
=
"路由名称"
)
@ApiModelProperty
(
value
=
"路由名称"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
int
pageSize
;
private
int
pageSize
;
//双击节点查询 前端把类型传过来 后台做校验
@ApiModelProperty
(
value
=
"类型"
)
@TableField
(
exist
=
false
)
private
String
objectType
;
@TableField
(
exist
=
false
)
private
int
num
=
2
;
}
}
common/service_base/src/main/java/com/founder/servicebase/controller/KshServiceController.java
View file @
6830d515
...
@@ -37,8 +37,11 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -37,8 +37,11 @@ import javax.servlet.http.HttpServletResponse;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* 服务列表(KshServicePojo)表控制层
* 服务列表(KshServicePojo)表控制层
...
@@ -144,7 +147,7 @@ public class KshServiceController extends ApiController {
...
@@ -144,7 +147,7 @@ public class KshServiceController extends ApiController {
@OperLog
(
message
=
"查询可视化服务列表信息"
,
operation
=
OperationType
.
QUERY
)
@OperLog
(
message
=
"查询可视化服务列表信息"
,
operation
=
OperationType
.
QUERY
)
public
MapRestResult
query
(
@RequestBody
KshServicePojo
kshServicePojo
)
{
public
MapRestResult
query
(
@RequestBody
KshServicePojo
kshServicePojo
)
{
//分页
//分页
Page
page
=
new
Page
(
kshServicePojo
.
getPage
(),
kshServicePojo
.
getPageSize
());
//
Page page = new Page(kshServicePojo.getPage(), kshServicePojo.getPageSize());
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
if
(
kshServicePojo
.
getSlname
()!=
null
&&
!
kshServicePojo
.
getSlname
().
equals
(
""
)){
if
(
kshServicePojo
.
getSlname
()!=
null
&&
!
kshServicePojo
.
getSlname
().
equals
(
""
)){
...
@@ -168,8 +171,105 @@ public class KshServiceController extends ApiController {
...
@@ -168,8 +171,105 @@ public class KshServiceController extends ApiController {
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
orderByDesc
(
"cjsj"
);
queryWrapper
.
orderByDesc
(
"cjsj"
);
IPage
page1
=
kshService
.
page
(
page
,
queryWrapper
);
// IPage<KshServicePojo> page1 = kshService.page(page, queryWrapper);
return
new
MapRestResult
(
200
,
"OK"
,
page1
.
getTotal
(),
page1
.
getRecords
());
List
<
KshServicePojo
>
list1
=
kshService
.
list
(
queryWrapper
);
//接收前端传过来的传参类型 类型去跟每条算例的json入参做判断
String
objectType
=
kshServicePojo
.
getObjectType
();
if
(!
StringUtil
.
isEmpty
(
objectType
)){
for
(
KshServicePojo
record
:
list1
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
record
.
getParam
());
JSONArray
param
=
object
.
getJSONArray
(
"param"
);
for
(
int
i
=
0
;
i
<
param
.
size
();
i
++)
{
// 虚实关联 四码关联 涉案信息 加上下拉框选项 赋值给checked字段是什么类型返回回去
if
(
record
.
getSlname
().
equals
(
"虚实关联"
)){
if
(
param
.
getJSONObject
(
i
).
containsKey
(
"checked"
)){
if
(
objectType
.
equals
(
"idcard"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"01"
);
}
else
if
(
objectType
.
equals
(
"jz"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"02"
);
}
else
if
(
objectType
.
equals
(
"hz"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"03"
);
}
else
if
(
objectType
.
equals
(
"sjk"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"04"
);
}
else
if
(
objectType
.
equals
(
"wlzh"
)||
objectType
.
equals
(
"wxid"
)||
objectType
.
equals
(
"qq"
)||
objectType
.
equals
(
"other"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"05"
);
}
}
}
if
(
record
.
getSlname
().
equals
(
"四码关联"
))
{
if
(
param
.
getJSONObject
(
i
).
containsKey
(
"checked"
))
{
if
(
objectType
.
equals
(
"sjk"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"01"
);
}
else
if
(
objectType
.
equals
(
"imsi"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"02"
);
}
else
if
(
objectType
.
equals
(
"imei"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"03"
);
}
}
}
if
(
record
.
getSlname
().
equals
(
"涉案信息"
))
{
if
(
param
.
getJSONObject
(
i
).
containsKey
(
"checked"
))
{
if
(
objectType
.
equals
(
"idcard"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"01"
);
}
else
if
(
objectType
.
equals
(
"cph"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"02"
);
}
else
if
(
objectType
.
equals
(
"aj"
)){
param
.
getJSONObject
(
i
).
put
(
"checked"
,
"03"
);
}
}
}
//判断是param数组是否存在mold节点
if
(
param
.
getJSONObject
(
i
).
containsKey
(
"mold"
)){
//如果存在 获取mold数组判断是否存在前端传来的值类型
JSONArray
mold
=
param
.
getJSONObject
(
i
).
getJSONArray
(
"mold"
);
if
(
mold
.
contains
(
objectType
)){
System
.
out
.
println
(
"存在"
);
param
.
getJSONObject
(
i
).
put
(
"flag"
,
"true"
);
if
(
record
.
getSlname
().
equals
(
"家谱关系"
)||
record
.
getSlname
().
equals
(
"同案关系"
)||
record
.
getSlname
().
equals
(
"虚实关联"
)||
record
.
getSlname
().
equals
(
"四码关联"
)||
record
.
getSlname
().
equals
(
"涉案信息"
)){
record
.
setNum
(
0
);
}
else
{
record
.
setNum
(
1
);
}
}
}
}
object
.
put
(
"param"
,
param
);
record
.
setParam
(
object
.
toString
());
}
//根据flag排序 为true的在前
List
<
KshServicePojo
>
collect
=
list1
.
stream
().
sorted
(
Comparator
.
comparing
(
KshServicePojo:
:
getNum
))
.
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
collect
);
//分页
int
page
=
kshServicePojo
.
getPage
();
int
pageSize
=
kshServicePojo
.
getPageSize
();
int
total
=
collect
.
size
();
if
(
total
>
pageSize
)
{
int
toIndex
=
pageSize
*
page
;
if
(
toIndex
>
total
)
{
toIndex
=
total
;
}
collect
=
collect
.
subList
(
pageSize
*
(
page
-
1
),
toIndex
);
}
return
new
MapRestResult
(
200
,
"OK"
,
list1
.
size
(),
collect
);
}
else
{
//分页
int
page
=
kshServicePojo
.
getPage
();
int
pageSize
=
kshServicePojo
.
getPageSize
();
int
total
=
list1
.
size
();
if
(
total
>
pageSize
)
{
int
toIndex
=
pageSize
*
page
;
if
(
toIndex
>
total
)
{
toIndex
=
total
;
}
list1
=
list1
.
subList
(
pageSize
*
(
page
-
1
),
toIndex
);
}
//根据时间降序
list1
.
sort
((
t1
,
t2
)
->
t2
.
getCjsj
().
compareTo
(
t1
.
getCjsj
()));
return
new
MapRestResult
(
200
,
"OK"
,
list1
.
size
(),
list1
);
}
}
}
@PostMapping
(
"kshlbExport"
)
@PostMapping
(
"kshlbExport"
)
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/KshService/KshSlServiceController.java
View file @
6830d515
package
com
.
founder
.
publicapi
.
controller
.
KshService
;
package
com
.
founder
.
publicapi
.
controller
.
KshService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
...
@@ -20,6 +22,10 @@ import org.springframework.web.bind.annotation.*;
...
@@ -20,6 +22,10 @@ import org.springframework.web.bind.annotation.*;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
java
.
util
.
stream
.
Collectors
.
collectingAndThen
;
import
static
java
.
util
.
stream
.
Collectors
.
toCollection
;
/**
/**
* 可视化算例6个接口
* 可视化算例6个接口
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/yangyang/ZtryController.java
View file @
6830d515
...
@@ -50,11 +50,80 @@ public class ZtryController {
...
@@ -50,11 +50,80 @@ public class ZtryController {
QueryWrapper
<
TbStZtryShgx
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
TbStZtryShgx
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"zjhm"
,
tbStZtryShgx
.
getZjhm
());
wrapper
.
eq
(
"zjhm"
,
tbStZtryShgx
.
getZjhm
());
wrapper
.
orderByDesc
(
"qmd"
);
wrapper
.
orderByDesc
(
"qmd"
);
IPage
iPage
=
tbStZtryShgxMapper
.
selectPage
(
new
Page
(
tbStZtryShgx
.
getPage
(),
tbStZtryShgx
.
getLimit
()),
wrapper
);
IPage
<
TbStZtryShgx
>
iPage
=
tbStZtryShgxMapper
.
selectPage
(
new
Page
(
tbStZtryShgx
.
getPage
(),
tbStZtryShgx
.
getLimit
()),
wrapper
);
return
new
MapRestResult
(
200
,
"ok"
,
iPage
.
getTotal
(),
iPage
.
getRecords
());
Hnkshresult
result
=
new
Hnkshresult
();
kshdata
kshdata
=
new
kshdata
();
dataSumup
dataSumup
=
new
dataSumup
();
List
<
String
>
sumup
=
new
ArrayList
<>();
List
<
HnTbStRygxDTO
>
nodes
=
new
ArrayList
<>();
List
<
kshlinks
>
re
=
new
ArrayList
<>();
for
(
TbStZtryShgx
record
:
iPage
.
getRecords
())
{
HnTbStRygxDTO
node
=
node
(
record
.
getBzzjhm
(),
record
.
getBzzjhm
(),
"idcard"
,
null
);
nodes
.
add
(
node
);
sumup
.
add
(
record
.
getBzzjhm
());
kshlinks
link
=
link
(
tbStZtryShgx
.
getZjhm
(),
record
.
getBzzjhm
(),
"ces"
,
null
,
tbStZtryShgx
.
getZjhm
(),
"idcard"
,
record
.
getBzzjhm
(),
"idcard"
,
"ke"
,
"cesss"
,
null
);
re
.
add
(
link
);
}
//对nodes去重
ArrayList
<
HnTbStRygxDTO
>
collect1
=
nodes
.
stream
().
collect
(
collectingAndThen
(
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
HnTbStRygxDTO:
:
getId
))),
ArrayList:
:
new
));
kshdata
.
setNodes
(
collect1
);
//对links去重
ArrayList
<
kshlinks
>
collect2
=
re
.
stream
()
.
collect
(
collectingAndThen
(
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
o
->
o
.
getSource
()
+
";"
+
o
.
getTarget
()))),
ArrayList:
:
new
));
kshdata
.
setLinks
(
collect2
);
//对sumup去重
List
<
String
>
collect
=
sumup
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
dataSumup
.
setList
(
collect
);
dataSumup
.
setName
(
"同行分析"
);
result
.
setKshdata
(
kshdata
);
result
.
setDataSumup
(
dataSumup
);
return
new
MapRestResult
(
200
,
"ok"
,
result
);
// return new MapRestResult(200,"ok",iPage.getTotal(),iPage.getRecords());
}
public
HnTbStRygxDTO
node
(
String
id
,
String
lable
,
String
imgType
,
String
boderColor
){
HnTbStRygxDTO
mergeDTOgjd
=
new
HnTbStRygxDTO
();
mergeDTOgjd
.
setId
(
id
);
mergeDTOgjd
.
setLabel
(
lable
);
Kshpropertice
kshpropertice
=
new
Kshpropertice
();
kshpropertice
.
setId
(
id
);
kshpropertice
.
setLabel
(
lable
);
kshpropertice
.
setImgType
(
imgType
);
kshpropertice
.
setBoderColor
(
boderColor
);
mergeDTOgjd
.
setProperties
(
kshpropertice
);
return
mergeDTOgjd
;
}
}
public
kshlinks
link
(
String
source
,
String
target
,
String
label
,
String
time
,
String
bsh
,
String
bshlx
,
String
glbsh
,
String
glbshlx
,
String
sjly
,
String
glgx
,
String
glsj
){
kshlinks
kshlink
=
new
kshlinks
();
kshlink
.
setSource
(
source
);
kshlink
.
setTarget
(
target
);
kshlink
.
setLabel
(
label
);
Linkspropertice
linkspropertice
=
new
Linkspropertice
();
linkspropertice
.
setTime
(
time
);
linkspropertice
.
setSource
(
source
);
linkspropertice
.
setTarget
(
target
);
linkspropertice
.
setLabel
(
label
);
GlgxData
glgxData
=
new
GlgxData
();
List
<
GlgxData
>
list
=
new
ArrayList
<>();
glgxData
.
setBsh
(
bsh
);
glgxData
.
setBshlx
(
bshlx
);
glgxData
.
setGlbsh
(
glbsh
);
glgxData
.
setGlbshlx
(
glbshlx
);
glgxData
.
setSjly
(
sjly
);
glgxData
.
setGlgx
(
glgx
);
glgxData
.
setGlsj
(
glsj
);
list
.
add
(
glgxData
);
linkspropertice
.
setGlgxData
(
list
);
kshlink
.
setProperties
(
linkspropertice
);
return
kshlink
;
}
@PostMapping
(
"shgxDetailQuery"
)
@PostMapping
(
"shgxDetailQuery"
)
@ApiOperation
(
value
=
"在逃人员社会关系详情查询"
)
@ApiOperation
(
value
=
"在逃人员社会关系详情查询"
)
@OperLog
(
message
=
"在逃人员社会关系详情查询"
,
operation
=
OperationType
.
QUERY
)
@OperLog
(
message
=
"在逃人员社会关系详情查询"
,
operation
=
OperationType
.
QUERY
)
...
@@ -358,6 +427,8 @@ public class ZtryController {
...
@@ -358,6 +427,8 @@ public class ZtryController {
return
new
MapRestResult
(
200
,
"ok"
,
result
);
return
new
MapRestResult
(
200
,
"ok"
,
result
);
}
}
public
static
void
main
(
String
[]
args
)
{
}
}
}
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