Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
6767dc47
Commit
6767dc47
authored
Feb 22, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1bug 3631 3630信号匹配多调整为%_加之前的字段
parent
22007216
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
45 deletions
+114
-45
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+114
-45
No files found.
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
6767dc47
...
@@ -3103,80 +3103,149 @@ GROUP BY
...
@@ -3103,80 +3103,149 @@ GROUP BY
-- ----------------------------
-- ----------------------------
-- View structure for v_fire_cafs_fightingsys_equip_count
-- View structure for v_fire_cafs_fightingsys_equip_count
-- ----------------------------
-- ----------------------------
DROP
VIEW
DROP
VIEW
IF
EXISTS
`v_fire_cafs_fightingsys_equip_count`
;
IF
EXISTS
`v_fire_cafs_fightingsys_equip_count`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_cafs_fightingsys_equip_count`
AS
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_cafs_fightingsys_equip_count`
AS
SELECT
SELECT
SUM
(
sum
(
(
CASE
CASE
WHEN
temp
.
`value`
=
'true'
THEN
WHEN
(
`temp`
.
`value`
=
'true'
)
THEN
1
1
ELSE
ELSE
0
0
END
END
)
AS
total
,
)
temp
.
fieldlabel
,
)
AS
`total`
,
temp
.
fieldname
`temp`
.
`fieldlabel`
AS
`fieldlabel`
,
`temp`
.
`fieldname`
AS
`fieldname`
FROM
FROM
(
(
SELECT
SELECT
(
CASE
CASE
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
THEN
'Run'
'Run'
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
THEN
'Stop'
'Stop'
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
THEN
'Open'
'Open'
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
THEN
'Close'
'Close'
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'Fault'
'Fault'
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
THEN
'RemoteControl'
'RemoteControl'
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
THEN
'Alarm'
'Alarm'
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
THEN
'Abnormal'
'Abnormal'
END
AS
fieldname
,
END
)
AS
`fieldname`
,
(
CASE
CASE
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
THEN
'运行'
'运行'
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
THEN
'停止'
'停止'
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
THEN
'开到位'
'开到位'
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
THEN
'关到位'
'关到位'
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'故障'
'故障'
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
THEN
'远方'
'远方'
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
THEN
'告警'
'告警'
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
THEN
'异常'
'异常'
END
AS
fieldlabel
,
END
esi
.
`value`
)
AS
`fieldlabel`
,
FROM
`esi`
.
`value`
AS
`value`
wl_equipment_specific_index
esi
FROM
LEFT
JOIN
wl_equipment_specific
es
ON
es
.
id
=
esi
.
equipment_specific_id
(
LEFT
JOIN
f_fire_fighting_system
fs
ON
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
(
WHERE
`wl_equipment_specific_index`
`esi`
fs
.
`code`
=
'029026401813010000000023'
LEFT
JOIN
`wl_equipment_specific`
`es`
ON
(
AND
(
(
esi
.
equipment_index_key
LIKE
'%Run'
`es`
.
`id`
=
`esi`
.
`equipment_specific_id`
OR
esi
.
equipment_index_key
LIKE
'%Stop'
)
OR
esi
.
equipment_index_key
LIKE
'%Open'
)
OR
esi
.
equipment_index_key
LIKE
'%Close'
)
OR
esi
.
equipment_index_key
LIKE
'%Fault'
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
(
OR
esi
.
equipment_index_key
LIKE
'%RemoteControl'
(
OR
esi
.
equipment_index_key
LIKE
'%Alarm'
0
<>
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
OR
esi
.
equipment_index_key
LIKE
'%Abnormal'
)
)
)
)
temp
)
WHERE
(
(
`fs`
.
`code`
=
'029026401813010000000023'
)
AND
(
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
)
)
)
`temp`
GROUP
BY
GROUP
BY
temp
.
fieldlabel
,
`temp`
.
`fieldlabel`
,
temp
.
fieldname
;
`temp`
.
`fieldname`
;
-- ----------------------------
-- ----------------------------
-- View structure for v_person_plan_task
-- View structure for v_person_plan_task
-- ----------------------------
-- ----------------------------
...
...
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