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
b9c0e8d9
Commit
b9c0e8d9
authored
Mar 31, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes
parents
8a8bed88
3ebc277e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
GpfkDaoImpl.java
...l/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
+4
-4
UpointServiceImpl.java
.../java/com/gavel/kwell/service/impl/UpointServiceImpl.java
+14
-17
No files found.
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkDaoImpl.java
View file @
b9c0e8d9
...
@@ -1841,20 +1841,20 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
...
@@ -1841,20 +1841,20 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
@Override
@Override
public
GpfkVO
queryDailyFkInfoUpgrade
(
GpfkCondition
condition
)
{
public
GpfkVO
queryDailyFkInfoUpgrade
(
GpfkCondition
condition
)
{
SqlMap
sqlMap
=
new
SqlMap
();
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
" select sum(gpfkjg_fksl) from gpfkjg "
);
sqlMap
.
append
(
" select sum(gpfkjg_fksl)
as GPFK_FKSL, sum(GPFKJG_BHGSL) as GPFK_BHGSL, sum(GPFKJG_HGSL) as GPFK_HGSL
from gpfkjg "
);
sqlMap
.
append
(
" left join bzgx on bzgx_id = gpfkjg_bzgxid "
);
sqlMap
.
append
(
" left join bzgx on bzgx_id = gpfkjg_bzgxid "
);
sqlMap
.
append
(
" where 1 = 1"
);
sqlMap
.
append
(
" where 1 = 1"
);
sqlMap
.
append
(
" and bzgx_gxlx ='ZP' "
);
sqlMap
.
append
(
" and bzgx_gxlx ='ZP' "
);
if
(
StringUtils
.
isNotEmpty
(
condition
.
getBxid
())){
if
(
StringUtils
.
isNotEmpty
(
condition
.
getBxid
())){
sqlMap
.
append
(
" and
c.
GPFKJG_FKBX = :pBXID "
);
sqlMap
.
append
(
" and GPFKJG_FKBX = :pBXID "
);
sqlMap
.
setParamValue
(
"pBXID"
,
condition
.
getBxid
());
sqlMap
.
setParamValue
(
"pBXID"
,
condition
.
getBxid
());
}
}
if
(
StringUtils
.
isNotEmpty
(
condition
.
getFkrid
())){
if
(
StringUtils
.
isNotEmpty
(
condition
.
getFkrid
())){
sqlMap
.
append
(
" and
c.
GPFKJG_FKRID = :pFKRID "
);
sqlMap
.
append
(
" and GPFKJG_FKRID = :pFKRID "
);
sqlMap
.
setParamValue
(
"pFKRID"
,
condition
.
getFkrid
());
sqlMap
.
setParamValue
(
"pFKRID"
,
condition
.
getFkrid
());
}
}
if
(
condition
.
getYwrq
()
!=
null
)
{
if
(
condition
.
getYwrq
()
!=
null
)
{
sqlMap
.
append
(
" and
c.
GPFKJG_YWRQ >= :pYWRQ "
);
sqlMap
.
append
(
" and GPFKJG_YWRQ >= :pYWRQ "
);
sqlMap
.
setParamValue
(
"pYWRQ"
,
condition
.
getYwrq
());
sqlMap
.
setParamValue
(
"pYWRQ"
,
condition
.
getYwrq
());
}
}
return
sqlMap
.
queryEntity
(
GpfkVO
.
class
);
return
sqlMap
.
queryEntity
(
GpfkVO
.
class
);
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/UpointServiceImpl.java
View file @
b9c0e8d9
package
com
.
gavel
.
kwell
.
service
.
impl
;
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.alibaba.fastjson.JSONObject
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
...
@@ -26,6 +14,16 @@ import com.gavel.kwell.vo.DataPointItem;
...
@@ -26,6 +14,16 @@ import com.gavel.kwell.vo.DataPointItem;
import
com.gavel.kwell.vo.UpointCondition
;
import
com.gavel.kwell.vo.UpointCondition
;
import
com.gavel.kwell.vo.UpointVO
;
import
com.gavel.kwell.vo.UpointVO
;
import
com.gavel.persistence.sql.RecordSet
;
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"
)
@Service
(
"upointService"
)
...
@@ -84,15 +82,14 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
...
@@ -84,15 +82,14 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
List
<
Upoint
>
ponitList
=
upointDao
.
queryList
(
PointTypeEnum
.
RIGN
.
getId
());
List
<
Upoint
>
ponitList
=
upointDao
.
queryList
(
PointTypeEnum
.
RIGN
.
getId
());
if
(
ponitList
==
null
||
ponitList
.
size
()==
0
){
if
(
ponitList
==
null
||
ponitList
.
size
()==
0
){
logger
.
error
(
"点位信息未配置,请检查!"
);
logger
.
error
(
"点位信息未配置,请检查!"
);
return
Collections
.
EMPTY_LIST
;
return
new
ArrayList
<>()
;
}
}
List
<
String
>
tagList
=
ponitList
.
stream
().
map
(
Upoint:
:
getCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
tagList
=
ponitList
.
stream
().
map
(
Upoint:
:
getCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
valueMap
=
null
;
Map
<
String
,
Object
>
valueMap
=
redisConnection
.
multiGet
(
tagList
);
valueMap
=
redisConnection
.
multiGet
(
tagList
);
if
(
valueMap
==
null
||
valueMap
.
size
()==
0
)
{
if
(
valueMap
==
null
||
valueMap
.
size
()==
0
)
{
logger
.
error
(
"读取采集点信息失败!"
);
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
>();
List
<
DataPointItem
>
dataPointItems
=
new
ArrayList
<
DataPointItem
>();
...
@@ -123,7 +120,7 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
...
@@ -123,7 +120,7 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"数据点采集出错!"
,
e
);
logger
.
error
(
"数据点采集出错!"
,
e
);
}
}
return
Collections
.
EMPTY_LIST
;
return
new
ArrayList
<>()
;
/* List<DataPointItem> dataPointItems = new ArrayList<DataPointItem>();
/* List<DataPointItem> dataPointItems = new ArrayList<DataPointItem>();
dataPointItems.add(new DataPointItem("R1",new Date().getTime(),1,"R1",0));
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