|
@@ -0,0 +1,251 @@
|
|
|
+<?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.xlht.xlhtproject.mapper.TXinyiMedicineParamMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.xlht.xlhtproject.domain.TXinyiMedicineParam" id="TXinyiMedicineParamResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="numberBeng" column="number_beng" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="jsLlType" column="js_ll_type" />
|
|
|
+ <result property="jsLlOne" column="js_ll_one" />
|
|
|
+ <result property="jsLlTwo" column="js_ll_two" />
|
|
|
+ <result property="jsCodType" column="js_cod_type" />
|
|
|
+ <result property="jsCodOne" column="js_cod_one" />
|
|
|
+ <result property="jsCodTwo" column="js_cod_two" />
|
|
|
+ <result property="hycXsyType" column="hyc_xsy_type" />
|
|
|
+ <result property="hycXsyOne" column="hyc_xsy_one" />
|
|
|
+ <result property="hycXsyTwo" column="hyc_xsy_two" />
|
|
|
+ <result property="qycYxyType" column="qyc_yxy_type" />
|
|
|
+ <result property="qycYxyOne" column="qyc_yxy_one" />
|
|
|
+ <result property="qycYxyTwo" column="qyc_yxy_two" />
|
|
|
+ <result property="qycAdType" column="qyc_ad_type" />
|
|
|
+ <result property="qycAdOne" column="qyc_ad_one" />
|
|
|
+ <result property="qycAdTwo" column="qyc_ad_two" />
|
|
|
+ <result property="jsTnType" column="js_tn_type" />
|
|
|
+ <result property="jsTnOne" column="js_tn_one" />
|
|
|
+ <result property="jsTnTwo" column="js_tn_two" />
|
|
|
+ <result property="htfksd" column="htfksd" />
|
|
|
+ <result property="jzxs" column="jzxs" />
|
|
|
+ <result property="xzxs" column="xzxs" />
|
|
|
+ <result property="kzxs" column="kzxs" />
|
|
|
+ <result property="slfpxs" column="slfpxs" />
|
|
|
+ <result property="tydl" column="tydl" />
|
|
|
+ <result property="zhxs" column="zhxs" />
|
|
|
+ <result property="sxps" column="sxps" />
|
|
|
+ <result property="yymd" column="yymd" />
|
|
|
+ <result property="zxqdll" column="zxqdll" />
|
|
|
+ <result property="tdb" column="tdb" />
|
|
|
+ <result property="medicineAmount" column="medicine_amount" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="revision" column="revision" />
|
|
|
+ <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="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTXinyiMedicineParamVo">
|
|
|
+ select id, number_beng, type, js_ll_type, js_ll_one, js_ll_two, js_cod_type, js_cod_one, js_cod_two, hyc_xsy_type, hyc_xsy_one, hyc_xsy_two, qyc_yxy_type, qyc_yxy_one, qyc_yxy_two, qyc_ad_type, qyc_ad_one, qyc_ad_two, js_tn_type, js_tn_one, js_tn_two, htfksd, jzxs, xzxs, kzxs, slfpxs, tydl, zhxs, sxps, yymd, zxqdll, tdb, medicine_amount, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xinyi_medicine_param
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTXinyiMedicineParamList" parameterType="com.xlht.xlhtproject.domain.TXinyiMedicineParam" resultMap="TXinyiMedicineParamResult">
|
|
|
+ <include refid="selectTXinyiMedicineParamVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="numberBeng != null "> and number_beng = #{numberBeng}</if>
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
+ <if test="jsLlType != null "> and js_ll_type = #{jsLlType}</if>
|
|
|
+ <if test="jsLlOne != null "> and js_ll_one = #{jsLlOne}</if>
|
|
|
+ <if test="jsLlTwo != null "> and js_ll_two = #{jsLlTwo}</if>
|
|
|
+ <if test="jsCodType != null "> and js_cod_type = #{jsCodType}</if>
|
|
|
+ <if test="jsCodOne != null "> and js_cod_one = #{jsCodOne}</if>
|
|
|
+ <if test="jsCodTwo != null "> and js_cod_two = #{jsCodTwo}</if>
|
|
|
+ <if test="hycXsyType != null "> and hyc_xsy_type = #{hycXsyType}</if>
|
|
|
+ <if test="hycXsyOne != null "> and hyc_xsy_one = #{hycXsyOne}</if>
|
|
|
+ <if test="hycXsyTwo != null "> and hyc_xsy_two = #{hycXsyTwo}</if>
|
|
|
+ <if test="qycYxyType != null "> and qyc_yxy_type = #{qycYxyType}</if>
|
|
|
+ <if test="qycYxyOne != null "> and qyc_yxy_one = #{qycYxyOne}</if>
|
|
|
+ <if test="qycYxyTwo != null "> and qyc_yxy_two = #{qycYxyTwo}</if>
|
|
|
+ <if test="qycAdType != null "> and qyc_ad_type = #{qycAdType}</if>
|
|
|
+ <if test="qycAdOne != null "> and qyc_ad_one = #{qycAdOne}</if>
|
|
|
+ <if test="qycAdTwo != null "> and qyc_ad_two = #{qycAdTwo}</if>
|
|
|
+ <if test="jsTnType != null "> and js_tn_type = #{jsTnType}</if>
|
|
|
+ <if test="jsTnOne != null "> and js_tn_one = #{jsTnOne}</if>
|
|
|
+ <if test="jsTnTwo != null "> and js_tn_two = #{jsTnTwo}</if>
|
|
|
+ <if test="htfksd != null "> and htfksd = #{htfksd}</if>
|
|
|
+ <if test="jzxs != null "> and jzxs = #{jzxs}</if>
|
|
|
+ <if test="xzxs != null "> and xzxs = #{xzxs}</if>
|
|
|
+ <if test="kzxs != null "> and kzxs = #{kzxs}</if>
|
|
|
+ <if test="slfpxs != null "> and slfpxs = #{slfpxs}</if>
|
|
|
+ <if test="tydl != null "> and tydl = #{tydl}</if>
|
|
|
+ <if test="zhxs != null "> and zhxs = #{zhxs}</if>
|
|
|
+ <if test="sxps != null "> and sxps = #{sxps}</if>
|
|
|
+ <if test="yymd != null "> and yymd = #{yymd}</if>
|
|
|
+ <if test="zxqdll != null "> and zxqdll = #{zxqdll}</if>
|
|
|
+ <if test="tdb != null "> and tdb = #{tdb}</if>
|
|
|
+ <if test="medicineAmount != null "> and medicine_amount = #{medicineAmount}</if>
|
|
|
+ <if test="revision != null "> and revision = #{revision}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTXinyiMedicineParamById" parameterType="Long" resultMap="TXinyiMedicineParamResult">
|
|
|
+ <include refid="selectTXinyiMedicineParamVo"/>
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTXinyiMedicineParam" parameterType="com.xlht.xlhtproject.domain.TXinyiMedicineParam" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_xinyi_medicine_param
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="numberBeng != null">number_beng,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="jsLlType != null">js_ll_type,</if>
|
|
|
+ <if test="jsLlOne != null">js_ll_one,</if>
|
|
|
+ <if test="jsLlTwo != null">js_ll_two,</if>
|
|
|
+ <if test="jsCodType != null">js_cod_type,</if>
|
|
|
+ <if test="jsCodOne != null">js_cod_one,</if>
|
|
|
+ <if test="jsCodTwo != null">js_cod_two,</if>
|
|
|
+ <if test="hycXsyType != null">hyc_xsy_type,</if>
|
|
|
+ <if test="hycXsyOne != null">hyc_xsy_one,</if>
|
|
|
+ <if test="hycXsyTwo != null">hyc_xsy_two,</if>
|
|
|
+ <if test="qycYxyType != null">qyc_yxy_type,</if>
|
|
|
+ <if test="qycYxyOne != null">qyc_yxy_one,</if>
|
|
|
+ <if test="qycYxyTwo != null">qyc_yxy_two,</if>
|
|
|
+ <if test="qycAdType != null">qyc_ad_type,</if>
|
|
|
+ <if test="qycAdOne != null">qyc_ad_one,</if>
|
|
|
+ <if test="qycAdTwo != null">qyc_ad_two,</if>
|
|
|
+ <if test="jsTnType != null">js_tn_type,</if>
|
|
|
+ <if test="jsTnOne != null">js_tn_one,</if>
|
|
|
+ <if test="jsTnTwo != null">js_tn_two,</if>
|
|
|
+ <if test="htfksd != null">htfksd,</if>
|
|
|
+ <if test="jzxs != null">jzxs,</if>
|
|
|
+ <if test="xzxs != null">xzxs,</if>
|
|
|
+ <if test="kzxs != null">kzxs,</if>
|
|
|
+ <if test="slfpxs != null">slfpxs,</if>
|
|
|
+ <if test="tydl != null">tydl,</if>
|
|
|
+ <if test="zhxs != null">zhxs,</if>
|
|
|
+ <if test="sxps != null">sxps,</if>
|
|
|
+ <if test="yymd != null">yymd,</if>
|
|
|
+ <if test="zxqdll != null">zxqdll,</if>
|
|
|
+ <if test="tdb != null">tdb,</if>
|
|
|
+ <if test="medicineAmount != null">medicine_amount,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="revision != null">revision,</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="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="numberBeng != null">#{numberBeng},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="jsLlType != null">#{jsLlType},</if>
|
|
|
+ <if test="jsLlOne != null">#{jsLlOne},</if>
|
|
|
+ <if test="jsLlTwo != null">#{jsLlTwo},</if>
|
|
|
+ <if test="jsCodType != null">#{jsCodType},</if>
|
|
|
+ <if test="jsCodOne != null">#{jsCodOne},</if>
|
|
|
+ <if test="jsCodTwo != null">#{jsCodTwo},</if>
|
|
|
+ <if test="hycXsyType != null">#{hycXsyType},</if>
|
|
|
+ <if test="hycXsyOne != null">#{hycXsyOne},</if>
|
|
|
+ <if test="hycXsyTwo != null">#{hycXsyTwo},</if>
|
|
|
+ <if test="qycYxyType != null">#{qycYxyType},</if>
|
|
|
+ <if test="qycYxyOne != null">#{qycYxyOne},</if>
|
|
|
+ <if test="qycYxyTwo != null">#{qycYxyTwo},</if>
|
|
|
+ <if test="qycAdType != null">#{qycAdType},</if>
|
|
|
+ <if test="qycAdOne != null">#{qycAdOne},</if>
|
|
|
+ <if test="qycAdTwo != null">#{qycAdTwo},</if>
|
|
|
+ <if test="jsTnType != null">#{jsTnType},</if>
|
|
|
+ <if test="jsTnOne != null">#{jsTnOne},</if>
|
|
|
+ <if test="jsTnTwo != null">#{jsTnTwo},</if>
|
|
|
+ <if test="htfksd != null">#{htfksd},</if>
|
|
|
+ <if test="jzxs != null">#{jzxs},</if>
|
|
|
+ <if test="xzxs != null">#{xzxs},</if>
|
|
|
+ <if test="kzxs != null">#{kzxs},</if>
|
|
|
+ <if test="slfpxs != null">#{slfpxs},</if>
|
|
|
+ <if test="tydl != null">#{tydl},</if>
|
|
|
+ <if test="zhxs != null">#{zhxs},</if>
|
|
|
+ <if test="sxps != null">#{sxps},</if>
|
|
|
+ <if test="yymd != null">#{yymd},</if>
|
|
|
+ <if test="zxqdll != null">#{zxqdll},</if>
|
|
|
+ <if test="tdb != null">#{tdb},</if>
|
|
|
+ <if test="medicineAmount != null">#{medicineAmount},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="revision != null">#{revision},</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="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTXinyiMedicineParam" parameterType="com.xlht.xlhtproject.domain.TXinyiMedicineParam">
|
|
|
+ update t_xinyi_medicine_param
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="numberBeng != null">number_beng = #{numberBeng},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="jsLlType != null">js_ll_type = #{jsLlType},</if>
|
|
|
+ <if test="jsLlOne != null">js_ll_one = #{jsLlOne},</if>
|
|
|
+ <if test="jsLlTwo != null">js_ll_two = #{jsLlTwo},</if>
|
|
|
+ <if test="jsCodType != null">js_cod_type = #{jsCodType},</if>
|
|
|
+ <if test="jsCodOne != null">js_cod_one = #{jsCodOne},</if>
|
|
|
+ <if test="jsCodTwo != null">js_cod_two = #{jsCodTwo},</if>
|
|
|
+ <if test="hycXsyType != null">hyc_xsy_type = #{hycXsyType},</if>
|
|
|
+ <if test="hycXsyOne != null">hyc_xsy_one = #{hycXsyOne},</if>
|
|
|
+ <if test="hycXsyTwo != null">hyc_xsy_two = #{hycXsyTwo},</if>
|
|
|
+ <if test="qycYxyType != null">qyc_yxy_type = #{qycYxyType},</if>
|
|
|
+ <if test="qycYxyOne != null">qyc_yxy_one = #{qycYxyOne},</if>
|
|
|
+ <if test="qycYxyTwo != null">qyc_yxy_two = #{qycYxyTwo},</if>
|
|
|
+ <if test="qycAdType != null">qyc_ad_type = #{qycAdType},</if>
|
|
|
+ <if test="qycAdOne != null">qyc_ad_one = #{qycAdOne},</if>
|
|
|
+ <if test="qycAdTwo != null">qyc_ad_two = #{qycAdTwo},</if>
|
|
|
+ <if test="jsTnType != null">js_tn_type = #{jsTnType},</if>
|
|
|
+ <if test="jsTnOne != null">js_tn_one = #{jsTnOne},</if>
|
|
|
+ <if test="jsTnTwo != null">js_tn_two = #{jsTnTwo},</if>
|
|
|
+ <if test="htfksd != null">htfksd = #{htfksd},</if>
|
|
|
+ <if test="jzxs != null">jzxs = #{jzxs},</if>
|
|
|
+ <if test="xzxs != null">xzxs = #{xzxs},</if>
|
|
|
+ <if test="kzxs != null">kzxs = #{kzxs},</if>
|
|
|
+ <if test="slfpxs != null">slfpxs = #{slfpxs},</if>
|
|
|
+ <if test="tydl != null">tydl = #{tydl},</if>
|
|
|
+ <if test="zhxs != null">zhxs = #{zhxs},</if>
|
|
|
+ <if test="sxps != null">sxps = #{sxps},</if>
|
|
|
+ <if test="yymd != null">yymd = #{yymd},</if>
|
|
|
+ <if test="zxqdll != null">zxqdll = #{zxqdll},</if>
|
|
|
+ <if test="tdb != null">tdb = #{tdb},</if>
|
|
|
+ <if test="medicineAmount != null">medicine_amount = #{medicineAmount},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="revision != null">revision = #{revision},</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="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiMedicineParamById" parameterType="Long">
|
|
|
+ update t_xinyi_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiMedicineParamByIds" parameterType="String">
|
|
|
+ update t_xinyi_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 下面是新增的SQL,不要覆盖 -->
|
|
|
+ <select id="getLatestRecord" resultMap="TXinyiMedicineParamResult">
|
|
|
+ <include refid="selectTXinyiMedicineParamVo"/>
|
|
|
+ where del_flag = 0 order by id desc limit 1
|
|
|
+ </select>
|
|
|
+</mapper>
|