| | |
| | | GROUP BY |
| | | dept_id |
| | | ) J ON J.dept_id = H.departmentid |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = H.jurisdiction |
| | | WHERE 1 = 1 |
| | | <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'"> |
| | | AND H.jurisdiction in(${jurisdiction}) |
| | | AND (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction}) |
| | | </if> |
| | | <if test="deptid!=null and deptid!=''"> |
| | | AND H.departmentid = #{deptid} |
| | |
| | | and (sj.id = #{information.jurisdiction} or sj.parent_id = #{information.jurisdiction}) |
| | | </if> |
| | | ) b |
| | | where b.znum < 2 |
| | | where b.znum < #{information.proportion} |
| | | <if test="information.departmentid!=null and information.departmentid!=''"> |
| | | and b.departmentid = #{information.departmentid} |
| | | </if> |