<?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.DictYpdmMapper">
|
|
<resultMap type="DictYpdm" id="DictYpdmResult">
|
<result property="id" column="id"/>
|
<result property="deptId" column="dept_id"/>
|
<result property="ypId" column="yp_id"/>
|
<result property="ypCode" column="yp_code"/>
|
<result property="ypName" column="yp_name"/>
|
<result property="ypGenericName" column="yp_generic_name"/>
|
<result property="pinYinCode" column="pin_yin_code"/>
|
<result property="wuBiCode" column="wu_bi_code"/>
|
<result property="mnemonicCode" column="mnemonic_code"/>
|
<result property="largeUnit" column="large_unit"/>
|
<result property="smallUnit" column="small_unit"/>
|
<result property="outpatientUnit" column="outpatient_unit"/>
|
<result property="hosUnit" column="hos_unit"/>
|
<result property="ypSpec" column="yp_spec"/>
|
<result property="drugsClassify" column="drugs_classify"/>
|
<result property="detailClassify" column="detail_classify"/>
|
<result property="summaryCalssify" column="summary_calssify"/>
|
<result property="outRatio" column="out_ratio"/>
|
<result property="hosRatio" column="hos_ratio"/>
|
<result property="unpackRatio" column="unpack_ratio"/>
|
<result property="additionRatio" column="addition_ratio"/>
|
<result property="approvalNumber" column="approval_number"/>
|
<result property="defaultDays" column="default_days"/>
|
<result property="defaultDose" column="default_dose"/>
|
<result property="defaultFrequency" column="default_frequency"/>
|
<result property="defaultCode" column="default_code"/>
|
<result property="doseUnitCode" column="dose_unit_code"/>
|
<result property="doseRatio" column="dose_ratio"/>
|
<result property="skinTestSign" column="skin_test_sign"/>
|
<result property="skinTestGuide" column="skin_test_guide"/>
|
<result property="deptClassify" column="dept_classify"/>
|
<result property="referencePrice" column="reference_price"/>
|
<result property="serialNumber" column="serial_number"/>
|
<result property="isCharge" column="is_charge"/>
|
<result property="medicalGrade" column="medical_grade"/>
|
<result property="countryProCode" column="country_pro_code"/>
|
<result property="countryProName" column="country_pro_name"/>
|
<result property="provincialProCode" column="provincial_pro_code"/>
|
<result property="provincialProName" column="provincial_pro_name"/>
|
<result property="deleted" column="deleted"/>
|
<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="upperLimit" column="upper_limit"/>
|
<result property="lowerLimit" column="lower_limit"/>
|
<result property="chinaNumber" column="china_number"/>
|
</resultMap>
|
|
<sql id="selectDictYpdmVo">
|
select id, dept_id, yp_id, yp_code, yp_name, yp_generic_name, pin_yin_code, wu_bi_code, mnemonic_code, large_unit, small_unit, outpatient_unit, hos_unit, yp_spec, drugs_classify, detail_classify, summary_calssify, out_ratio, hos_ratio, unpack_ratio, addition_ratio, approval_number, default_days, default_dose, default_frequency, default_code, dose_unit_code, dose_ratio, skin_test_sign, skin_test_guide, dept_classify, reference_price, serial_number, is_charge, medical_grade, country_pro_code, country_pro_name, provincial_pro_code, provincial_pro_name, deleted, create_by, create_time, update_by, update_time, upper_limit, lower_limit, china_number
|
from dict_ypdm
|
</sql>
|
|
<select id="selectDictYpdmList" parameterType="DictYpdm" resultMap="DictYpdmResult">
|
<include refid="selectDictYpdmVo"/>
|
<where>
|
<if test="deptId != null and deptId != ''">
|
and dept_id = #{deptId}
|
</if>
|
<if test="ypId != null and ypId != ''">
|
and yp_id = #{ypId}
|
</if>
|
<if test="ypCode != null and ypCode != ''">
|
and yp_code = #{ypCode}
|
</if>
|
<if test="ypName != null and ypName != ''">
|
and yp_name like concat('%', #{ypName}, '%')
|
</if>
|
<if test="ypGenericName != null and ypGenericName != ''">
|
and yp_generic_name like concat('%', #{ypGenericName}, '%')
|
</if>
|
<if test="pinYinCode != null and pinYinCode != ''">
|
and pin_yin_code = #{pinYinCode}
|
</if>
|
<if test="wuBiCode != null and wuBiCode != ''">
|
and wu_bi_code = #{wuBiCode}
|
</if>
|
<if test="mnemonicCode != null and mnemonicCode != ''">
|
and mnemonic_code = #{mnemonicCode}
|
</if>
|
<if test="largeUnit != null and largeUnit != ''">
|
and large_unit = #{largeUnit}
|
</if>
|
<if test="smallUnit != null and smallUnit != ''">
|
and small_unit = #{smallUnit}
|
</if>
|
<if test="outpatientUnit != null and outpatientUnit != ''">
|
and outpatient_unit = #{outpatientUnit}
|
</if>
|
<if test="hosUnit != null and hosUnit != ''">
|
and hos_unit = #{hosUnit}
|
</if>
|
<if test="ypSpec != null and ypSpec != ''">
|
and yp_spec = #{ypSpec}
|
</if>
|
<if test="drugsClassify != null and drugsClassify != ''">
|
and drugs_classify = #{drugsClassify}
|
</if>
|
<if test="detailClassify != null and detailClassify != ''">
|
and detail_classify = #{detailClassify}
|
</if>
|
<if test="summaryCalssify != null and summaryCalssify != ''">
|
and summary_calssify = #{summaryCalssify}
|
</if>
|
<if test="outRatio != null and outRatio != ''">
|
and out_ratio = #{outRatio}
|
</if>
|
<if test="hosRatio != null and hosRatio != ''">
|
and hos_ratio = #{hosRatio}
|
</if>
|
<if test="unpackRatio != null and unpackRatio != ''">
|
and unpack_ratio = #{unpackRatio}
|
</if>
|
<if test="additionRatio != null and additionRatio != ''">
|
and addition_ratio = #{additionRatio}
|
</if>
|
<if test="approvalNumber != null and approvalNumber != ''">
|
and approval_number = #{approvalNumber}
|
</if>
|
<if test="defaultDays != null and defaultDays != ''">
|
and default_days = #{defaultDays}
|
</if>
|
<if test="defaultDose != null and defaultDose != ''">
|
and default_dose = #{defaultDose}
|
</if>
|
<if test="defaultFrequency != null and defaultFrequency != ''">
|
and default_frequency = #{defaultFrequency}
|
</if>
|
<if test="defaultCode != null and defaultCode != ''">
|
and default_code = #{defaultCode}
|
</if>
|
<if test="doseUnitCode != null and doseUnitCode != ''">
|
and dose_unit_code = #{doseUnitCode}
|
</if>
|
<if test="doseRatio != null and doseRatio != ''">
|
and dose_ratio = #{doseRatio}
|
</if>
|
<if test="skinTestSign != null and skinTestSign != ''">
|
and skin_test_sign = #{skinTestSign}
|
</if>
|
<if test="skinTestGuide != null and skinTestGuide != ''">
|
and skin_test_guide = #{skinTestGuide}
|
</if>
|
<if test="deptClassify != null and deptClassify != ''">
|
and dept_classify = #{deptClassify}
|
</if>
|
<if test="referencePrice != null ">
|
and reference_price = #{referencePrice}
|
</if>
|
<if test="serialNumber != null and serialNumber != ''">
|
and serial_number = #{serialNumber}
|
</if>
|
<if test="isCharge != null and isCharge != ''">
|
and is_charge = #{isCharge}
|
</if>
|
<if test="medicalGrade != null and medicalGrade != ''">
|
and medical_grade = #{medicalGrade}
|
</if>
|
<if test="countryProCode != null and countryProCode != ''">
|
and country_pro_code = #{countryProCode}
|
</if>
|
<if test="countryProName != null and countryProName != ''">
|
and country_pro_name like concat('%', #{countryProName}, '%')
|
</if>
|
<if test="provincialProCode != null and provincialProCode != ''">
|
and provincial_pro_code = #{provincialProCode}
|
</if>
|
<if test="provincialProName != null and provincialProName != ''">
|
and provincial_pro_name like concat('%', #{provincialProName}, '%')
|
</if>
|
<if test="deleted != null ">
|
and deleted = #{deleted}
|
</if>
|
<if test="upperLimit != null ">
|
and upper_limit = #{upperLimit}
|
</if>
|
<if test="lowerLimit != null ">
|
and lower_limit = #{lowerLimit}
|
</if>
|
<if test="chinaNumber != null and chinaNumber != ''">
|
and china_number = #{chinaNumber}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectDictYpdmById" parameterType="Long"
|
resultMap="DictYpdmResult">
|
<include refid="selectDictYpdmVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDictYpdm" parameterType="DictYpdm" useGeneratedKeys="true"
|
keyProperty="id">
|
insert into dict_ypdm
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="deptId != null">dept_id,
|
</if>
|
<if test="ypId != null and ypId != ''">yp_id,
|
</if>
|
<if test="ypCode != null and ypCode != ''">yp_code,
|
</if>
|
<if test="ypName != null and ypName != ''">yp_name,
|
</if>
|
<if test="ypGenericName != null">yp_generic_name,
|
</if>
|
<if test="pinYinCode != null">pin_yin_code,
|
</if>
|
<if test="wuBiCode != null">wu_bi_code,
|
</if>
|
<if test="mnemonicCode != null">mnemonic_code,
|
</if>
|
<if test="largeUnit != null and largeUnit != ''">large_unit,
|
</if>
|
<if test="smallUnit != null">small_unit,
|
</if>
|
<if test="outpatientUnit != null">outpatient_unit,
|
</if>
|
<if test="hosUnit != null">hos_unit,
|
</if>
|
<if test="ypSpec != null">yp_spec,
|
</if>
|
<if test="drugsClassify != null">drugs_classify,
|
</if>
|
<if test="detailClassify != null">detail_classify,
|
</if>
|
<if test="summaryCalssify != null">summary_calssify,
|
</if>
|
<if test="outRatio != null">out_ratio,
|
</if>
|
<if test="hosRatio != null">hos_ratio,
|
</if>
|
<if test="unpackRatio != null">unpack_ratio,
|
</if>
|
<if test="additionRatio != null">addition_ratio,
|
</if>
|
<if test="approvalNumber != null">approval_number,
|
</if>
|
<if test="defaultDays != null">default_days,
|
</if>
|
<if test="defaultDose != null">default_dose,
|
</if>
|
<if test="defaultFrequency != null">default_frequency,
|
</if>
|
<if test="defaultCode != null">default_code,
|
</if>
|
<if test="doseUnitCode != null">dose_unit_code,
|
</if>
|
<if test="doseRatio != null">dose_ratio,
|
</if>
|
<if test="skinTestSign != null">skin_test_sign,
|
</if>
|
<if test="skinTestGuide != null">skin_test_guide,
|
</if>
|
<if test="deptClassify != null">dept_classify,
|
</if>
|
<if test="referencePrice != null">reference_price,
|
</if>
|
<if test="serialNumber != null">serial_number,
|
</if>
|
<if test="isCharge != null and isCharge != ''">is_charge,
|
</if>
|
<if test="medicalGrade != null">medical_grade,
|
</if>
|
<if test="countryProCode != null">country_pro_code,
|
</if>
|
<if test="countryProName != null">country_pro_name,
|
</if>
|
<if test="provincialProCode != null">provincial_pro_code,
|
</if>
|
<if test="provincialProName != null">provincial_pro_name,
|
</if>
|
<if test="deleted != null">deleted,
|
</if>
|
<if test="createBy != null">create_by,
|
</if>
|
<if test="createTime != null">create_time,
|
</if>
|
<if test="updateBy != null">update_by,
|
</if>
|
<if test="updateTime != null">update_time,
|
</if>
|
<if test="upperLimit != null">upper_limit,
|
</if>
|
<if test="lowerLimit != null">lower_limit,
|
</if>
|
<if test="chinaNumber != null">china_number,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="deptId != null">#{deptId},
|
</if>
|
<if test="ypId != null and ypId != ''">#{ypId},
|
</if>
|
<if test="ypCode != null and ypCode != ''">#{ypCode},
|
</if>
|
<if test="ypName != null and ypName != ''">#{ypName},
|
</if>
|
<if test="ypGenericName != null">#{ypGenericName},
|
</if>
|
<if test="pinYinCode != null">#{pinYinCode},
|
</if>
|
<if test="wuBiCode != null">#{wuBiCode},
|
</if>
|
<if test="mnemonicCode != null">#{mnemonicCode},
|
</if>
|
<if test="largeUnit != null and largeUnit != ''">#{largeUnit},
|
</if>
|
<if test="smallUnit != null">#{smallUnit},
|
</if>
|
<if test="outpatientUnit != null">#{outpatientUnit},
|
</if>
|
<if test="hosUnit != null">#{hosUnit},
|
</if>
|
<if test="ypSpec != null">#{ypSpec},
|
</if>
|
<if test="drugsClassify != null">#{drugsClassify},
|
</if>
|
<if test="detailClassify != null">#{detailClassify},
|
</if>
|
<if test="summaryCalssify != null">#{summaryCalssify},
|
</if>
|
<if test="outRatio != null">#{outRatio},
|
</if>
|
<if test="hosRatio != null">#{hosRatio},
|
</if>
|
<if test="unpackRatio != null">#{unpackRatio},
|
</if>
|
<if test="additionRatio != null">#{additionRatio},
|
</if>
|
<if test="approvalNumber != null">#{approvalNumber},
|
</if>
|
<if test="defaultDays != null">#{defaultDays},
|
</if>
|
<if test="defaultDose != null">#{defaultDose},
|
</if>
|
<if test="defaultFrequency != null">#{defaultFrequency},
|
</if>
|
<if test="defaultCode != null">#{defaultCode},
|
</if>
|
<if test="doseUnitCode != null">#{doseUnitCode},
|
</if>
|
<if test="doseRatio != null">#{doseRatio},
|
</if>
|
<if test="skinTestSign != null">#{skinTestSign},
|
</if>
|
<if test="skinTestGuide != null">#{skinTestGuide},
|
</if>
|
<if test="deptClassify != null">#{deptClassify},
|
</if>
|
<if test="referencePrice != null">#{referencePrice},
|
</if>
|
<if test="serialNumber != null">#{serialNumber},
|
</if>
|
<if test="isCharge != null and isCharge != ''">#{isCharge},
|
</if>
|
<if test="medicalGrade != null">#{medicalGrade},
|
</if>
|
<if test="countryProCode != null">#{countryProCode},
|
</if>
|
<if test="countryProName != null">#{countryProName},
|
</if>
|
<if test="provincialProCode != null">#{provincialProCode},
|
</if>
|
<if test="provincialProName != null">#{provincialProName},
|
</if>
|
<if test="deleted != null">#{deleted},
|
</if>
|
<if test="createBy != null">#{createBy},
|
</if>
|
<if test="createTime != null">#{createTime},
|
</if>
|
<if test="updateBy != null">#{updateBy},
|
</if>
|
<if test="updateTime != null">#{updateTime},
|
</if>
|
<if test="upperLimit != null">#{upperLimit},
|
</if>
|
<if test="lowerLimit != null">#{lowerLimit},
|
</if>
|
<if test="chinaNumber != null">#{chinaNumber},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateDictYpdm" parameterType="DictYpdm">
|
update dict_ypdm
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="deptId != null">dept_id =
|
#{deptId},
|
</if>
|
<if test="ypId != null and ypId != ''">yp_id =
|
#{ypId},
|
</if>
|
<if test="ypCode != null and ypCode != ''">yp_code =
|
#{ypCode},
|
</if>
|
<if test="ypName != null and ypName != ''">yp_name =
|
#{ypName},
|
</if>
|
<if test="ypGenericName != null">yp_generic_name =
|
#{ypGenericName},
|
</if>
|
<if test="pinYinCode != null">pin_yin_code =
|
#{pinYinCode},
|
</if>
|
<if test="wuBiCode != null">wu_bi_code =
|
#{wuBiCode},
|
</if>
|
<if test="mnemonicCode != null">mnemonic_code =
|
#{mnemonicCode},
|
</if>
|
<if test="largeUnit != null and largeUnit != ''">large_unit =
|
#{largeUnit},
|
</if>
|
<if test="smallUnit != null">small_unit =
|
#{smallUnit},
|
</if>
|
<if test="outpatientUnit != null">outpatient_unit =
|
#{outpatientUnit},
|
</if>
|
<if test="hosUnit != null">hos_unit =
|
#{hosUnit},
|
</if>
|
<if test="ypSpec != null">yp_spec =
|
#{ypSpec},
|
</if>
|
<if test="drugsClassify != null">drugs_classify =
|
#{drugsClassify},
|
</if>
|
<if test="detailClassify != null">detail_classify =
|
#{detailClassify},
|
</if>
|
<if test="summaryCalssify != null">summary_calssify =
|
#{summaryCalssify},
|
</if>
|
<if test="outRatio != null">out_ratio =
|
#{outRatio},
|
</if>
|
<if test="hosRatio != null">hos_ratio =
|
#{hosRatio},
|
</if>
|
<if test="unpackRatio != null">unpack_ratio =
|
#{unpackRatio},
|
</if>
|
<if test="additionRatio != null">addition_ratio =
|
#{additionRatio},
|
</if>
|
<if test="approvalNumber != null">approval_number =
|
#{approvalNumber},
|
</if>
|
<if test="defaultDays != null">default_days =
|
#{defaultDays},
|
</if>
|
<if test="defaultDose != null">default_dose =
|
#{defaultDose},
|
</if>
|
<if test="defaultFrequency != null">default_frequency =
|
#{defaultFrequency},
|
</if>
|
<if test="defaultCode != null">default_code =
|
#{defaultCode},
|
</if>
|
<if test="doseUnitCode != null">dose_unit_code =
|
#{doseUnitCode},
|
</if>
|
<if test="doseRatio != null">dose_ratio =
|
#{doseRatio},
|
</if>
|
<if test="skinTestSign != null">skin_test_sign =
|
#{skinTestSign},
|
</if>
|
<if test="skinTestGuide != null">skin_test_guide =
|
#{skinTestGuide},
|
</if>
|
<if test="deptClassify != null">dept_classify =
|
#{deptClassify},
|
</if>
|
<if test="referencePrice != null">reference_price =
|
#{referencePrice},
|
</if>
|
<if test="serialNumber != null">serial_number =
|
#{serialNumber},
|
</if>
|
<if test="isCharge != null and isCharge != ''">is_charge =
|
#{isCharge},
|
</if>
|
<if test="medicalGrade != null">medical_grade =
|
#{medicalGrade},
|
</if>
|
<if test="countryProCode != null">country_pro_code =
|
#{countryProCode},
|
</if>
|
<if test="countryProName != null">country_pro_name =
|
#{countryProName},
|
</if>
|
<if test="provincialProCode != null">provincial_pro_code =
|
#{provincialProCode},
|
</if>
|
<if test="provincialProName != null">provincial_pro_name =
|
#{provincialProName},
|
</if>
|
<if test="deleted != null">deleted =
|
#{deleted},
|
</if>
|
<if test="createBy != null">create_by =
|
#{createBy},
|
</if>
|
<if test="createTime != null">create_time =
|
#{createTime},
|
</if>
|
<if test="updateBy != null">update_by =
|
#{updateBy},
|
</if>
|
<if test="updateTime != null">update_time =
|
#{updateTime},
|
</if>
|
<if test="upperLimit != null">upper_limit =
|
#{upperLimit},
|
</if>
|
<if test="lowerLimit != null">lower_limit =
|
#{lowerLimit},
|
</if>
|
<if test="chinaNumber != null">china_number =
|
#{chinaNumber},
|
</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDictYpdmById" parameterType="Long">
|
delete
|
from dict_ypdm where id = #{id}
|
</delete>
|
|
<delete id="deleteDictYpdmByIds" parameterType="String">
|
delete from dict_ypdm where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|