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
219b997b
Commit
219b997b
authored
Feb 15, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.视图修改 连接为空bug
parent
1ab64856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
48 deletions
+54
-48
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+53
-47
AnalysisReportMonthMapper.xml
...p/src/main/resources/mapper/AnalysisReportMonthMapper.xml
+1
-1
No files found.
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
219b997b
...
@@ -4757,27 +4757,30 @@ FROM
...
@@ -4757,27 +4757,30 @@ FROM
(
(
(
(
SELECT
SELECT
`a`
.
`value`
AS
`yhxfscyw`
,
ifnull
(
sum
(
`a`
.
`value`
),
0
)
AS
`yhxfscyw`
,
(
ifnull
(
CASE
(
WHEN
(
`a`
.
`value`
IS
NULL
)
THEN
CASE
0
WHEN
(
`a`
.
`value`
=
NULL
)
THEN
WHEN
(
0
(
`a`
.
`value`
<>
''
)
WHEN
(
AND
(
`b`
.
`height`
<>
''
)
(
`a`
.
`value`
<>
''
)
)
THEN
AND
(
`b`
.
`height`
<>
''
)
round
(
)
THEN
(
round
(
(
`a`
.
`value`
/
`b`
.
`height`
)
*
100
(
),
(
`a`
.
`value`
/
`b`
.
`height`
)
*
100
2
),
)
2
WHEN
(
`b`
.
`height`
IS
NULL
)
THEN
)
0
WHEN
(
`b`
.
`height`
=
NULL
)
THEN
END
0
END
),
0
)
AS
`yhxfscyl`
,
)
AS
`yhxfscyl`
,
`b`
.
`waterStorage`
AS
`yhxfsccs`
,
ifnull
(
`b`
.
`waterStorage`
,
0
)
AS
`yhxfsccs`
,
`b`
.
`height`
AS
`yhxfscg`
ifnull
(
`b`
.
`height`
,
0
)
AS
`yhxfscg`
FROM
FROM
(
(
(
(
...
@@ -4794,7 +4797,7 @@ FROM
...
@@ -4794,7 +4797,7 @@ FROM
`si`
.
`equipment_index_key`
=
'FHS_FirePoolDevice_WaterLevel'
`si`
.
`equipment_index_key`
=
'FHS_FirePoolDevice_WaterLevel'
)
)
AND
(
AND
(
`s`
.
`code`
=
'1HXFSCCJZZ100000'
--1号消防水池装置code
`s`
.
`code`
=
'1HXFSCCJZZ100000'
)
)
AND
(
AND
(
`si`
.
`equipment_specific_id`
=
`s`
.
`id`
`si`
.
`equipment_specific_id`
=
`s`
.
`id`
...
@@ -4841,7 +4844,7 @@ FROM
...
@@ -4841,7 +4844,7 @@ FROM
(
(
(
`i`
.
`field_name`
=
'code'
)
(
`i`
.
`field_name`
=
'code'
)
AND
(
AND
(
`i`
.
`field_value`
=
'SC10
5035'
--1号消防水池(建筑或者房间类型)code
`i`
.
`field_value`
=
'SC10
6268'
)
)
)
)
LIMIT
1
LIMIT
1
...
@@ -4851,29 +4854,32 @@ FROM
...
@@ -4851,29 +4854,32 @@ FROM
)
`b`
)
`b`
)
)
)
`yh`
)
`yh`
JOIN
(
LEFT
JOIN
(
SELECT
SELECT
`a`
.
`value`
AS
`ehxfscyw`
,
ifnull
(
sum
(
`a`
.
`value`
),
0
)
AS
`ehxfscyw`
,
(
ifnull
(
CASE
(
WHEN
(
`a`
.
`value`
IS
NULL
)
THEN
CASE
0
WHEN
(
`a`
.
`value`
=
NULL
)
THEN
WHEN
(
0
(
`a`
.
`value`
<>
''
)
WHEN
(
AND
(
`b`
.
`height`
<>
''
)
(
`a`
.
`value`
<>
''
)
)
THEN
AND
(
`b`
.
`height`
<>
''
)
round
(
)
THEN
(
round
(
(
`a`
.
`value`
/
`b`
.
`height`
)
*
100
(
),
(
`a`
.
`value`
/
`b`
.
`height`
)
*
100
2
),
)
2
WHEN
(
`b`
.
`height`
IS
NULL
)
THEN
)
0
WHEN
(
`b`
.
`height`
=
NULL
)
THEN
END
0
END
),
0
)
AS
`ehxfscyl`
,
)
AS
`ehxfscyl`
,
`b`
.
`waterStorage`
AS
`ehxfsccs`
,
ifnull
(
`b`
.
`waterStorage`
,
0
)
AS
`ehxfsccs`
,
`b`
.
`height`
AS
`ehxfscg`
ifnull
(
`b`
.
`height`
,
0
)
AS
`ehxfscg`
FROM
FROM
(
(
(
(
...
@@ -4890,7 +4896,7 @@ FROM
...
@@ -4890,7 +4896,7 @@ FROM
`si`
.
`equipment_index_key`
=
'FHS_FirePoolDevice_WaterLevel'
`si`
.
`equipment_index_key`
=
'FHS_FirePoolDevice_WaterLevel'
)
)
AND
(
AND
(
`s`
.
`code`
=
'1HXFSCCJZZ10000
1'
--2号消防水池装置code
`s`
.
`code`
=
'1HXFSCCJZZ10000
0'
)
)
AND
(
AND
(
`si`
.
`equipment_specific_id`
=
`s`
.
`id`
`si`
.
`equipment_specific_id`
=
`s`
.
`id`
...
@@ -4937,7 +4943,7 @@ FROM
...
@@ -4937,7 +4943,7 @@ FROM
(
(
(
`i`
.
`field_name`
=
'code'
)
(
`i`
.
`field_name`
=
'code'
)
AND
(
AND
(
`i`
.
`field_value`
=
'SC10
3119'
--2号消防水池(建筑或者房间类型)code
`i`
.
`field_value`
=
'SC10
6268'
)
)
)
)
LIMIT
1
LIMIT
1
...
@@ -4946,8 +4952,8 @@ FROM
...
@@ -4946,8 +4952,8 @@ FROM
)
)
)
`b`
)
`b`
)
)
)
`eh`
)
`eh`
ON
((
1
=
1
))
);
);
-- 泡沫灭火3小
-- 泡沫灭火3小
DROP
VIEW
IF
EXISTS
`v_fire_equip_ffs_num`
;
DROP
VIEW
IF
EXISTS
`v_fire_equip_ffs_num`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_ffs_num`
AS
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_ffs_num`
AS
...
...
amos-boot-system-equip/src/main/resources/mapper/AnalysisReportMonthMapper.xml
View file @
219b997b
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
)
)
select
select
a1.*,
a1.*,
DATE_FORMAT(
NOW(
),'%Y-%m')
DATE_FORMAT(
DATE_SUB(NOW(),INTERVAL 1 day
),'%Y-%m')
from
from
(SELECT
(SELECT
system_id,
system_id,
...
...
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