123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?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.xinxin.topro.inpnurseservice.mysqlmapper.InpRecureTreatRecordMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreatRecord" >
- <id column="irtr_id" property="irtrId" jdbcType="INTEGER" />
- <result column="irt_id" property="irtId" jdbcType="INTEGER" />
- <result column="irtr_time" property="irtrTime" jdbcType="TIMESTAMP" />
- <result column="irtr_therapist" property="irtrTherapist" jdbcType="VARCHAR" />
- <result column="irtr_recordor" property="irtrRecordor" jdbcType="VARCHAR" />
- <result column="irtr_record_time" property="irtrRecordTime" jdbcType="TIMESTAMP" />
- <result column="irtr_operation_time" property="irtrOperationTime" jdbcType="TIMESTAMP" />
- <result column="irtr_operator" property="irtrOperator" jdbcType="VARCHAR" />
- <result column="irtr_is_del" property="irtrIsDel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- irtr_id, irt_id, irtr_time, irtr_therapist, irtr_recordor, irtr_record_time, irtr_operation_time,
- irtr_operator, irtr_is_del
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_recure_treat_record
- where irtr_id = #{irtrId,jdbcType=INTEGER}
- and irtr_is_del = 0
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_recure_treat_record
- where irtr_id = #{irtrId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreatRecord" useGeneratedKeys="true" keyColumn="irtr_id" keyProperty="irtrId">
- insert into inp_recure_treat_record (irt_id, irtr_time,
- irtr_therapist, irtr_recordor, irtr_record_time,
- irtr_operation_time, irtr_operator, irtr_is_del
- )
- values (#{irtId,jdbcType=INTEGER}, #{irtrTime,jdbcType=TIMESTAMP},
- #{irtrTherapist,jdbcType=VARCHAR}, #{irtrRecordor,jdbcType=VARCHAR}, #{irtrRecordTime,jdbcType=TIMESTAMP},
- #{irtrOperationTime,jdbcType=TIMESTAMP}, #{irtrOperator,jdbcType=VARCHAR}, 0
- )
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreatRecord" >
- update inp_recure_treat_record
- <set >
- <if test="irtId != null" >
- irt_id = #{irtId,jdbcType=INTEGER},
- </if>
- <if test="irtrTime != null" >
- irtr_time = #{irtrTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irtrTherapist != null" >
- irtr_therapist = #{irtrTherapist,jdbcType=VARCHAR},
- </if>
- <if test="irtrRecordor != null" >
- irtr_recordor = #{irtrRecordor,jdbcType=VARCHAR},
- </if>
- <if test="irtrRecordTime != null" >
- irtr_record_time = #{irtrRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irtrOperationTime != null" >
- irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irtrOperator != null" >
- irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
- </if>
- <if test="irtrIsDel != null" >
- irtr_is_del = #{irtrIsDel,jdbcType=INTEGER},
- </if>
- </set>
- where irtr_id = #{irtrId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreatRecord" >
- update inp_recure_treat_record
- set irt_id = #{irtId,jdbcType=INTEGER},
- irtr_time = #{irtrTime,jdbcType=TIMESTAMP},
- irtr_therapist = #{irtrTherapist,jdbcType=VARCHAR},
- irtr_recordor = #{irtrRecordor,jdbcType=VARCHAR},
- irtr_record_time = #{irtrRecordTime,jdbcType=TIMESTAMP},
- irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
- irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
- irtr_is_del = #{irtrIsDel,jdbcType=INTEGER}
- where irtr_id = #{irtrId,jdbcType=INTEGER}
- </update>
- <update id="updateIrtId">
- update inp_recure_treat_record
- set irt_id = #{irtId,jdbcType=INTEGER}
- where irt_id = #{oldIrtId,jdbcType=INTEGER}
- </update>
- <update id="delByIrtId">
- update inp_recure_treat_record
- set
- irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
- irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
- irtr_is_del = -1
- where irt_id = #{irtId,jdbcType=INTEGER}
- </update>
- <update id="delByIrtrId">
- update inp_recure_treat_record
- set
- irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
- irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
- irtr_is_del = -1
- where irtr_id = #{irtrId,jdbcType=INTEGER}
- </update>
- <resultMap id="ListResultMap" type="com.xinxin.topro.inpnurseservice.vo.RecureTreatRecordVO" extends="BaseResultMap">
- <result column="therapistName" property="therapistName" jdbcType="VARCHAR" />
- </resultMap>
- <select id="selectByIrtId" resultMap="ListResultMap">
- select <include refid="Base_Column_List"/>,
- (select su.UI_Name from sys_userinfo su where su.HI_ID = #{hiId,jdbcType=INTEGER} and su.SS_ISDel = 0 and ir.irtr_therapist = su.UI_Code limit 1) therapistName
- from inp_recure_treat_record ir
- where ir.irt_id = #{irtId,jdbcType=INTEGER}
- and ir.irtr_is_del = 0
- order by irtr_time, irtr_record_time
- </select>
- <select id="selectByIrtIds" resultMap="ListResultMap">
- select <include refid="Base_Column_List"/>,
- (select su.UI_Name from sys_userinfo su where su.HI_ID = #{hiId,jdbcType=INTEGER} and su.SS_ISDel = 0 and ir.irtr_therapist = su.UI_Code limit 1) therapistName
- from inp_recure_treat_record ir
- where ir.irt_id in
- <foreach collection="idList" item="item" open="(" close=")" separator=",">
- #{item,jdbcType=INTEGER}
- </foreach>
- and ir.irtr_is_del = 0
- order by irt_id, irtr_time, irtr_record_time
- </select>
- </mapper>
|