<?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.ltkj.hosp.mapper.DictOrgMapper">
|
|
<resultMap type="DictOrg" id="DictOrgResult">
|
<result property="orgId" column="org_id"/>
|
<result property="orgPid" column="org_pid"/>
|
<result property="orgCode" column="org_code"/>
|
<result property="orgCnName" column="org_cn_name"/>
|
<result property="orgEnName" column="org_en_name"/>
|
<result property="spell" column="spell"/>
|
<result property="wb" column="wb"/>
|
<result property="orgType" column="org_type"/>
|
<result property="principal" column="principal"/>
|
<result property="phone" column="phone"/>
|
<result property="contactPerson" column="contact_person"/>
|
<result property="contactPhone" column="contact_phone"/>
|
<result property="email" column="email"/>
|
<result property="postalCode" column="postal_code"/>
|
<result property="officialWeb" column="official_web"/>
|
<result property="plaitBed" column="plait_bed"/>
|
<result property="openBed" column="open_bed"/>
|
<result property="buildDate" column="build_date"/>
|
<result property="peofile" column="peofile"/>
|
<result property="legalPerson" column="legal_person"/>
|
<result property="medicalDepart" column="medical_depart"/>
|
<result property="issueAuth" column="issue_auth"/>
|
<result property="issueDate" column="issue_date"/>
|
<result property="address" column="address"/>
|
<result property="addrProviceCode" column="addr_provice_code"/>
|
<result property="addrProviceDesc" column="addr_provice_desc"/>
|
<result property="uscc" column="uscc"/>
|
<result property="level" column="level"/>
|
<result property="jgPeriodStart" column="jg_period_start"/>
|
<result property="jgPeriodEnd" column="jg_period_end"/>
|
<result property="mita" column="mita"/>
|
<result property="hospManagerType" column="hosp_manager_type"/>
|
<result property="hospType" column="hosp_type"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="orderNum" column="order_num"/>
|
<result property="effective" column="effective"/>
|
<result property="wbm" column="wbm"/>
|
<result property="jgMultiArea" column="jg_multi_area"/>
|
<result property="jgDeptArea" column="jg_dept_area"/>
|
<result property="jgMcType" column="jg_mc_type"/>
|
<result property="imgbase64" column="imgBase64"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="remark" column="remark"/>
|
<result property="deleted" column="deleted"/>
|
</resultMap>
|
|
<sql id="selectDictOrgVo">
|
select org_id,
|
org_pid,
|
org_code,
|
org_cn_name,
|
org_en_name,
|
spell,
|
wb,
|
org_type,
|
principal,
|
phone,
|
contact_person,
|
contact_phone,
|
email,
|
postal_code,
|
official_web,
|
plait_bed,
|
open_bed,
|
build_date,
|
peofile,
|
legal_person,
|
medical_depart,
|
issue_auth,
|
issue_date,
|
address,
|
addr_provice_code,
|
addr_provice_desc,
|
uscc,
|
level,
|
jg_period_start,
|
jg_period_end,
|
mita,
|
hosp_manager_type,
|
hosp_type,
|
create_by,
|
create_time,
|
order_num,
|
effective,
|
wbm,
|
jg_multi_area,
|
jg_dept_area,
|
jg_mc_type,
|
imgBase64,
|
update_by,
|
update_time,
|
remark,
|
deleted
|
from dict_org
|
</sql>
|
|
<select id="selectDictOrgList" parameterType="DictOrg" resultMap="DictOrgResult">
|
<include refid="selectDictOrgVo"/>
|
<where>
|
<if test="orgCode != null and orgCode != ''">and org_code like concat('%', #{orgCode}, '%')</if>
|
<if test="orgCnName != null and orgCnName != ''">and org_cn_name like concat('%', #{orgCnName}, '%')</if>
|
<if test="orgEnName != null and orgEnName != ''">and org_en_name like concat('%', #{orgEnName}, '%')</if>
|
<if test="spell != null and spell != ''">and spell like concat('%', #{spell}, '%')</if>
|
<if test="wb != null and wb != ''">and wb like concat('%', #{wb}, '%')</if>
|
<if test="orgType != null and orgType != ''">and org_type like concat('%', #{orgType}, '%')</if>
|
<if test="uscc != null and uscc != ''">and uscc like concat('%', #{uscc}, '%')</if>
|
<if test="level != null and level != ''">and level = #{level}</if>
|
<if test="mita != null and mita != ''">and mita = #{mita}</if>
|
<if test="jgMultiArea != null and jgMultiArea != ''">and jg_multi_area = #{jgMultiArea}</if>
|
<if test="jgDeptArea != null and jgDeptArea != ''">and jg_dept_area = #{jgDeptArea}</if>
|
<if test="jgMcType != null and jgMcType != ''">and jg_mc_type = #{jgMcType}</if>
|
<if test="imgbase64 != null and imgbase64 != ''">and imgBase64 = #{imgbase64}</if>
|
</where>
|
</select>
|
|
<select id="selectDictOrgByOrgId" parameterType="String" resultMap="DictOrgResult">
|
<include refid="selectDictOrgVo"/>
|
where org_id = #{orgId}
|
</select>
|
|
<insert id="insertDictOrg" parameterType="DictOrg">
|
insert into dict_org
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="orgId != null">org_id,</if>
|
<if test="orgPid != null and orgPid != ''">org_pid,</if>
|
<if test="orgCode != null">org_code,</if>
|
<if test="orgCnName != null">org_cn_name,</if>
|
<if test="orgEnName != null">org_en_name,</if>
|
<if test="spell != null">spell,</if>
|
<if test="wb != null">wb,</if>
|
<if test="orgType != null and orgType != ''">org_type,</if>
|
<if test="principal != null">principal,</if>
|
<if test="phone != null">phone,</if>
|
<if test="contactPerson != null">contact_person,</if>
|
<if test="contactPhone != null">contact_phone,</if>
|
<if test="email != null">email,</if>
|
<if test="postalCode != null">postal_code,</if>
|
<if test="officialWeb != null">official_web,</if>
|
<if test="plaitBed != null">plait_bed,</if>
|
<if test="openBed != null">open_bed,</if>
|
<if test="buildDate != null">build_date,</if>
|
<if test="peofile != null">peofile,</if>
|
<if test="legalPerson != null">legal_person,</if>
|
<if test="medicalDepart != null">medical_depart,</if>
|
<if test="issueAuth != null">issue_auth,</if>
|
<if test="issueDate != null">issue_date,</if>
|
<if test="address != null">address,</if>
|
<if test="addrProviceCode != null">addr_provice_code,</if>
|
<if test="addrProviceDesc != null">addr_provice_desc,</if>
|
<if test="uscc != null and uscc != ''">uscc,</if>
|
<if test="level != null and level != ''">level,</if>
|
<if test="jgPeriodStart != null">jg_period_start,</if>
|
<if test="jgPeriodEnd != null">jg_period_end,</if>
|
<if test="mita != null and mita != ''">mita,</if>
|
<if test="hospManagerType != null">hosp_manager_type,</if>
|
<if test="hospType != null and hospType != ''">hosp_type,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="orderNum != null">order_num,</if>
|
<if test="effective != null">effective,</if>
|
<if test="wbm != null">wbm,</if>
|
<if test="jgMultiArea != null and jgMultiArea != ''">jg_multi_area,</if>
|
<if test="jgDeptArea != null and jgDeptArea != ''">jg_dept_area,</if>
|
<if test="jgMcType != null">jg_mc_type,</if>
|
<if test="imgbase64 != null">imgBase64,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="remark != null">remark,</if>
|
<if test="deleted != null">deleted,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="orgId != null">#{orgId},</if>
|
<if test="orgPid != null and orgPid != ''">#{orgPid},</if>
|
<if test="orgCode != null">#{orgCode},</if>
|
<if test="orgCnName != null">#{orgCnName},</if>
|
<if test="orgEnName != null">#{orgEnName},</if>
|
<if test="spell != null">#{spell},</if>
|
<if test="wb != null">#{wb},</if>
|
<if test="orgType != null and orgType != ''">#{orgType},</if>
|
<if test="principal != null">#{principal},</if>
|
<if test="phone != null">#{phone},</if>
|
<if test="contactPerson != null">#{contactPerson},</if>
|
<if test="contactPhone != null">#{contactPhone},</if>
|
<if test="email != null">#{email},</if>
|
<if test="postalCode != null">#{postalCode},</if>
|
<if test="officialWeb != null">#{officialWeb},</if>
|
<if test="plaitBed != null">#{plaitBed},</if>
|
<if test="openBed != null">#{openBed},</if>
|
<if test="buildDate != null">#{buildDate},</if>
|
<if test="peofile != null">#{peofile},</if>
|
<if test="legalPerson != null">#{legalPerson},</if>
|
<if test="medicalDepart != null">#{medicalDepart},</if>
|
<if test="issueAuth != null">#{issueAuth},</if>
|
<if test="issueDate != null">#{issueDate},</if>
|
<if test="address != null">#{address},</if>
|
<if test="addrProviceCode != null">#{addrProviceCode},</if>
|
<if test="addrProviceDesc != null">#{addrProviceDesc},</if>
|
<if test="uscc != null and uscc != ''">#{uscc},</if>
|
<if test="level != null and level != ''">#{level},</if>
|
<if test="jgPeriodStart != null">#{jgPeriodStart},</if>
|
<if test="jgPeriodEnd != null">#{jgPeriodEnd},</if>
|
<if test="mita != null and mita != ''">#{mita},</if>
|
<if test="hospManagerType != null">#{hospManagerType},</if>
|
<if test="hospType != null and hospType != ''">#{hospType},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="orderNum != null">#{orderNum},</if>
|
<if test="effective != null">#{effective},</if>
|
<if test="wbm != null">#{wbm},</if>
|
<if test="jgMultiArea != null and jgMultiArea != ''">#{jgMultiArea},</if>
|
<if test="jgDeptArea != null and jgDeptArea != ''">#{jgDeptArea},</if>
|
<if test="jgMcType != null">#{jgMcType},</if>
|
<if test="imgbase64 != null">#{imgbase64},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="deleted != null">#{deleted},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDictOrg" parameterType="DictOrg">
|
update dict_org
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="orgPid != null and orgPid != ''">org_pid = #{orgPid},</if>
|
<if test="orgCode != null">org_code = #{orgCode},</if>
|
<if test="orgCnName != null">org_cn_name = #{orgCnName},</if>
|
<if test="orgEnName != null">org_en_name = #{orgEnName},</if>
|
<if test="spell != null">spell = #{spell},</if>
|
<if test="wb != null">wb = #{wb},</if>
|
<if test="orgType != null and orgType != ''">org_type = #{orgType},</if>
|
<if test="principal != null">principal = #{principal},</if>
|
<if test="phone != null">phone = #{phone},</if>
|
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
<if test="email != null">email = #{email},</if>
|
<if test="postalCode != null">postal_code = #{postalCode},</if>
|
<if test="officialWeb != null">official_web = #{officialWeb},</if>
|
<if test="plaitBed != null">plait_bed = #{plaitBed},</if>
|
<if test="openBed != null">open_bed = #{openBed},</if>
|
<if test="buildDate != null">build_date = #{buildDate},</if>
|
<if test="peofile != null">peofile = #{peofile},</if>
|
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
|
<if test="medicalDepart != null">medical_depart = #{medicalDepart},</if>
|
<if test="issueAuth != null">issue_auth = #{issueAuth},</if>
|
<if test="issueDate != null">issue_date = #{issueDate},</if>
|
<if test="address != null">address = #{address},</if>
|
<if test="addrProviceCode != null">addr_provice_code = #{addrProviceCode},</if>
|
<if test="addrProviceDesc != null">addr_provice_desc = #{addrProviceDesc},</if>
|
<if test="uscc != null and uscc != ''">uscc = #{uscc},</if>
|
<if test="level != null and level != ''">level = #{level},</if>
|
<if test="jgPeriodStart != null">jg_period_start = #{jgPeriodStart},</if>
|
<if test="jgPeriodEnd != null">jg_period_end = #{jgPeriodEnd},</if>
|
<if test="mita != null and mita != ''">mita = #{mita},</if>
|
<if test="hospManagerType != null">hosp_manager_type = #{hospManagerType},</if>
|
<if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
<if test="effective != null">effective = #{effective},</if>
|
<if test="wbm != null">wbm = #{wbm},</if>
|
<if test="jgMultiArea != null and jgMultiArea != ''">jg_multi_area = #{jgMultiArea},</if>
|
<if test="jgDeptArea != null and jgDeptArea != ''">jg_dept_area = #{jgDeptArea},</if>
|
<if test="jgMcType != null">jg_mc_type = #{jgMcType},</if>
|
<if test="imgbase64 != null">imgBase64 = #{imgbase64},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="deleted != null">deleted = #{deleted},</if>
|
</trim>
|
where org_id = #{orgId}
|
</update>
|
|
<delete id="deleteDictOrgByOrgId" parameterType="String">
|
delete
|
from dict_org
|
where org_id = #{orgId}
|
</delete>
|
|
<delete id="deleteDictOrgByOrgIds" parameterType="String">
|
delete from dict_org where org_id in
|
<foreach item="orgId" collection="array" open="(" separator="," close=")">
|
#{orgId}
|
</foreach>
|
</delete>
|
</mapper>
|