| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectBaseOrganizationVo"> |
| | | select ID, OrganizationName, OrganizationID, LogoUrl, RegisterTime, RegisterAddress, OfficePlace, LegalPerson, ContactPerson, ContactNumber, Introduction, OrganizationType, HospitalNature, RegionalLevel, MedicalCode, del_flag, create_by, create_time, update_by, update_time, Province, ProvinceName, City, CityName, Town, TownName, Community, CommunityName, CountyCode, CountyName from base_organization |
| | | select ID, |
| | | OrganizationName, |
| | | OrganizationID, |
| | | LogoUrl, |
| | | RegisterTime, |
| | | RegisterAddress, |
| | | OfficePlace, |
| | | LegalPerson, |
| | | ContactPerson, |
| | | ContactNumber, |
| | | Introduction, |
| | | OrganizationType, |
| | | HospitalNature, |
| | | RegionalLevel, |
| | | MedicalCode, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | Province, |
| | | ProvinceName, |
| | | City, |
| | | CityName, |
| | | Town, |
| | | TownName, |
| | | Community, |
| | | CommunityName, |
| | | CountyCode, |
| | | CountyName |
| | | from base_organization |
| | | </sql> |
| | | |
| | | <select id="selectBaseOrganizationList" parameterType="BaseOrganization" resultMap="BaseOrganizationResult"> |
| | | <include refid="selectBaseOrganizationVo"/> |
| | | <where> |
| | | <if test="organizationname != null and organizationname != ''"> and OrganizationName like concat('%', #{organizationname}, '%')</if> |
| | | <if test="organizationname != null and organizationname != ''">and OrganizationName like concat('%', |
| | | #{organizationname}, '%') |
| | | </if> |
| | | <if test="organizationid != null and organizationid != ''"> and OrganizationID = #{organizationid}</if> |
| | | <if test="logourl != null and logourl != ''"> and LogoUrl = #{logourl}</if> |
| | | <if test="registertime != null "> and RegisterTime = #{registertime}</if> |
| | |
| | | <if test="contactperson != null and contactperson != ''"> and ContactPerson = #{contactperson}</if> |
| | | <if test="contactnumber != null and contactnumber != ''"> and ContactNumber = #{contactnumber}</if> |
| | | <if test="introduction != null and introduction != ''"> and Introduction = #{introduction}</if> |
| | | <if test="organizationtype != null and organizationtype != ''"> and OrganizationType = #{organizationtype}</if> |
| | | <if test="organizationtype != null and organizationtype != ''">and OrganizationType = #{organizationtype} |
| | | </if> |
| | | <if test="hospitalnature != null and hospitalnature != ''"> and HospitalNature = #{hospitalnature}</if> |
| | | <if test="regionallevel != null and regionallevel != ''"> and RegionalLevel = #{regionallevel}</if> |
| | | <if test="medicalcode != null and medicalcode != ''"> and MedicalCode = #{medicalcode}</if> |
| | | <if test="province != null and province != ''"> and Province = #{province}</if> |
| | | <if test="provincename != null and provincename != ''"> and ProvinceName like concat('%', #{provincename}, '%')</if> |
| | | <if test="provincename != null and provincename != ''">and ProvinceName like concat('%', #{provincename}, |
| | | '%') |
| | | </if> |
| | | <if test="city != null and city != ''"> and City = #{city}</if> |
| | | <if test="cityname != null and cityname != ''"> and CityName like concat('%', #{cityname}, '%')</if> |
| | | <if test="town != null and town != ''"> and Town = #{town}</if> |
| | | <if test="townname != null and townname != ''"> and TownName like concat('%', #{townname}, '%')</if> |
| | | <if test="community != null and community != ''"> and Community = #{community}</if> |
| | | <if test="communityname != null and communityname != ''"> and CommunityName like concat('%', #{communityname}, '%')</if> |
| | | <if test="communityname != null and communityname != ''">and CommunityName like concat('%', |
| | | #{communityname}, '%') |
| | | </if> |
| | | <if test="countycode != null and countycode != ''"> and CountyCode = #{countycode}</if> |
| | | <if test="countyname != null and countyname != ''"> and CountyName like concat('%', #{countyname}, '%')</if> |
| | | </where> |
| | |
| | | where OrganizationID = #{hospitalNo} |
| | | </select> |
| | | <select id="getOrganizationByCity" resultType="java.lang.Integer"> |
| | | select count(*) from base_organization |
| | | select count(*) |
| | | from base_organization |
| | | where City = #{cityNumber} |
| | | </select> |
| | | |
| | |
| | | where OrganizationType = "4" |
| | | </select> |
| | | <select id="getNameByNo" resultType="java.lang.String"> |
| | | select OrganizationName from base_organization |
| | | select OrganizationName |
| | | from base_organization |
| | | where OrganizationID =#{orgno} |
| | | </select> |
| | | |
| | | <select id="getMaxOrganizationID" resultType="java.lang.String"> |
| | | select max(OrganizationID) |
| | | from base_organization |
| | | where OrganizationID like concat(#{organizationid}) |
| | | |
| | | </select> |
| | | |
| | | </mapper> |