|
@@ -1,12 +1,13 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!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">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
+<mapper namespace="com.xlht.xlhtproject.mapper.TXlhtMedicineParamMapper">
|
|
|
|
|
|
- <resultMap type="TXinyiMedicineParam" id="TXinyiMedicineParamResult">
|
|
|
|
|
|
+ <resultMap type="TXlhtMedicineParam" id="TXlhtMedicineParamResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
- <result property="type" column="type" />
|
|
|
|
|
|
+ <result property="typeOne" column="type_one" />
|
|
|
|
+ <result property="typeTwo" column="type_two" />
|
|
<result property="jsLlTypeOne" column="js_ll_type_one" />
|
|
<result property="jsLlTypeOne" column="js_ll_type_one" />
|
|
<result property="jsLlOne" column="js_ll_one" />
|
|
<result property="jsLlOne" column="js_ll_one" />
|
|
<result property="jsLlTypeTwo" column="js_ll_type_two" />
|
|
<result property="jsLlTypeTwo" column="js_ll_type_two" />
|
|
@@ -64,19 +65,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="selectTXinyiMedicineParamVo">
|
|
|
|
- select id, type, js_ll_type_one, js_ll_one, js_ll_type_two, js_ll_two, js_cod_type_one, js_cod_one, js_cod_type_two, js_cod_two, hyc_xsy_type_one, hyc_xsy_one, hyc_xsy_type_two, hyc_xsy_two, qyc_yxy_type_one, qyc_yxy_one, qyc_yxy_type_two, qyc_yxy_two, qyc_ad_type_one, qyc_ad_one, qyc_ad_type_two, qyc_ad_two, js_tn_type_one, js_tn_one, js_tn_type_two, js_tn_two, htfksd_one, htfksd_two, jzxs_one, jzxs_two, xzxs_one, xzxs_two, kzxs_one, kzxs_two, slfpxs_one, slfpxs_two, tydl_one, tydl_two, zhxs_one, zhxs_two, sxps_one, sxps_two, yymd_one, yymd_two, zxqdll_one, zxqdll_two, medicine_amount_one, medicine_amount_two, tdb_one, tdb_two, revision, del_flag, create_by, create_time, update_by, update_time, remark from t_xlht_medicine_param
|
|
|
|
|
|
+ <sql id="selectTXlhtMedicineParamVo">
|
|
|
|
+ select id, type_one, type_two, js_ll_type_one, js_ll_one, js_ll_type_two, js_ll_two, js_cod_type_one, js_cod_one, js_cod_type_two, js_cod_two, hyc_xsy_type_one, hyc_xsy_one, hyc_xsy_type_two, hyc_xsy_two, qyc_yxy_type_one, qyc_yxy_one, qyc_yxy_type_two, qyc_yxy_two, qyc_ad_type_one, qyc_ad_one, qyc_ad_type_two, qyc_ad_two, js_tn_type_one, js_tn_one, js_tn_type_two, js_tn_two, htfksd_one, htfksd_two, jzxs_one, jzxs_two, xzxs_one, xzxs_two, kzxs_one, kzxs_two, slfpxs_one, slfpxs_two, tydl_one, tydl_two, zhxs_one, zhxs_two, sxps_one, sxps_two, yymd_one, yymd_two, zxqdll_one, zxqdll_two, medicine_amount_one, medicine_amount_two, tdb_one, tdb_two, revision, del_flag, create_by, create_time, update_by, update_time, remark from t_xlht_medicine_param
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="selectTXinyiMedicineParamById" parameterType="Long" resultMap="TXinyiMedicineParamResult">
|
|
|
|
- <include refid="selectTXinyiMedicineParamVo"/>
|
|
|
|
|
|
+ <select id="selectTXlhtMedicineParamById" parameterType="Long" resultMap="TXlhtMedicineParamResult">
|
|
|
|
+ <include refid="selectTXlhtMedicineParamVo"/>
|
|
where id = #{id} and del_flag = 0
|
|
where id = #{id} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <insert id="insertTXinyiMedicineParam" parameterType="TXinyiMedicineParam" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
+ <insert id="insertTXlhtMedicineParam" parameterType="TXlhtMedicineParam" useGeneratedKeys="true" keyProperty="id">
|
|
insert into t_xlht_medicine_param
|
|
insert into t_xlht_medicine_param
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="type != null">type,</if>
|
|
|
|
|
|
+ <if test="typeOne != null">type_one,</if>
|
|
|
|
+ <if test="typeTwo != null">type_two,</if>
|
|
<if test="jsLlTypeOne != null">js_ll_type_one,</if>
|
|
<if test="jsLlTypeOne != null">js_ll_type_one,</if>
|
|
<if test="jsLlOne != null">js_ll_one,</if>
|
|
<if test="jsLlOne != null">js_ll_one,</if>
|
|
<if test="jsLlTypeTwo != null">js_ll_type_two,</if>
|
|
<if test="jsLlTypeTwo != null">js_ll_type_two,</if>
|
|
@@ -134,7 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="type != null">#{type},</if>
|
|
|
|
|
|
+ <if test="typeOne != null">#{typeOne},</if>
|
|
|
|
+ <if test="typeTwo != null">#{typeTwo},</if>
|
|
<if test="jsLlTypeOne != null">#{jsLlTypeOne},</if>
|
|
<if test="jsLlTypeOne != null">#{jsLlTypeOne},</if>
|
|
<if test="jsLlOne != null">#{jsLlOne},</if>
|
|
<if test="jsLlOne != null">#{jsLlOne},</if>
|
|
<if test="jsLlTypeTwo != null">#{jsLlTypeTwo},</if>
|
|
<if test="jsLlTypeTwo != null">#{jsLlTypeTwo},</if>
|
|
@@ -193,10 +196,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
- <update id="updateTXinyiMedicineParam" parameterType="TXinyiMedicineParam">
|
|
|
|
|
|
+ <update id="updateTXlhtMedicineParam" parameterType="TXlhtMedicineParam">
|
|
update t_xlht_medicine_param
|
|
update t_xlht_medicine_param
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="type != null">type = #{type},</if>
|
|
|
|
|
|
+ <if test="typeOne != null">type_one = #{typeOne},</if>
|
|
|
|
+ <if test="typeTwo != null">type_two = #{typeTwo},</if>
|
|
<if test="jsLlTypeOne != null">js_ll_type_one = #{jsLlTypeOne},</if>
|
|
<if test="jsLlTypeOne != null">js_ll_type_one = #{jsLlTypeOne},</if>
|
|
<if test="jsLlOne != null">js_ll_one = #{jsLlOne},</if>
|
|
<if test="jsLlOne != null">js_ll_one = #{jsLlOne},</if>
|
|
<if test="jsLlTypeTwo != null">js_ll_type_two = #{jsLlTypeTwo},</if>
|
|
<if test="jsLlTypeTwo != null">js_ll_type_two = #{jsLlTypeTwo},</if>
|
|
@@ -259,19 +263,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <delete id="deleteTXinyiMedicineParamById" parameterType="Long">
|
|
|
|
|
|
+ <delete id="deleteTXlhtMedicineParamById" parameterType="Long">
|
|
update t_xlht_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
update t_xlht_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
- <delete id="deleteTXinyiMedicineParamByIds" parameterType="String">
|
|
|
|
|
|
+ <delete id="deleteTXlhtMedicineParamByIds" parameterType="String">
|
|
update t_xlht_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
update t_xlht_medicine_param set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
+
|
|
<!-- 下面是新增的SQL,不要覆盖 -->
|
|
<!-- 下面是新增的SQL,不要覆盖 -->
|
|
- <select id="getLatestRecord" resultMap="TXinyiMedicineParamResult">
|
|
|
|
|
|
+ <select id="getLatestRecord" resultMap="TXlhtMedicineParamResult">
|
|
SELECT TOP
|
|
SELECT TOP
|
|
1 *
|
|
1 *
|
|
FROM
|
|
FROM
|
|
@@ -280,11 +285,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
- <select id="selectTXinyiMedicineParamList" parameterType="TXinyiMedicineParam" resultMap="TXinyiMedicineParamResult">
|
|
|
|
- <include refid="selectTXinyiMedicineParamVo"/>
|
|
|
|
|
|
+ <select id="selectTXlhtMedicineParamList" parameterType="TXlhtMedicineParam" resultMap="TXlhtMedicineParamResult">
|
|
|
|
+ <include refid="selectTXlhtMedicineParamVo"/>
|
|
<where>
|
|
<where>
|
|
1 = 1
|
|
1 = 1
|
|
- <if test="type != null "> and type = #{type}</if>
|
|
|
|
|
|
+ <if test="typeOne != null "> and type_one = #{typeOne}</if>
|
|
|
|
+ <if test="typeTwo != null "> and type_two = #{typeTwo}</if>
|
|
<if test="jsLlTypeOne != null "> and js_ll_type_one = #{jsLlTypeOne}</if>
|
|
<if test="jsLlTypeOne != null "> and js_ll_type_one = #{jsLlTypeOne}</if>
|
|
<if test="jsLlOne != null "> and js_ll_one = #{jsLlOne}</if>
|
|
<if test="jsLlOne != null "> and js_ll_one = #{jsLlOne}</if>
|
|
<if test="jsLlTypeTwo != null "> and js_ll_type_two = #{jsLlTypeTwo}</if>
|
|
<if test="jsLlTypeTwo != null "> and js_ll_type_two = #{jsLlTypeTwo}</if>
|
|
@@ -334,6 +340,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="tdbOne != null "> and tdb_one = #{tdbOne}</if>
|
|
<if test="tdbOne != null "> and tdb_one = #{tdbOne}</if>
|
|
<if test="tdbTwo != null "> and tdb_two = #{tdbTwo}</if>
|
|
<if test="tdbTwo != null "> and tdb_two = #{tdbTwo}</if>
|
|
<if test="revision != null "> and revision = #{revision}</if>
|
|
<if test="revision != null "> and revision = #{revision}</if>
|
|
|
|
+ <!-- 下面是新增的SQL检索条件 SqlServer写法-->
|
|
|
|
+ <if test="timeBegin != null and timeBegin != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) >= #{timeBegin}</if>
|
|
|
|
+ <if test="timeEnd != null and timeEnd != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) <= #{timeEnd}</if>
|
|
|
|
+ <!-- 下面是新增的SQL检索条件 MySQL写法-->
|
|
|
|
+ <!--<if test="timeBegin != null and timeBegin != ''"> and DATE_FORMAT(create_time, '%Y-%m-%d') >= #{timeBegin}</if>
|
|
|
|
+ <if test="timeEnd != null and timeEnd != ''"> DATE_FORMAT(create_time, '%Y-%m-%d') <= #{timeEnd}</if>-->
|
|
</where>
|
|
</where>
|
|
and del_flag = 0 order by id desc
|
|
and del_flag = 0 order by id desc
|
|
</select>
|
|
</select>
|