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
4bd692c6
Commit
4bd692c6
authored
Mar 15, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消防资源四大值班与巡查视图
parent
801aca76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+28
-2
No files found.
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
4bd692c6
...
...
@@ -6026,4 +6026,30 @@ SELECT
FROM
`v_fire_fighter`
`fighter`
GROUP
BY
`fighter`
.
`department_name`
;
\ No newline at end of file
`fighter`
.
`department_name`
;
-- 今日值班与巡查人员
DROP
VIEW
IF
EXISTS
`v_duty_check_person`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_duty_check_person`
AS
SELECT
ddd
.
`duty_name`
AS
`personName`
,
au
.
`MOBILE`
AS
`userPhone`
,
'值班员'
AS
`postName`
FROM
`d_duty_details`
ddd
LEFT
JOIN
b_privilege_agency_user
au
ON
au
.
USER_ID
=
ddd
.
user_id
WHERE
ddd
.
`duty_date`
=
curdate
()
GROUP
BY
ddd
.
`user_id`
UNION
ALL
SELECT
au
.
`REAL_NAME`
AS
`personName`
,
au
.
`MOBILE`
AS
`userPhone`
,
'巡查员'
AS
`postName`
FROM
`p_plan_task`
ppt
LEFT
JOIN
b_privilege_agency_user
au
ON
FIND_IN_SET
(
au
.
USER_ID
,
ppt
.
user_id
)
>
0
WHERE
DATEDIFF
(
begin_time
,
CURRENT_DATE
)
<=
0
AND
DATEDIFF
(
end_time
,
CURRENT_DATE
)
>=
0
GROUP
BY
au
.
USER_ID
;
\ 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