Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
fdef4a1e
Commit
fdef4a1e
authored
Oct 21, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-21
1.新增APP设备管理接口调整
parent
a109e694
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
HGSB010.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB010.xml
+19
-10
No files found.
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB010.xml
View file @
fdef4a1e
...
...
@@ -180,11 +180,26 @@
a.DEVICE_CODE as "deviceCode",
a.DEVICE_NAME as "deviceName",
a.DEVICE_MODEL as "deviceModel",
c.LOG_VALUE
as "status"
ifnull(c.LOG_VALUE, 0)
as "status"
from ${hggpSchema}.HGSB001 a
join ${hggpSchema}.HGSB010 c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where
a.DELETE_FLAG = 0 and DEVICE_STATUS = 1 and c.EQUIPMENT_TYPE = 'STARUS_TYPE'
left join (
select EQUIPMENT_CODE, LOG_VALUE
from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
CREATED_TIME =(
select MAX(CREATED_TIME)
from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
)
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and a.DEVICE_STATUS = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
@@ -194,12 +209,6 @@
<isNotEmpty
prepend=
" AND "
property=
"deviceCode"
>
a.DEVICE_CODE = #deviceCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"date"
>
c.CREATED_TIME =(
select MAX(CREATED_TIME) from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
)
</isNotEmpty>
order by a.DEVICE_CODE
</select>
...
...
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