| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="deptIds != null ">and deptId in |
| | | <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | <if test="deptcodes != null ">and deptcode in |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="drCodes != null ">and drcode in |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="deptIds != null ">and deptId in |
| | | <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | <if test="deptcodes != null ">and leaveldeptcode in |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="drCodes != null ">and drcode in |
| | |
| | | #{drCode} |
| | | </foreach> |
| | | </if> |
| | | union |
| | | select "门诊" name1, count(1) as count FROM `pat_med_outhosp` |
| | | where del_flag=0 |
| | | ) aa |
| | | |
| | | </select> |