Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
ddd1def1
Commit
ddd1def1
authored
Apr 23, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备报屏更新
parent
2d9d1643
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
7 deletions
+22
-7
ServiceHPBI003.java
.../java/com/baosight/hpjx/hp/bi/service/ServiceHPBI003.java
+2
-0
HPBI003.xml
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
+18
-5
HPXS006.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS006.xml
+1
-1
HPXS007.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS007.xml
+1
-1
No files found.
src/main/java/com/baosight/hpjx/hp/bi/service/ServiceHPBI003.java
View file @
ddd1def1
...
...
@@ -36,9 +36,11 @@ public class ServiceHPBI003 extends ServiceBase {
public
EiInfo
querySbStatus
(
EiInfo
inInfo
)
{
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
factoryCode
=
(
String
)
inInfo
.
get
(
"factoryCode"
);
String
deviceCode
=
(
String
)
inInfo
.
get
(
"deviceCode"
);
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"factoryCode"
,
factoryCode
);
sqlMap
.
put
(
"deviceCode"
,
deviceCode
);
List
<
Map
>
result
=
this
.
dao
.
query
(
"HPBI003.querySbStatus"
,
sqlMap
);
inInfo
.
set
(
"result"
,
result
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/bi/sql/HPBI003.xml
View file @
ddd1def1
...
...
@@ -9,17 +9,29 @@
<select
id=
"querySbStatus"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
DEVICE_CODE,DEVICE_STATUS,ORG_CNAME,DEVICE_NAME,DEVICE_MODEL,
case when DEVICE_STATUS = 0 then '停机' else '开机' end as STATUS_DESC
a.DEVICE_CODE,b.ORG_CNAME,a.DEVICE_NAME,a.DEVICE_MODEL,
case when c.LOG_VALUE = 2 then 1 else 0 end as DEVICE_STATUS,
case when c.LOG_VALUE = 2 then '运行状态'
when c.LOG_VALUE = 1 then '默认状态'
when c.LOG_VALUE = 3 then '暂停状态'
when c.LOG_VALUE = 4 then '复位状态'
when c.LOG_VALUE = 5 then '一级报警状态'
when c.LOG_VALUE = 6 then '二级报警状态'
else '异常状态' end as STATUS_DESC
from hpjx.t_hpsb003 a
join iplat.TXSOG01 b on a.GROUP_CODE = b.ORG_ID and b.IS_DELETED = 0
where DELETE_FLAG = 0
join hpjx.t_hpsb002 c on a.DEVICE_CODE=c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A
.COMPANY_CODE = #companyCode#
a
.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
A
.FACTORY_CODE = #factoryCode#
a
.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deviceCode"
>
a.DEVICE_CODE = #deviceCode#
</isNotEmpty>
order by c.CREATED_TIME desc
limit 1
</select>
</sqlMap>
\ No newline at end of file
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS006.xml
View file @
ddd1def1
...
...
@@ -75,7 +75,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME
a
sc
CREATED_TIME
de
sc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS007.xml
View file @
ddd1def1
...
...
@@ -73,7 +73,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID a
sc
CREATED_TIME de
sc
</isEmpty>
</dynamic>
...
...
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