liusheng
2024-03-05 0c5e744bd9b52147c7fc273ec8fe7bd7afea0ebb
ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml
@@ -38,13 +38,45 @@
    </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>
@@ -54,18 +86,23 @@
            <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>
@@ -76,7 +113,8 @@
        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>
@@ -92,8 +130,16 @@
        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>