| | |
| | | <if test="p.id != null and p.id !=''"> |
| | | and id = #{p.id} |
| | | </if> |
| | | <if test="p.hospitalId != null and p.hospitalId !=''"> |
| | | and hospital_id = #{p.hospitalId} |
| | | </if> |
| | | <if test="p.departmentName != null and p.departmentName !=''"> |
| | | and department_name = #{p.departmentName} |
| | | </if> |
| | |
| | | <if test="p.updateTime != null and p.updateTime !=''"> |
| | | and update_time = #{p.updateTime} |
| | | </if> |
| | | <if test="p.accountsCount != null and p.accountsCount !=''"> |
| | | and accounts_count = #{p.accountsCount} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | |
| | | <include refid="where"/> |
| | | order by id desc |
| | | </select> |
| | | <select id="checkDepartmentName" resultType="string"> |
| | | SELECT org_name FROM sys_organization |
| | | WHERE org_parent_id =( SELECT org_id FROM sys_hospital WHERE id = #{hosId} ) |
| | | AND org_name = #{departmentName} AND is_del=0 and enabled=1 |
| | | </select> |
| | | <select id="updatePay" resultType="boolean"> |
| | | UPDATE sys_department |
| | | set is_pay=#{isPay} |
| | | where id=#{departmentId} |
| | | </select> |
| | | </mapper> |