Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
3ebc277e
Commit
3ebc277e
authored
Mar 31, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
c7d71b34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
UpointServiceImpl.java
.../java/com/gavel/kwell/service/impl/UpointServiceImpl.java
+14
-17
No files found.
gavel/src/main/java/com/gavel/kwell/service/impl/UpointServiceImpl.java
View file @
3ebc277e
package
com
.
gavel
.
kwell
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
...
...
@@ -26,6 +14,16 @@ import com.gavel.kwell.vo.DataPointItem;
import
com.gavel.kwell.vo.UpointCondition
;
import
com.gavel.kwell.vo.UpointVO
;
import
com.gavel.persistence.sql.RecordSet
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
(
"upointService"
)
...
...
@@ -84,15 +82,14 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
List
<
Upoint
>
ponitList
=
upointDao
.
queryList
(
PointTypeEnum
.
RIGN
.
getId
());
if
(
ponitList
==
null
||
ponitList
.
size
()==
0
){
logger
.
error
(
"点位信息未配置,请检查!"
);
return
Collections
.
EMPTY_LIST
;
return
new
ArrayList
<>()
;
}
List
<
String
>
tagList
=
ponitList
.
stream
().
map
(
Upoint:
:
getCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
valueMap
=
null
;
valueMap
=
redisConnection
.
multiGet
(
tagList
);
Map
<
String
,
Object
>
valueMap
=
redisConnection
.
multiGet
(
tagList
);
if
(
valueMap
==
null
||
valueMap
.
size
()==
0
)
{
logger
.
error
(
"读取采集点信息失败!"
);
return
ponitList
.
stream
().
map
(
p
->
new
DataPointItem
(
p
.
getCode
(),
p
.
getName
())).
collect
(
Collectors
.
toList
());
return
ponitList
.
stream
().
map
(
(
Upoint
p
)
->
new
DataPointItem
(
p
.
getCode
(),
p
.
getName
())).
collect
(
Collectors
.
toList
());
}
List
<
DataPointItem
>
dataPointItems
=
new
ArrayList
<
DataPointItem
>();
...
...
@@ -123,7 +120,7 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
}
catch
(
Exception
e
)
{
logger
.
error
(
"数据点采集出错!"
,
e
);
}
return
Collections
.
EMPTY_LIST
;
return
new
ArrayList
<>()
;
/* List<DataPointItem> dataPointItems = new ArrayList<DataPointItem>();
dataPointItems.add(new DataPointItem("R1",new Date().getTime(),1,"R1",0));
...
...
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