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
9b5dec9c
Commit
9b5dec9c
authored
Feb 22, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into developer
parents
ca07c0f8
6767dc47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
137 additions
and
68 deletions
+137
-68
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+137
-68
No files found.
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
9b5dec9c
...
@@ -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
(
WHEN
temp
.
`value`
=
'true'
THEN
CASE
1
WHEN
(
`temp`
.
`value`
=
'true'
)
THEN
ELSE
1
0
ELSE
END
0
)
AS
total
,
END
temp
.
fieldlabel
,
)
temp
.
fieldname
)
AS
`total`
,
`temp`
.
`fieldlabel`
AS
`fieldlabel`
,
`temp`
.
`fieldname`
AS
`fieldname`
FROM
FROM
(
(
SELECT
SELECT
CASE
(
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
CASE
'Run'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Run'
'Stop'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
'Run'
'Open'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
'Close'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
'Stop'
'Fault'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
'RemoteControl'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
'Open'
'Alarm'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Close'
'Abnormal'
)
THEN
END
AS
fieldname
,
'Close'
CASE
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
'运行'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
'Fault'
'停止'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
'开到位'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
'RemoteControl'
'关到位'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
'故障'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
'Alarm'
'远方'
WHEN
(
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
'告警'
)
THEN
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
'Abnormal'
'异常'
END
END
AS
fieldlabel
,
)
AS
`fieldname`
,
esi
.
`value`
(
FROM
CASE
wl_equipment_specific_index
esi
WHEN
(
LEFT
JOIN
wl_equipment_specific
es
ON
es
.
id
=
esi
.
equipment_specific_id
`esi`
.
`equipment_index_key`
LIKE
'%Run'
LEFT
JOIN
f_fire_fighting_system
fs
ON
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
)
THEN
WHERE
'运行'
fs
.
`code`
=
'029026401813010000000023'
WHEN
(
AND
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
esi
.
equipment_index_key
LIKE
'%Run'
)
THEN
OR
esi
.
equipment_index_key
LIKE
'%Stop'
'停止'
OR
esi
.
equipment_index_key
LIKE
'%Open'
WHEN
(
OR
esi
.
equipment_index_key
LIKE
'%Close'
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
OR
esi
.
equipment_index_key
LIKE
'%Fault'
)
THEN
OR
esi
.
equipment_index_key
LIKE
'%RemoteControl'
'开到位'
OR
esi
.
equipment_index_key
LIKE
'%Alarm'
WHEN
(
OR
esi
.
equipment_index_key
LIKE
'%Abnormal'
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
)
THEN
)
temp
'关到位'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'故障'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
THEN
'远方'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
THEN
'告警'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
THEN
'异常'
END
)
AS
`fieldlabel`
,
`esi`
.
`value`
AS
`value`
FROM
(
(
`wl_equipment_specific_index`
`esi`
LEFT
JOIN
`wl_equipment_specific`
`es`
ON
(
(
`es`
.
`id`
=
`esi`
.
`equipment_specific_id`
)
)
)
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
(
(
0
<>
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
)
)
)
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