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
b7f01903
Commit
b7f01903
authored
Mar 31, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日常管理巡查统计脚本
parent
98a3b00b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
2 deletions
+60
-2
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+60
-2
No files found.
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
b7f01903
...
@@ -6152,4 +6152,62 @@ FROM
...
@@ -6152,4 +6152,62 @@ FROM
WHERE
WHERE
DATEDIFF
(
begin_time
,
CURRENT_DATE
)
<=
0
AND
DATEDIFF
(
end_time
,
CURRENT_DATE
)
>=
0
DATEDIFF
(
begin_time
,
CURRENT_DATE
)
<=
0
AND
DATEDIFF
(
end_time
,
CURRENT_DATE
)
>=
0
GROUP
BY
GROUP
BY
au
.
USER_ID
;
au
.
USER_ID
;
\ No newline at end of file
-- 今日巡查统计日常管理组态屏查询脚本
DROP
VIEW
IF
EXISTS
`v_check_point_num`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_check_point_num`
AS
SELECT
(
SELECT
ifnull
(
sum
(
`p_plan_task`
.
`point_num`
),
0
)
FROM
`p_plan_task`
WHERE
(
to_days
(
`p_plan_task`
.
`begin_time`
)
-
to_days
(
curdate
())
)
<=
0
AND
(
to_days
(
`p_plan_task`
.
`end_time`
)
-
to_days
(
curdate
())
)
>=
0
)
AS
`pointNum`
,
(
SELECT
ifnull
(
sum
(
`p_plan_task`
.
`point_num`
),
0
)
FROM
`p_plan_task`
WHERE
`p_plan_task`
.
`finish_status`
=
2
AND
(
to_days
(
`p_plan_task`
.
`begin_time`
)
-
to_days
(
curdate
())
)
<=
0
AND
(
to_days
(
`p_plan_task`
.
`end_time`
)
-
to_days
(
curdate
())
)
>=
0
)
AS
`finishNum`
,
(
SELECT
ifnull
(
sum
(
`p_plan_task`
.
`point_num`
),
0
)
FROM
`p_plan_task`
WHERE
(
`p_plan_task`
.
`finish_status`
=
0
OR
`p_plan_task`
.
`finish_status`
=
1
)
AND
(
to_days
(
`p_plan_task`
.
`begin_time`
)
-
to_days
(
curdate
())
)
<=
0
AND
(
to_days
(
`p_plan_task`
.
`end_time`
)
-
to_days
(
curdate
())
)
>=
0
)
AS
`unFinishNum`
;
\ No newline at end of file
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