Commit db9af26e authored by lisong's avatar lisong

修改持证人员查询bug

parent 6be5cfcf
......@@ -481,15 +481,15 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
SELECT
count( a.is_firefighters = 1 OR NULL ) AS firefightersNum,
count( a.is_firefighters = 0 OR NULL ) AS opertNum,
COUNT(( a.is_firefighters = 1 AND a.certificate_type IS NOT NULL ) OR NULL ) AS fireCer,
COUNT(( a.is_firefighters = 0 AND a.certificate_type IS NOT NULL ) OR NULL ) AS operCer
COUNT(( a.is_firefighters = 1 AND a.post_qualification IS NOT NULL ) OR NULL ) AS fireCer,
COUNT(( a.is_firefighters = 0 AND a.post_qualification IS NOT NULL ) OR NULL ) AS operCer
FROM
(
SELECT
u.sequence_nbr,
cfp.fire_management_post,
( CASE WHEN cf.sequence_nbr IS NULL THEN 0 ELSE 1 END ) AS is_firefighters,
cfp.certificate_type
cfp.post_qualification
FROM
cb_org_usr u
LEFT JOIN cb_firefighters_post cfp ON cfp.org_usr_id = u.sequence_nbr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment