Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
89ffdf16
Commit
89ffdf16
authored
Jul 01, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物联网1.0
parent
b6ccd4b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
device-manager-ui/admin/src/views/sitestat/list.vue
device-manager-ui/admin/src/views/sitestat/list.vue
+2
-1
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+2
-1
device-manager/src/main/java/com/mortals/xhx/module/sitestat/service/impl/SitestatServiceImpl.java
...xhx/module/sitestat/service/impl/SitestatServiceImpl.java
+23
-5
No files found.
device-manager-ui/admin/src/views/sitestat/list.vue
View file @
89ffdf16
...
@@ -141,7 +141,8 @@ export default {
...
@@ -141,7 +141,8 @@ export default {
//this.getSiteMatterTableData();
//this.getSiteMatterTableData();
if
(
node
.
id
.
search
(
"
,
"
))
{
if
(
node
.
id
.
search
(
"
,
"
))
{
this
.
query
=
{
siteId
:
node
.
id
.
split
(
"
,
"
)[
0
]
};
//this.query = { siteId: node.id.split(",")[0] ,siteIdList:node.id.split(",")};
this
.
query
=
{
siteIdList
:
node
.
id
.
split
(
"
,
"
)};
}
else
{
}
else
{
this
.
query
=
{
siteId
:
node
.
id
};
this
.
query
=
{
siteId
:
node
.
id
};
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
89ffdf16
...
@@ -109,7 +109,7 @@ public class DeviceApiController {
...
@@ -109,7 +109,7 @@ public class DeviceApiController {
DeviceResp
deviceResp
=
new
DeviceResp
();
DeviceResp
deviceResp
=
new
DeviceResp
();
try
{
try
{
DeviceEntity
deviceEntity
=
checkDeviceExist
(
req
);
DeviceEntity
deviceEntity
=
checkDeviceExist
(
req
);
if
(
deviceEntity
.
getDeviceStatus
()
!
=
DeviceStatusEnum
.
未激活
.
getValue
())
{
if
(
deviceEntity
.
getDeviceStatus
()
=
=
DeviceStatusEnum
.
未激活
.
getValue
())
{
throw
new
AppException
(
"当前设备未激活,请在后台配置后再激活!"
);
throw
new
AppException
(
"当前设备未激活,请在后台配置后再激活!"
);
}
}
// if (deviceEntity.getStatus() != StatusEnum.启用.getValue()) {
// if (deviceEntity.getStatus() != StatusEnum.启用.getValue()) {
...
@@ -326,6 +326,7 @@ public class DeviceApiController {
...
@@ -326,6 +326,7 @@ public class DeviceApiController {
ServerInfo
serverInfo
=
new
ServerInfo
();
ServerInfo
serverInfo
=
new
ServerInfo
();
serverInfo
.
setHomeUrl
(
platformEntity
.
getHomeUrl
());
serverInfo
.
setHomeUrl
(
platformEntity
.
getHomeUrl
());
serverInfo
.
setServerUrl
(
platformEntity
.
getSendUrl
());
serverInfo
.
setServerUrl
(
platformEntity
.
getSendUrl
());
registerResp
.
setServiceInfo
(
serverInfo
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
...
...
device-manager/src/main/java/com/mortals/xhx/module/sitestat/service/impl/SitestatServiceImpl.java
View file @
89ffdf16
...
@@ -27,10 +27,7 @@ import com.mortals.xhx.module.sitestat.model.SitestatEntity;
...
@@ -27,10 +27,7 @@ import com.mortals.xhx.module.sitestat.model.SitestatEntity;
import
com.mortals.xhx.module.sitestat.service.SitestatService
;
import
com.mortals.xhx.module.sitestat.service.SitestatService
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -65,8 +62,29 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
...
@@ -65,8 +62,29 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
Result
<
SitestatEntity
>
res
=
new
Result
<>();
Result
<
SitestatEntity
>
res
=
new
Result
<>();
//根据站点查询所以站点子集列表
//根据站点查询所以站点子集列表
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSiteIdList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSiteIdList
()))
{
// TODO: 2022/7/1 站点为多站点时候合并
// TODO: 2022/7/1 站点为多站点时候合并
List
<
SitestatEntity
>
collect
=
entity
.
getSiteIdList
().
stream
().
flatMap
(
siteId
->
{
SitePdu
sitePdu
=
new
SitePdu
();
sitePdu
.
setId
(
siteId
);
Rest
<
List
<
SitePdu
>>
result
=
siteFeign
.
getFlatSitesBySiteId
(
sitePdu
);
if
(
result
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//根据返回的id 筛选列表
Map
<
Long
,
SitestatEntity
>
collectMap
=
this
.
find
(
new
SitestatEntity
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getSiteId
(),
y
->
y
,
(
o
,
n
)
->
n
));
List
<
SitestatEntity
>
list
=
result
.
getData
().
stream
().
filter
(
f
->
collectMap
.
containsKey
(
f
.
getId
())).
map
(
m
->
collectMap
.
get
(
m
.
getId
())).
collect
(
Collectors
.
toList
());
return
list
.
stream
();
}
return
new
ArrayList
<
SitestatEntity
>().
stream
();
}).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSiteName
()))
{
collect
=
MemoryPagination
.
search
(
entity
.
getSiteName
(),
collect
);
}
pageInfo
.
setTotalResult
(
collect
.
size
());
List
<
SitestatEntity
>
siteStatList
=
MemoryPagination
.
pagination
(
collect
,
pageInfo
.
getCurrPage
(),
pageInfo
.
getPrePageResult
());
res
.
setList
(
siteStatList
);
res
.
setPageInfo
(
pageInfo
);
return
res
;
}
}
if
(
ObjectUtils
.
isEmpty
(
entity
.
getSiteId
()))
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getSiteId
()))
{
...
...
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