123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <?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.InpRecureTreatMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
- <id column="irt_id" property="irtId" jdbcType="INTEGER" />
- <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
- <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
- <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
- <result column="irt_item" property="irtItem" jdbcType="VARCHAR" />
- <result column="irt_item_name" property="irtItemName" jdbcType="VARCHAR" />
- <result column="irt_stage" property="irtStage" jdbcType="INTEGER" />
- <result column="irt_time" property="irtTime" jdbcType="VARCHAR" />
- <result column="irt_item_target" property="irtItemTarget" jdbcType="VARCHAR" />
- <result column="irt_former_id" property="irtFormerId" jdbcType="INTEGER" />
- <result column="irt_recordor" property="irtRecordor" jdbcType="VARCHAR" />
- <result column="irt_record_time" property="irtRecordTime" jdbcType="TIMESTAMP" />
- <result column="irt_operation_time" property="irtOperationTime" jdbcType="TIMESTAMP" />
- <result column="irt_operator" property="irtOperator" jdbcType="VARCHAR" />
- <result column="irt_is_del" property="irtIsDel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- irt_id, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, irt_item, irt_item_name,
- irt_stage, irt_time, irt_item_target, irt_former_id, irt_recordor, irt_record_time,
- irt_operation_time, irt_operator, irt_is_del
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_recure_treat
- where irt_id = #{irtId,jdbcType=INTEGER}
- and irt_is_del = 0
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_recure_treat
- where irt_id = #{irtId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" useGeneratedKeys="true" keyColumn="irt_id" keyProperty="irtId">
- insert into inp_recure_treat (PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- irt_item, irt_item_name, irt_stage,
- irt_time, irt_item_target, irt_former_id,
- irt_recordor, irt_record_time, irt_operation_time,
- irt_operator, irt_is_del)
- values (#{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{irtItem,jdbcType=VARCHAR}, #{irtItemName,jdbcType=VARCHAR}, #{irtStage,jdbcType=INTEGER},
- #{irtTime,jdbcType=VARCHAR}, #{irtItemTarget,jdbcType=VARCHAR}, #{irtFormerId,jdbcType=INTEGER},
- #{irtRecordor,jdbcType=VARCHAR}, #{irtRecordTime,jdbcType=TIMESTAMP}, #{irtOperationTime,jdbcType=TIMESTAMP},
- #{irtOperator,jdbcType=VARCHAR}, 0)
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
- update inp_recure_treat
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null" >
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="irtItem != null" >
- irt_item = #{irtItem,jdbcType=VARCHAR},
- </if>
- <if test="irtItemName != null" >
- irt_item_name = #{irtItemName,jdbcType=VARCHAR},
- </if>
- <if test="irtStage != null" >
- irt_stage = #{irtStage,jdbcType=INTEGER},
- </if>
- <if test="irtTime != null" >
- irt_time = #{irtTime,jdbcType=VARCHAR},
- </if>
- <if test="irtItemTarget != null" >
- irt_item_target = #{irtItemTarget,jdbcType=VARCHAR},
- </if>
- <if test="irtFormerId != null" >
- irt_former_id = #{irtFormerId,jdbcType=INTEGER},
- </if>
- <if test="irtRecordor != null" >
- irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
- </if>
- <if test="irtRecordTime != null" >
- irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irtOperationTime != null" >
- irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irtOperator != null" >
- irt_operator = #{irtOperator,jdbcType=VARCHAR},
- </if>
- <if test="irtIsDel != null" >
- irt_is_del = #{irtIsDel,jdbcType=INTEGER},
- </if>
- </set>
- where irt_id = #{irtId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
- update inp_recure_treat
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- irt_item = #{irtItem,jdbcType=VARCHAR},
- irt_item_name = #{irtItemName,jdbcType=VARCHAR},
- irt_stage = #{irtStage,jdbcType=INTEGER},
- irt_time = #{irtTime,jdbcType=VARCHAR},
- irt_item_target = #{irtItemTarget,jdbcType=VARCHAR},
- irt_former_id = #{irtFormerId,jdbcType=INTEGER},
- irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
- irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
- irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
- irt_operator = #{irtOperator,jdbcType=VARCHAR},
- irt_is_del = #{irtIsDel,jdbcType=INTEGER}
- where irt_id = #{irtId,jdbcType=INTEGER}
- </update>
- <update id="delById">
- update inp_recure_treat
- set
- irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
- irt_operator = #{irtOperator,jdbcType=VARCHAR},
- irt_is_del = -1
- where irt_id = #{irtId,jdbcType=INTEGER}
- </update>
- <select id="selectByPatient" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/>
- from inp_recure_treat
- where PatientNo = #{patientNo,jdbcType=VARCHAR}
- and irt_is_del = 0
- and HI_ID = #{hiId,jdbcType=INTEGER}
- order by irt_record_time
- </select>
- </mapper>
|