From 48d56c0780ddcd28a19f306064e1dd21f0c425c0 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 11 三月 2024 18:23:23 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml |  168 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 107 insertions(+), 61 deletions(-)

diff --git a/ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml b/ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml
index ffd79ac..e162041 100644
--- a/ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/BaseOrganizationMapper.xml
@@ -1,73 +1,110 @@
 <?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">
+        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="com.ruoyi.project.domain.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="del_flag"    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"    />
+        <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="del_flag" 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
+        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>
+            <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>
 
@@ -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
-        where OrganizationID =#{orgno}
+        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>
\ No newline at end of file

--
Gitblit v1.9.3