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
b73a0d19
Commit
b73a0d19
authored
Oct 18, 2022
by
YANGYANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖南相关接口调整处理
parent
a8077ed7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
352 additions
and
41 deletions
+352
-41
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/kshEntity/KshServiceCache.java
+71
-0
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KshServicePojo.java
+16
-0
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KsjResultCheck.java
+21
-4
common/service_base/src/main/java/com/founder/servicebase/controller/KshServiceController.java
+108
-19
common/service_base/src/main/java/com/founder/servicebase/controller/SysUserController.java
+1
-1
common/service_base/src/main/java/com/founder/servicebase/mapper/mysqlMapper/KshCacheMapper.java
+18
-0
common/service_base/src/main/java/com/founder/servicebase/service/KshCacheService.java
+15
-0
common/service_base/src/main/java/com/founder/servicebase/service/serviceimpl/KshCacheServiceImpl.java
+28
-0
common/service_base/src/main/java/com/founder/servicebase/service/serviceimpl/KshServiceImpl.java
+1
-2
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
+10
-6
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkTrailController.java
+63
-9
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/kshEntity/KshServiceCache.java
0 → 100644
View file @
b73a0d19
package
com
.
founder
.
commonutils
.
model
.
newPublicEntity
.
kshEntity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KsjResultPojo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
"ksh_service_cache"
)
@ApiModel
(
value
=
"可视化缓存表"
,
description
=
""
)
public
class
KshServiceCache
implements
Serializable
{
@TableId
(
type
=
IdType
.
INPUT
)
@ApiModelProperty
(
value
=
"主键编号"
)
@TableField
(
"xxzjbh"
)
private
String
xxzjbh
;
@ApiModelProperty
(
value
=
"登陆者证件号"
)
@TableField
(
"zjhm"
)
private
String
zjhm
;
@ApiModelProperty
(
value
=
"研判名称"
)
@TableField
(
"ypmc"
)
private
String
ypmc
;
@ApiModelProperty
(
value
=
"标识号"
)
@TableField
(
"bsh"
)
private
String
bsh
;
@ApiModelProperty
(
value
=
"标识号类型"
)
@TableField
(
"bshtype"
)
private
String
bshtype
;
@ApiModelProperty
(
value
=
"研判时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
cjsj
;
@ApiModelProperty
(
value
=
"备注"
)
@TableField
(
"bz"
)
private
String
bz
;
@ApiModelProperty
(
value
=
"可视化数据"
)
@TableField
(
"kshdata"
)
private
String
kshdataString
;
@ApiModelProperty
(
value
=
"当前页"
)
@TableField
(
exist
=
false
)
private
KsjResultPojo
kshdata
;
@ApiModelProperty
(
value
=
"当前页"
)
@TableField
(
exist
=
false
)
private
int
page
;
@ApiModelProperty
(
value
=
"每页数"
)
@TableField
(
exist
=
false
)
private
int
pageSize
;
}
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KshServicePojo.java
View file @
b73a0d19
...
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -58,6 +60,20 @@ public class KshServicePojo extends Model<KshServicePojo> {
...
@@ -58,6 +60,20 @@ public class KshServicePojo extends Model<KshServicePojo> {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
cjsj
;
private
Date
cjsj
;
/**
/**
* 创建开始时间
*/
@TableField
(
exist
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
cjkssj
;
/**
* 创建结束时间
*/
@TableField
(
exist
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
cjjssj
;
/**
* 当前页
* 当前页
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
...
...
common/common_utils/src/main/java/com/founder/commonutils/model/newPublicEntity/ztypEntity/KsjResultCheck.java
View file @
b73a0d19
...
@@ -11,14 +11,23 @@ import java.util.List;
...
@@ -11,14 +11,23 @@ import java.util.List;
@Data
@Data
public
class
KsjResultCheck
{
public
class
KsjResultCheck
{
p
ublic
Integer
status
;
// 200成功 201失败
p
rivate
Integer
status
;
// 200成功 201失败
p
ublic
String
msg
;
// 自定义描述
p
rivate
String
msg
;
// 自定义描述
Datas
data
;
private
data
data
;
@Data
public
static
class
data
{
private
kshdata
kshdata
;
private
dataSumup
dataSumup
;
}
@Data
@Data
public
static
class
Datas
{
public
static
class
kshdata
{
/**
/**
* 节点信息组(去重的)
* 节点信息组(去重的)
*/
*/
...
@@ -28,6 +37,14 @@ public class KsjResultCheck {
...
@@ -28,6 +37,14 @@ public class KsjResultCheck {
*/
*/
private
List
<
Links
>
links
;
private
List
<
Links
>
links
;
}
}
@Data
public
static
class
dataSumup
{
private
String
name
;
private
List
list
;
}
@Data
@Data
public
static
class
Nodes
{
public
static
class
Nodes
{
...
...
common/service_base/src/main/java/com/founder/servicebase/controller/KshServiceController.java
View file @
b73a0d19
package
com
.
founder
.
servicebase
.
controller
;
package
com
.
founder
.
servicebase
.
controller
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
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
;
...
@@ -7,12 +8,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -7,12 +8,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.api.ApiController
;
import
com.baomidou.mybatisplus.extension.api.ApiController
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.SysUser
;
import
com.founder.commonutils.model.newPublicEntity.kshEntity.KshServiceCache
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KshServicePojo
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KshServicePojo
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KsjResultCheck
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KsjResultCheck
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KsjResultPojo
;
import
com.founder.commonutils.util.KeyUtil
;
import
com.founder.commonutils.util.KeyUtil
;
import
com.founder.commonutils.util.StringUtil
;
import
com.founder.commonutils.util.StringUtil
;
import
com.founder.servicebase.logs.OperLog
;
import
com.founder.servicebase.logs.OperLog
;
import
com.founder.servicebase.logs.OperationType
;
import
com.founder.servicebase.logs.OperationType
;
import
com.founder.servicebase.service.KshCacheService
;
import
com.founder.servicebase.service.KshService
;
import
com.founder.servicebase.service.KshService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -23,7 +28,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -23,7 +28,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -42,6 +49,8 @@ public class KshServiceController extends ApiController {
...
@@ -42,6 +49,8 @@ public class KshServiceController extends ApiController {
*/
*/
@Resource
@Resource
private
KshService
kshService
;
private
KshService
kshService
;
@Resource
private
KshCacheService
kshCacheService
;
@PostMapping
(
"save"
)
@PostMapping
(
"save"
)
@ApiOperation
(
value
=
"新增可视化服务信息"
)
@ApiOperation
(
value
=
"新增可视化服务信息"
)
...
@@ -106,12 +115,23 @@ public class KshServiceController extends ApiController {
...
@@ -106,12 +115,23 @@ public class KshServiceController extends ApiController {
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
if
(
kshServicePojo
.
getSlname
()!=
null
&&
!
kshServicePojo
.
getSlname
().
equals
(
""
)){
if
(
kshServicePojo
.
getSlname
()!=
null
&&
!
kshServicePojo
.
getSlname
().
equals
(
""
)){
queryWrapper
.
like
(
"sl
n
ame"
,
kshServicePojo
.
getSlname
());
queryWrapper
.
like
(
"sl
N
ame"
,
kshServicePojo
.
getSlname
());
}
}
if
(
kshServicePojo
.
getLymc
()!=
null
&&
!
kshServicePojo
.
getLymc
().
equals
(
""
)){
if
(
kshServicePojo
.
getSlms
()!=
null
&&
!
kshServicePojo
.
getSlms
().
equals
(
""
)){
queryWrapper
.
eq
(
"lymc"
,
kshServicePojo
.
getLymc
());
queryWrapper
.
like
(
"slms"
,
kshServicePojo
.
getSlms
());
}
if
(
kshServicePojo
.
getUrl
()!=
null
&&
!
kshServicePojo
.
getUrl
().
equals
(
""
)){
queryWrapper
.
like
(
"url"
,
kshServicePojo
.
getUrl
());
}
LocalDateTime
cjkssj
=
kshServicePojo
.
getCjkssj
();
LocalDateTime
cjjssj
=
kshServicePojo
.
getCjjssj
();
if
(
ObjectUtil
.
isNotNull
(
cjkssj
)
&&
ObjectUtil
.
isNotNull
(
cjjssj
))
{
queryWrapper
.
apply
(
"cjsj between'"
+
cjkssj
.
toString
()
+
"' and '"
+
cjjssj
.
toString
()
+
"'"
);
}
else
if
(
ObjectUtil
.
isNotNull
(
cjkssj
))
{
queryWrapper
.
apply
(
"cjsj >= '"
+
cjkssj
.
toString
()
+
"'"
);
}
else
if
(
ObjectUtil
.
isNotNull
(
cjjssj
))
{
queryWrapper
.
apply
(
"cjsj <= '"
+
cjjssj
.
toString
()
+
"'"
);
}
}
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
orderByDesc
(
"cjsj"
);
queryWrapper
.
orderByDesc
(
"cjsj"
);
...
@@ -134,21 +154,30 @@ public class KshServiceController extends ApiController {
...
@@ -134,21 +154,30 @@ public class KshServiceController extends ApiController {
boolean
flag
=
true
;
boolean
flag
=
true
;
//遍历所有字段
//遍历所有字段
for
(
Field
field
:
fields
)
{
for
(
Field
field
:
fields
)
{
//开启权限
//开启权限
field
.
setAccessible
(
true
);
field
.
setAccessible
(
true
);
//判断是否有值
//判断是否有值
if
(
StringUtils
.
isEmpty
(
field
.
get
(
ksjResultCheck
))&&
null
==
field
.
get
(
ksjResultCheck
)){
if
(
StringUtils
.
isEmpty
(
field
.
get
(
ksjResultCheck
))&&
null
==
field
.
get
(
ksjResultCheck
)){
flag
=
false
;
flag
=
false
;
text
=
"字段错误或空值:"
+
field
.
getName
();
text
=
"字段错误或空值:"
+
field
.
getName
();
break
;
break
;
}
}
//关闭权限
//关闭权限
field
.
setAccessible
(
false
);
field
.
setAccessible
(
false
);
}
//验证dataSumup
String
name
=
ksjResultCheck
.
getData
().
getDataSumup
().
getName
();
if
(
StringUtil
.
isEmpty
(
name
)
){
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
"name字段值错误"
);
}
}
// 继续验证
List
list
=
ksjResultCheck
.
getData
().
getDataSumup
().
getList
();
if
(
list
==
null
){
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
"list节点不存在"
);
}
// 继续验证kshdata
if
(
flag
){
if
(
flag
){
if
(
null
!=
ksjResultCheck
.
getData
().
getNodes
()){
if
(
null
!=
ksjResultCheck
.
getData
().
get
Kshdata
().
get
Nodes
()){
List
<
KsjResultCheck
.
Nodes
>
listNodes
=
ksjResultCheck
.
getData
().
getNodes
();
List
<
KsjResultCheck
.
Nodes
>
listNodes
=
ksjResultCheck
.
getData
().
get
Kshdata
().
get
Nodes
();
for
(
KsjResultCheck
.
Nodes
nodes:
listNodes
){
for
(
KsjResultCheck
.
Nodes
nodes:
listNodes
){
Field
[]
fieldsNodes
=
nodes
.
getClass
().
getDeclaredFields
();
// nodes验证
Field
[]
fieldsNodes
=
nodes
.
getClass
().
getDeclaredFields
();
// nodes验证
for
(
Field
field
:
fieldsNodes
)
{
for
(
Field
field
:
fieldsNodes
)
{
...
@@ -186,8 +215,8 @@ public class KshServiceController extends ApiController {
...
@@ -186,8 +215,8 @@ public class KshServiceController extends ApiController {
}
else
{
}
else
{
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
"字段错误:nodes"
);
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
"字段错误:nodes"
);
}
}
if
(
null
!=
ksjResultCheck
.
getData
().
getLinks
()){
if
(
null
!=
ksjResultCheck
.
getData
().
get
Kshdata
().
get
Links
()){
List
<
KsjResultCheck
.
Links
>
listLinks
=
ksjResultCheck
.
getData
().
getLinks
();
List
<
KsjResultCheck
.
Links
>
listLinks
=
ksjResultCheck
.
getData
().
get
Kshdata
().
get
Links
();
for
(
KsjResultCheck
.
Links
links:
listLinks
){
for
(
KsjResultCheck
.
Links
links:
listLinks
){
Field
[]
fieldsNodes
=
links
.
getClass
().
getDeclaredFields
();
// links验证
Field
[]
fieldsNodes
=
links
.
getClass
().
getDeclaredFields
();
// links验证
for
(
Field
field
:
fieldsNodes
)
{
for
(
Field
field
:
fieldsNodes
)
{
...
@@ -237,5 +266,65 @@ public class KshServiceController extends ApiController {
...
@@ -237,5 +266,65 @@ public class KshServiceController extends ApiController {
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
e
);
return
new
MapRestResult
(
201
,
"FAIL"
,
0
,
e
);
}
}
}
}
@PostMapping
(
"saveKshCache"
)
@ApiOperation
(
value
=
"多维情报_新增可视化缓存记录"
)
@OperLog
(
message
=
"多维情报_新增可视化缓存记录"
,
operation
=
OperationType
.
ADD
)
public
MapRestResult
saveKsh
(
@RequestBody
KshServiceCache
kshServiceCache
,
HttpServletRequest
request
)
{
SysUser
user
=
(
SysUser
)
request
.
getAttribute
(
"user"
);
kshServiceCache
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"KSH"
));
kshServiceCache
.
setZjhm
(
user
.
getIdentitycard
());
kshServiceCache
.
setKshdataString
(
JSONObject
.
toJSON
(
kshServiceCache
.
getKshdata
()).
toString
());
boolean
save
=
kshCacheService
.
save
(
kshServiceCache
);
if
(
save
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
().
error
(
"保存失败"
);
}
}
@PostMapping
(
"deleteKshCache"
)
@ApiOperation
(
value
=
"多维情报_删除可视化服务信息"
)
@OperLog
(
message
=
"多维情报_删除可视化服务信息"
,
operation
=
OperationType
.
DELETE
)
public
MapRestResult
deleteKshCacheById
(
String
xxzjbh
)
{
int
delete
=
kshCacheService
.
deleteKshCacheById
(
xxzjbh
);
if
(
delete
>
0
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
(
200
,
"无此xxzjbh"
,
null
);
}
}
@PostMapping
(
"queryKshCache"
)
@ApiOperation
(
value
=
"多维情报_查询可视化服务列表信息"
)
@OperLog
(
message
=
"多维情报_查询可视化服务列表信息"
,
operation
=
OperationType
.
QUERY
)
public
MapRestResult
KshCache
(
@RequestBody
KshServiceCache
kshServiceCache
,
HttpServletRequest
request
)
{
SysUser
user
=
(
SysUser
)
request
.
getAttribute
(
"user"
);
//分页
Page
page
=
new
Page
(
kshServiceCache
.
getPage
(),
kshServiceCache
.
getPageSize
());
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"zjhm"
,
user
.
getIdentitycard
());
queryWrapper
.
orderByDesc
(
"cjsj"
);
IPage
page1
=
kshCacheService
.
page
(
page
,
queryWrapper
);
List
<
KshServiceCache
>
listResult
=
page1
.
getRecords
();
listResult
.
stream
().
forEach
(
q
->{
q
.
setKshdata
(
JSON
.
parseObject
(
q
.
getKshdataString
(),
KsjResultPojo
.
class
));
});
return
new
MapRestResult
(
200
,
"OK"
,
page1
.
getTotal
(),
page1
.
getRecords
());
}
@PostMapping
(
"updateKshCache"
)
@ApiOperation
(
value
=
"多维情报_修改可视化服务信息"
)
@OperLog
(
message
=
"多维情报_修改可视化服务信息"
,
operation
=
OperationType
.
UPDATE
)
public
MapRestResult
updateKshCache
(
@RequestBody
KshServiceCache
kshServiceCache
)
{
kshServiceCache
.
setKshdataString
(
JSONObject
.
toJSON
(
kshServiceCache
.
getKshdata
()).
toString
());
boolean
update
=
kshCacheService
.
updateById
(
kshServiceCache
);
if
(
update
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
().
error
(
"更新失败"
);
}
}
}
}
common/service_base/src/main/java/com/founder/servicebase/controller/SysUserController.java
View file @
b73a0d19
...
@@ -102,7 +102,7 @@ public class SysUserController extends ApiController {
...
@@ -102,7 +102,7 @@ public class SysUserController extends ApiController {
String
KEY
=
"maplogin"
+
today
;
String
KEY
=
"maplogin"
+
today
;
String
IV
=
"map_vues"
+
today
;
String
IV
=
"map_vues"
+
today
;
// 用于api测试接口
// 用于api测试接口
if
(
"te
x
t"
.
equals
(
user
.
getIdentitycard
())){
if
(
"te
s
t"
.
equals
(
user
.
getIdentitycard
())){
// 从库中取一个身份证 进行单点登录用于测试接口是否通
// 从库中取一个身份证 进行单点登录用于测试接口是否通
SysUser
one
=
sysUserService
.
getOne
(
new
LambdaQueryWrapper
<
SysUser
>()
SysUser
one
=
sysUserService
.
getOne
(
new
LambdaQueryWrapper
<
SysUser
>()
...
...
common/service_base/src/main/java/com/founder/servicebase/mapper/mysqlMapper/KshCacheMapper.java
0 → 100644
View file @
b73a0d19
package
com
.
founder
.
servicebase
.
mapper
.
mysqlMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.founder.commonutils.model.newPublicEntity.kshEntity.KshServiceCache
;
import
org.springframework.stereotype.Component
;
/**
* 服务列表(SkService)表数据库访问层
*
* @author yangyang
* @since 2022-09-20 10:20:00
*/
@Component
public
interface
KshCacheMapper
extends
BaseMapper
<
KshServiceCache
>
{
}
common/service_base/src/main/java/com/founder/servicebase/service/KshCacheService.java
0 → 100644
View file @
b73a0d19
package
com
.
founder
.
servicebase
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.founder.commonutils.model.newPublicEntity.kshEntity.KshServiceCache
;
/**
* 服务列表(kshService)表服务接口
*
* @author yangyang
* @since 2022-09-20 10:20:00
*/
public
interface
KshCacheService
extends
IService
<
KshServiceCache
>
{
int
deleteKshCacheById
(
String
xxzjbh
);
}
common/service_base/src/main/java/com/founder/servicebase/service/serviceimpl/KshCacheServiceImpl.java
0 → 100644
View file @
b73a0d19
package
com
.
founder
.
servicebase
.
service
.
serviceimpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.founder.commonutils.model.newPublicEntity.kshEntity.KshServiceCache
;
import
com.founder.servicebase.mapper.mysqlMapper.KshCacheMapper
;
import
com.founder.servicebase.mapper.mysqlMapper.KshMapper
;
import
com.founder.servicebase.service.KshCacheService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 服务列表(SkService)表服务实现类
*
* @author yangyang
* @since 2022-09-20 16:11:56
*/
@Service
(
"KshCacheService"
)
public
class
KshCacheServiceImpl
extends
ServiceImpl
<
KshCacheMapper
,
KshServiceCache
>
implements
KshCacheService
{
@Autowired
KshCacheMapper
kshCacheMapper
;
@Override
public
int
deleteKshCacheById
(
String
xxzjbh
)
{
return
kshCacheMapper
.
deleteById
(
xxzjbh
);
}
}
common/service_base/src/main/java/com/founder/servicebase/service/serviceimpl/KshServiceImpl.java
View file @
b73a0d19
package
com
.
founder
.
servicebase
.
service
.
serviceimpl
;
package
com
.
founder
.
servicebase
.
service
.
serviceimpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KshServicePojo
;
import
com.founder.commonutils.model.newPublicEntity.ztypEntity.KshServicePojo
;
import
com.founder.servicebase.mapper.mysqlMapper.KshMapper
;
import
com.founder.servicebase.mapper.mysqlMapper.KshMapper
;
import
com.founder.servicebase.service.KshService
;
import
com.founder.servicebase.service.KshService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
View file @
b73a0d19
...
@@ -195,8 +195,11 @@ public class SkPointlocationController extends ApiController implements ExcelCon
...
@@ -195,8 +195,11 @@ public class SkPointlocationController extends ApiController implements ExcelCon
@ApiOperation
(
value
=
"以案侦查_设备点位信息查询"
)
@ApiOperation
(
value
=
"以案侦查_设备点位信息查询"
)
@OperLog
(
message
=
"公共_设备点位信息查询"
,
operation
=
OperationType
.
QUERY
)
@OperLog
(
message
=
"公共_设备点位信息查询"
,
operation
=
OperationType
.
QUERY
)
public
MapRestResult
queryGroupby
(
@RequestBody
SkPointlocationParamsGeo
skPointlocationaParamsGeo
)
{
public
MapRestResult
queryGroupby
(
@RequestBody
SkPointlocationParamsGeo
skPointlocationaParamsGeo
)
{
List
<
SkPointlocation
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
SkPointlocation
>>
listMap
=
new
HashMap
<>();
List
<
Point
>
geoametrys
=
skPointlocationaParamsGeo
.
getGeometrys
();
List
<
Point
>
geoametrys
=
skPointlocationaParamsGeo
.
getGeometrys
();
if
(
geoametrys
.
size
()>
0
)
{
if
(
null
!=
geoametrys
){
if
(
geoametrys
.
size
()>
0
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
// 多个点位即为多边形
// 多个点位即为多边形
...
@@ -213,12 +216,13 @@ public class SkPointlocationController extends ApiController implements ExcelCon
...
@@ -213,12 +216,13 @@ public class SkPointlocationController extends ApiController implements ExcelCon
}
else
if
(
StringUtils
.
isNotEmpty
(
skPointlocationaParamsGeo
.
getRadius
())){
}
else
if
(
StringUtils
.
isNotEmpty
(
skPointlocationaParamsGeo
.
getRadius
())){
queryWrapper
.
apply
(
"ST_Distance_Sphere(coordinates, POINT("
+
geoametrys
.
get
(
0
).
getX
()+
","
+
geoametrys
.
get
(
0
).
getY
()
+
")) < "
+
skPointlocationaParamsGeo
.
getRadius
());
queryWrapper
.
apply
(
"ST_Distance_Sphere(coordinates, POINT("
+
geoametrys
.
get
(
0
).
getX
()+
","
+
geoametrys
.
get
(
0
).
getY
()
+
")) < "
+
skPointlocationaParamsGeo
.
getRadius
());
}
}
List
<
SkPointlocation
>
list
=
skPointlocationService
.
list
(
queryWrapper
);
list
=
skPointlocationService
.
list
(
queryWrapper
);
Map
<
String
,
List
<
SkPointlocation
>>
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
SkPointlocation:
:
getObjectname
));
}
return
new
MapRestResult
(
200
,
"OK"
,
listMap
.
size
(),
listMap
);
}
else
{
return
MapRestResult
.
error
(
"边界数据必传!"
);
}
}
if
(
list
.
size
()>
0
){
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
SkPointlocation:
:
getObjectname
));
}
return
new
MapRestResult
(
200
,
"OK"
,
listMap
.
size
(),
listMap
);
}
}
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkTrailController.java
View file @
b73a0d19
...
@@ -344,30 +344,67 @@ public class SkTrailController extends ApiController implements ExcelControllerI
...
@@ -344,30 +344,67 @@ public class SkTrailController extends ApiController implements ExcelControllerI
listMapMd
=
new
ArrayList
<>(
valueResult1
.
entrySet
());
listMapMd
=
new
ArrayList
<>(
valueResult1
.
entrySet
());
listMapMd
=
(
ArrayList
<
Map
.
Entry
<
String
,
Object
>>)
listMapMd
.
stream
().
parallel
()
listMapMd
=
(
ArrayList
<
Map
.
Entry
<
String
,
Object
>>)
listMapMd
.
stream
().
parallel
()
.
limit
(
1
).
collect
(
Collectors
.
toList
());
.
limit
(
1
).
collect
(
Collectors
.
toList
());
String
lastGj
=
""
;
// 日期为空 展示暂无数据
String
lastGjCfd
=
""
;
// 日期为空 展示暂无数据
String
lastGjMdd
=
""
;
// 日期为空 展示暂无数据
String
lastCfd
=
""
;
// 数据为空 展示暂无数据
String
lastCfd
=
""
;
// 数据为空 展示暂无数据
String
lastMdd
=
""
;
// 数据为空 展示暂无数据
String
lastMdd
=
""
;
// 数据为空 展示暂无数据
String
lastCfdx
=
""
;
// 出发地经度
String
lastCfdy
=
""
;
// 出发地纬度
String
lastMddx
=
""
;
// 目的地经度
String
lastMddy
=
""
;
// 目的地纬度
String
lastGjCfdx
=
""
;
// 出发地经度
String
lastGjCfdy
=
""
;
// 出发地纬度
String
lastGjMddx
=
""
;
// 目的地经度
String
lastGjMddy
=
""
;
// 目的地纬度
if
((
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getDate
())||
StringUtil
.
isEmpty
(
records
.
get
(
1
).
getAddress
()))&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
if
((
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getDate
())||
StringUtil
.
isEmpty
(
records
.
get
(
1
).
getAddress
()))&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
lastGj
=
"暂无数据"
;
lastGjCfd
=
"暂无数据"
;
lastGjMdd
=
"暂无数据"
;
}
else
{
}
else
{
lastGj
=
records
.
get
(
0
).
getDate
()+
","
+
records
.
get
(
0
).
getAddress
()+
"—>"
+
records
.
get
(
1
).
getAddress
();
lastGjCfd
=
records
.
get
(
0
).
getAddress
()+
"("
+
records
.
get
(
0
).
getDate
()+
")"
;
lastGjMdd
=
records
.
get
(
1
).
getAddress
()+
"("
+
records
.
get
(
1
).
getDate
()+
")"
;
lastGjCfdx
=
records
.
get
(
0
).
getX
();
lastGjCfdy
=
records
.
get
(
0
).
getY
();
lastGjMddx
=
records
.
get
(
1
).
getX
();
lastGjMddy
=
records
.
get
(
1
).
getY
();
}
}
if
(
listMapMd
.
size
()==
0
&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
if
(
listMapMd
.
size
()==
0
&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
lastMdd
=
"暂无数据"
;
lastMdd
=
"暂无数据"
;
}
else
{
}
else
{
lastMdd
=
listMapMd
.
get
(
0
).
getKey
()+
"("
+
listMapMd
.
get
(
0
).
getValue
()+
"次"
+
")"
;
lastMdd
=
listMapMd
.
get
(
0
).
getKey
()+
"("
+
listMapMd
.
get
(
0
).
getValue
()+
"次"
+
")"
;
for
(
SkTrail
r:
records
){
if
(
null
!=
r
.
getAddress
()){
if
(
r
.
getAddress
().
equals
(
listMapMd
.
get
(
0
).
getKey
())){
lastMddx
=
r
.
getX
();
lastMddy
=
r
.
getY
();
}
}
}
}
}
if
(
listMapCf
.
size
()==
0
&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
if
(
listMapCf
.
size
()==
0
&&
"jdgj"
.
equals
(
sktrailParam
.
getLikeField
())){
lastCfd
=
"暂无数据"
;
lastCfd
=
"暂无数据"
;
}
else
{
}
else
{
lastCfd
=
listMapCf
.
get
(
0
).
getKey
()+
"("
+
listMapCf
.
get
(
0
).
getValue
()+
"次"
+
")"
;
lastCfd
=
listMapCf
.
get
(
0
).
getKey
()+
"("
+
listMapCf
.
get
(
0
).
getValue
()+
"次"
+
")"
;
for
(
SkTrail
r:
records
){
if
(
null
!=
r
.
getAddress
()){
if
(
r
.
getAddress
().
equals
(
listMapCf
.
get
(
0
).
getKey
())){
lastCfdx
=
r
.
getX
();
lastCfdy
=
r
.
getY
();
}
}
}
}
}
mapResult
.
put
(
"zxgj"
,
lastGj
);
// 最后两条数据即为 最新轨迹
mapResult
.
put
(
"zxgjCfd"
,
lastGjCfd
);
// 最后两条数据即为 最新轨迹
mapResult
.
put
(
"zxgjMdd"
,
lastGjMdd
);
mapResult
.
put
(
"sfdd"
,
lastCfd
);
mapResult
.
put
(
"sfdd"
,
lastCfd
);
mapResult
.
put
(
"mddd"
,
lastMdd
);
mapResult
.
put
(
"mddd"
,
lastMdd
);
mapResult
.
put
(
"sfddx"
,
lastCfdx
);
mapResult
.
put
(
"sfddy"
,
lastCfdy
);
mapResult
.
put
(
"mdddx"
,
lastMddx
);
mapResult
.
put
(
"mdddy"
,
lastMddy
);
mapResult
.
put
(
"zxgjCfdx"
,
lastGjCfdx
);
mapResult
.
put
(
"zxgjCfdy"
,
lastGjCfdy
);
mapResult
.
put
(
"zxgjMddx"
,
lastGjMddx
);
mapResult
.
put
(
"zxgjMddy"
,
lastGjMddy
);
}
else
if
(
"wbgj"
.
equals
(
sktrailParam
.
getLikeField
())||
"ldgj"
.
equals
(
sktrailParam
.
getLikeField
())){
}
else
if
(
"wbgj"
.
equals
(
sktrailParam
.
getLikeField
())||
"ldgj"
.
equals
(
sktrailParam
.
getLikeField
())){
records
.
stream
().
forEach
(
h
->{
records
.
stream
().
forEach
(
h
->{
if
(
StringUtils
.
isNotEmpty
(
h
.
getAddress
()))
{
if
(
StringUtils
.
isNotEmpty
(
h
.
getAddress
()))
{
...
@@ -390,14 +427,31 @@ public class SkTrailController extends ApiController implements ExcelControllerI
...
@@ -390,14 +427,31 @@ public class SkTrailController extends ApiController implements ExcelControllerI
listMapCf
=
(
ArrayList
<
Map
.
Entry
<
String
,
Object
>>)
listMapCf
.
stream
().
parallel
()
listMapCf
=
(
ArrayList
<
Map
.
Entry
<
String
,
Object
>>)
listMapCf
.
stream
().
parallel
()
.
limit
(
1
).
collect
(
Collectors
.
toList
());
.
limit
(
1
).
collect
(
Collectors
.
toList
());
String
lastGj
=
""
;
// 日期为空 展示暂无数据
String
lastGj
=
""
;
// 日期为空 展示暂无数据
String
lastGjx
=
""
;
// 最新位置x
String
lastGjy
=
""
;
// 最新位置y
String
lastCfdx
=
""
;
// 出发地经度
String
lastCfdy
=
""
;
// 出发地纬度
if
(
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getDate
())||
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getAddress
())){
if
(
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getDate
())||
StringUtil
.
isEmpty
(
records
.
get
(
0
).
getAddress
())){
lastGj
=
"暂无数据"
;
lastGj
=
"暂无数据"
;
}
else
{
}
else
{
lastGj
=
records
.
get
(
0
).
getDate
()+
","
+
records
.
get
(
0
).
getAddress
();
lastGj
=
records
.
get
(
0
).
getAddress
()+
"("
+
records
.
get
(
0
).
getDate
()+
")"
;
lastGjx
=
records
.
get
(
0
).
getX
();
lastGjy
=
records
.
get
(
0
).
getY
();
}
for
(
SkTrail
r:
records
){
if
(
null
!=
r
.
getAddress
()){
if
(
r
.
getAddress
().
equals
(
listMapCf
.
get
(
0
).
getKey
()))
{
lastCfdx
=
r
.
getX
();
lastCfdy
=
r
.
getY
();
}
}
}
}
mapResult
.
put
(
"zxgj"
,
lastGj
);
// 最后两条数据即为 最新轨迹
mapResult
.
put
(
"zxgj"
,
lastGj
);
// 最后两条数据即为 最新轨迹
mapResult
.
put
(
"dd"
,
listMapCf
.
get
(
0
).
getKey
()+
"("
+
listMapCf
.
get
(
0
).
getValue
()+
"次"
+
")"
);
mapResult
.
put
(
"dd"
,
listMapCf
.
get
(
0
).
getKey
()+
"("
+
listMapCf
.
get
(
0
).
getValue
()+
"次"
+
")"
);
mapResult
.
put
(
"zxgjx"
,
lastGjx
);
mapResult
.
put
(
"zxgjy"
,
lastGjy
);
mapResult
.
put
(
"ddx"
,
lastCfdx
);
mapResult
.
put
(
"ddy"
,
lastCfdy
);
}
}
}
}
return
new
MapRestResult
(
200
,
"OK"
,
mapResult
.
size
(),
mapResult
);
return
new
MapRestResult
(
200
,
"OK"
,
mapResult
.
size
(),
mapResult
);
...
...
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