<?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.project.mapper.BaseOrganizationMapper">
|
|
<resultMap type="BaseOrganization" id="BaseOrganizationResult">
|
<result property="id" column="ID" />
|
<result property="organizationname" column="OrganizationName" />
|
<result property="organizationid" column="OrganizationID" />
|
<result property="logourl" column="LogoUrl" />
|
<result property="registertime" column="RegisterTime" />
|
<result property="registeraddress" column="RegisterAddress" />
|
<result property="officeplace" column="OfficePlace" />
|
<result property="legalperson" column="LegalPerson" />
|
<result property="contactperson" column="ContactPerson" />
|
<result property="contactnumber" column="ContactNumber" />
|
<result property="introduction" column="Introduction" />
|
<result property="organizationtype" column="OrganizationType" />
|
<result property="hospitalnature" column="HospitalNature" />
|
<result property="regionallevel" column="RegionalLevel" />
|
<result property="medicalcode" column="MedicalCode" />
|
<result property="delFlag" column="del_flag" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="province" column="Province" />
|
<result property="provincename" column="ProvinceName" />
|
<result property="city" column="City" />
|
<result property="cityname" column="CityName" />
|
<result property="town" column="Town" />
|
<result property="townname" column="TownName" />
|
<result property="community" column="Community" />
|
<result property="communityname" column="CommunityName" />
|
<result property="countycode" column="CountyCode" />
|
<result property="countyname" column="CountyName" />
|
</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
|
</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="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="registeraddress != null and registeraddress != ''"> and RegisterAddress = #{registeraddress}</if>
|
<if test="officeplace != null and officeplace != ''"> and OfficePlace = #{officeplace}</if>
|
<if test="legalperson != null and legalperson != ''"> and LegalPerson = #{legalperson}</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="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="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="countycode != null and countycode != ''"> and CountyCode = #{countycode}</if>
|
<if test="countyname != null and countyname != ''"> and CountyName like concat('%', #{countyname}, '%')</if>
|
</where>
|
</select>
|
|
<select id="getOrganizationByNumber" resultType="com.ruoyi.project.domain.BaseOrganization">
|
<include refid="selectBaseOrganizationVo"/>
|
where OrganizationID = #{hospitalNo}
|
</select>
|
<select id="getOrganizationByCity" resultType="java.lang.Integer">
|
select count(*) from base_organization
|
where City = #{cityNumber}
|
</select>
|
|
<select id="getHospitalList" resultType="com.ruoyi.project.domain.BaseOrganization">
|
<include refid="selectBaseOrganizationVo"/>
|
where OrganizationType = "3" ORDER BY City,OrganizationID
|
</select>
|
<select id="getBaseOrganizationList" resultType="com.ruoyi.project.domain.BaseOrganization">
|
<include refid="selectBaseOrganizationVo"/>
|
</select>
|
<select id="getTransOrg" resultType="com.ruoyi.project.domain.BaseOrganization">
|
<include refid="selectBaseOrganizationVo"/>
|
where OrganizationType = "4"
|
</select>
|
<select id="getNameByNo" resultType="java.lang.String">
|
select OrganizationName from base_organization
|
where OrganizationID =#{orgno}
|
</select>
|
|
</mapper>
|