| | |
| | | on |
| | | sj.id = i.jurisdiction |
| | | LEFT JOIN ( SELECT COUNT( * ) AS znum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND |
| | | status=1 GROUP BY dept_id ) A ON A.dept_id = i.departmentid |
| | | status=1 and is_deleted = 0 GROUP BY dept_id ) A ON A.dept_id = i.departmentid |
| | | LEFT JOIN ( SELECT COUNT( * ) AS cnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND |
| | | status=1 AND hold=1 GROUP BY dept_id ) B ON B.dept_id = i.departmentid |
| | | status=1 AND hold=1 and is_deleted = 0 GROUP BY dept_id ) B ON B.dept_id = i.departmentid |
| | | LEFT JOIN ( SELECT COUNT( * ) AS pnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND |
| | | status=1 AND dispatch=0 GROUP BY dept_id ) C ON C.dept_id = i.departmentid |
| | | status=1 AND dispatch=0 and is_deleted = 0 GROUP BY dept_id ) C ON C.dept_id = i.departmentid |
| | | where 1=1 |
| | | <if test="information.enterprisename!=null and information.enterprisename!=''"> |
| | | and i.enterpriseName like concat(concat('%', #{information.enterprisename}),'%') |
| | |
| | | IFNULL( J.num, 0 ) AS num |
| | | FROM |
| | | ( SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction ) H |
| | | LEFT JOIN ( |
| | | INNER JOIN ( |
| | | SELECT |
| | | COUNT( * ) AS num, |
| | | dept_id |
| | |
| | | A.stats, |
| | | j.dept_name AS jurname |
| | | FROM |
| | | ( SELECT jurisdiction, departmentid,enterpriseName,stats FROM sys_information ) A |
| | | ( SELECT jurisdiction, departmentid,enterpriseName,stats,create_time FROM sys_information ) A |
| | | LEFT JOIN ( |
| | | SELECT |
| | | COUNT( * ) AS num, |
| | |
| | | </if> |
| | | <if test="stats!=null and stats!=''"> |
| | | and A.stats =#{stats} |
| | | </if> |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and A.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and A.create_time <= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | i.departmentid, |
| | | i.stats, |
| | | i.jurisdiction, |
| | | j.dept_name |
| | | j.dept_name, |
| | | i.create_time |
| | | FROM |
| | | sys_information i |
| | | LEFT JOIN sys_jurisdiction j ON i.jurisdiction = j.id |
| | |
| | | ( |
| | | SELECT COUNT( * ) AS znum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' |
| | | and status=1 |
| | | and is_deleted = 0 |
| | | GROUP BY dept_id |
| | | ) C |
| | | ON A.departmentid = C.dept_id |
| | |
| | | <if test="stats!=null and stats!=''"> |
| | | and A.stats=#{stats} |
| | | </if> |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and A.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and A.create_time <= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--保安人员详情--> |