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
f2ab9ba4
Commit
f2ab9ba4
authored
May 25, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-24 1.设备点检预警预警逻辑调整
2.设备保养逻辑调整
parent
bee2e13e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
31 deletions
+30
-31
HGSB006.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
+3
-4
HGSB007.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
+27
-27
No files found.
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB006.xml
View file @
f2ab9ba4
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
where 1 = 1
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
AND
B.PLAN_STATUS = '1' and B.
TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include
refid=
"authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
B.COMPANY_CODE = #companyCode#
...
@@ -214,9 +214,8 @@
...
@@ -214,9 +214,8 @@
<include
refid=
"column002"
/>
<include
refid=
"column002"
/>
from ${hggpSchema}.HGSB002A A
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
where 1 = 1 and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND B.PLAN_STATUS = '1' AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include
refid=
"authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
B.COMPANY_CODE = #companyCode#
...
...
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB007.xml
View file @
f2ab9ba4
...
@@ -177,8 +177,8 @@
...
@@ -177,8 +177,8 @@
from ${hggpSchema}.HGSB002A A
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
where 1 = 1
and
PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND
PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
AND
B.PLAN_STATUS = '1' AND
TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include
refid=
"authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
B.COMPANY_CODE = #companyCode#
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
$orderBy$
$orderBy$
</isNotEmpty>
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
A.PLAN_
START_DATE desc, A.PLAN_END_DAT
E desc
A.PLAN_
END_DATE desc, A.PLAN_START_DATE desc, A.PLAN_COD
E desc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</select>
</select>
...
@@ -211,30 +211,30 @@
...
@@ -211,30 +211,30 @@
SELECT
SELECT
COUNT(*)
COUNT(*)
FROM (
FROM (
SELECT
SELECT
<include
refid=
"column001"
/>
<include
refid=
"column001"
/>
FROM ${hggpSchema}.HGSB005A A
FROM ${hggpSchema}.HGSB005A A
JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
<include
refid=
"authCondition"
/>
<include
refid=
"authCondition"
/>
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
UNION ALL
UNION ALL
SELECT
SELECT
<include
refid=
"column002"
/>
<include
refid=
"column002"
/>
from ${hggpSchema}.HGSB002A A
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
where 1 = 1
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
and PLAN_END_DATE
<
DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
AND B.PLAN_STATUS = '1'
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include
refid=
"authCondition"
/>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
B.COMPANY_CODE = #companyCode#
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deviceName"
>
<isNotEmpty
prepend=
" AND "
property=
"deviceName"
>
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
</isNotEmpty>
) A
) A
WHERE 1=1
WHERE 1=1
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"1"
>
<isEqual
prepend=
" AND "
property=
"upkeepStatus"
compareValue=
"1"
>
...
...
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