<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.web.work.mapper.DeptInfoMapper">
    
    <select id="selectList" resultType="com.ruoyi.web.work.domain.DeptInfo">
        select * from tb_dept_info
        <where>  
            <if test="orgCode != null  and orgCode != ''"> and org_code = #{orgCode}</if>
            <if test="deptCode != null  and deptCode != ''"> and dept_code = #{deptCode}</if>
            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
            <if test="py != null  and py != ''"> and py = #{py}</if>
            <if test="wb != null  and wb != ''"> and wb = #{wb}</if>
            <if test="inputCode != null  and inputCode != ''"> and input_code = #{inputCode}</if>
            <if test="deptCodeOne != null  and deptCodeOne != ''"> and dept_code_one = #{deptCodeOne}</if>
            <if test="deptNameOne != null  and deptNameOne != ''"> and dept_name_one = #{deptNameOne}</if>
            <if test="deptCodeTwo != null  and deptCodeTwo != ''"> and dept_code_two = #{deptCodeTwo}</if>
            <if test="deptNameTwo != null  and deptNameTwo != ''"> and dept_name_two = #{deptNameTwo}</if>
            <if test="medDeptCode != null  and medDeptCode != ''"> and med_dept_code = #{medDeptCode}</if>
            <if test="medDeptName != null  and medDeptName != ''"> and med_dept_name like concat('%', #{medDeptName}, '%')</if>
            <if test="accountDeptCode != null  and accountDeptCode != ''"> and account_dept_code = #{accountDeptCode}</if>
            <if test="accountDeptName != null  and accountDeptName != ''"> and account_dept_name like concat('%', #{accountDeptName}, '%')</if>
            <if test="deptTypeCode != null "> and dept_type_code = #{deptTypeCode}</if>
            <if test="deptAddr != null  and deptAddr != ''"> and dept_addr = #{deptAddr}</if>
            <if test="depositWarLine != null "> and deposit_war_line = #{depositWarLine}</if>
            <if test="erSign != null  and erSign != ''"> and er_sign = #{erSign}</if>
            <if test="specialtySign != null  and specialtySign != ''"> and specialty_sign = #{specialtySign}</if>
            <if test="childSign != null  and childSign != ''"> and child_sign = #{childSign}</if>
            <if test="rupplyRoomSign != null  and rupplyRoomSign != ''"> and rupply_room_sign = #{rupplyRoomSign}</if>
            <if test="chineseMedSign != null  and chineseMedSign != ''"> and chinese_med_sign = #{chineseMedSign}</if>
            <if test="oweCtrlSign != null  and oweCtrlSign != ''"> and owe_ctrl_sign = #{oweCtrlSign}</if>
            <if test="deptSign != null  and deptSign != ''"> and dept_sign = #{deptSign}</if>
            <if test="limitNo != null "> and limit_no = #{limitNo}</if>
            <if test="chiefDoctNo != null "> and chief_doct_no = #{chiefDoctNo}</if>
            <if test="resiDoctNo != null "> and resi_doct_no = #{resiDoctNo}</if>
            <if test="atndDoctNo != null "> and atnd_doct_no = #{atndDoctNo}</if>
            <if test="nursNo != null "> and nurs_no = #{nursNo}</if>
            <if test="assessedBedsNo != null "> and assessed_beds_no = #{assessedBedsNo}</if>
            <if test="depositBndonLine != null "> and deposit_bndon_line = #{depositBndonLine}</if>
            <if test="tcmEmrSign != null  and tcmEmrSign != ''"> and tcm_emr_sign = #{tcmEmrSign}</if>
            <if test="nurseStationIp != null  and nurseStationIp != ''"> and nurse_station_ip = #{nurseStationIp}</if>
            <if test="authorizeBeds != null "> and authorize_beds = #{authorizeBeds}</if>
            <if test="authorizeHomeBeds != null "> and authorize_home_beds = #{authorizeHomeBeds}</if>
            <if test="confirmDeptSign != null  and confirmDeptSign != ''"> and confirm_dept_sign = #{confirmDeptSign}</if>
            <if test="submitDeptCode != null  and submitDeptCode != ''"> and submit_dept_code = #{submitDeptCode}</if>
            <if test="submitDeptName != null  and submitDeptName != ''"> and submit_dept_name like concat('%', #{submitDeptName}, '%')</if>
            <if test="selfRegisterSign != null  and selfRegisterSign != ''"> and self_register_sign = #{selfRegisterSign}</if>
            <if test="pharmSign != null  and pharmSign != ''"> and pharm_sign = #{pharmSign}</if>
            <if test="specDiseaseSign != null  and specDiseaseSign != ''"> and spec_disease_sign = #{specDiseaseSign}</if>
            <if test="deptIp != null  and deptIp != ''"> and dept_ip = #{deptIp}</if>
            <if test="correspondingDeptCode != null  and correspondingDeptCode != ''"> and corresponding_dept_code = #{correspondingDeptCode}</if>
            <if test="correspondingDeptName != null  and correspondingDeptName != ''"> and corresponding_dept_name like concat('%', #{correspondingDeptName}, '%')</if>
            <if test="generPracStationSign != null  and generPracStationSign != ''"> and gener_prac_station_sign = #{generPracStationSign}</if>
            <if test="triagePrefix != null  and triagePrefix != ''"> and triage_prefix = #{triagePrefix}</if>
            <if test="aljkSign != null  and aljkSign != ''"> and aljk_sign = #{aljkSign}</if>
            <if test="deptLocation != null  and deptLocation != ''"> and dept_location = #{deptLocation}</if>
            <if test="deptLocation2 != null  and deptLocation2 != ''"> and dept_location2 = #{deptLocation2}</if>
            <if test="deptLocation3 != null  and deptLocation3 != ''"> and dept_location3 = #{deptLocation3}</if>
            <if test="deptLocation4 != null  and deptLocation4 != ''"> and dept_location4 = #{deptLocation4}</if>
            <if test="specialistSign != null  and specialistSign != ''"> and specialist_sign = #{specialistSign}</if>
            <if test="apntSign != null  and apntSign != ''"> and apnt_sign = #{apntSign}</if>
            <if test="memo != null  and memo != ''"> and memo = #{memo}</if>
            <if test="validStartDTime != null  and validStartDTime != ''"> and valid_start_d_time = #{validStartDTime}</if>
            <if test="validEndDTime != null  and validEndDTime != ''"> and valid_end_d_time = #{validEndDTime}</if>
            <if test="activeSign != null  and activeSign != ''"> and active_sign = #{activeSign}</if>
            <if test="verNo != null  and verNo != ''"> and ver_no = #{verNo}</if>
            <if test="orderno != null  and orderno != ''"> and orderno = #{orderno}</if>
            <if test="yjbj != null  and yjbj != ''"> and yjbj = #{yjbj}</if>
            <if test="zzms != null  and zzms != ''"> and zzms = #{zzms}</if>
        </where>
    </select>

</mapper>