123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- <?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.InpRemarkMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
- <id column="IRM_ID" jdbcType="INTEGER" property="irmId"/>
- <result column="PatientNo" jdbcType="VARCHAR" property="patientno"/>
- <result column="HI_ID" jdbcType="INTEGER" property="hiId"/>
- <result column="DD_DepDm" jdbcType="VARCHAR" property="ddDepdm"/>
- <result column="DW_WardDm" jdbcType="VARCHAR" property="dwWarddm"/>
- <result column="DB_BedNo" jdbcType="VARCHAR" property="dbBedno"/>
- <result column="IRM_Measure_Time" jdbcType="TIMESTAMP" property="irmMeasureTime"/>
- <result column="IRM_Recordor" jdbcType="VARCHAR" property="irmRecordor"/>
- <result column="IRM_Record_Time" jdbcType="TIMESTAMP" property="irmRecordTime"/>
- <result column="IRM_Operation_Time" jdbcType="TIMESTAMP" property="irmOperationTime"/>
- <result column="IRM_Operator" jdbcType="VARCHAR" property="irmOperator"/>
- <result column="IRM_IsDel" jdbcType="INTEGER" property="irmIsdel"/>
- <result column="IRM_FormerID" jdbcType="INTEGER" property="irmFormerid"/>
- <result column="IRM_Record" jdbcType="VARCHAR" property="irmRecord"/>
- </resultMap>
- <sql id="Base_Column_List">
- IRM_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IRM_Measure_Time, IRM_Recordor,
- IRM_Record_Time, IRM_Operation_Time, IRM_Operator, IRM_IsDel, IRM_FormerID, IRM_Record
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_remark
- where IRM_ID = #{irmId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from inp_remark
- where IRM_ID = #{irmId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark" useGeneratedKeys="true"
- keyColumn="IRM_ID" keyProperty="irmId">
- insert into inp_remark (IRM_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IRM_Measure_Time, IRM_Recordor, IRM_Record_Time,
- IRM_Operation_Time, IRM_Operator, IRM_IsDel,
- IRM_FormerID, IRM_Record)
- values (#{irmId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{irmMeasureTime,jdbcType=TIMESTAMP}, #{irmRecordor,jdbcType=VARCHAR}, #{irmRecordTime,jdbcType=TIMESTAMP},
- #{irmOperationTime,jdbcType=TIMESTAMP}, #{irmOperator,jdbcType=VARCHAR}, #{irmIsdel,jdbcType=INTEGER},
- #{irmFormerid,jdbcType=INTEGER}, #{irmRecord,jdbcType=VARCHAR})
- </insert>
- <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true"
- keyColumn="IRM_ID" keyProperty="irmId">
- insert into inp_remark (IRM_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IRM_Measure_Time, IRM_Recordor, IRM_Record_Time,
- IRM_Operation_Time, IRM_Operator, IRM_IsDel,
- IRM_FormerID, IRM_Record)
- values
- <foreach separator="," item="item" index="index" collection="list">
- (#{item.irmId,jdbcType=INTEGER}, #{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER},
- #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR},
- #{item.irmMeasureTime,jdbcType=TIMESTAMP}, #{item.irmRecordor,jdbcType=VARCHAR},
- #{item.irmRecordTime,jdbcType=TIMESTAMP},
- #{item.irmOperationTime,jdbcType=TIMESTAMP}, #{item.irmOperator,jdbcType=VARCHAR},
- #{item.irmIsdel,jdbcType=INTEGER},
- #{item.irmFormerid,jdbcType=INTEGER}, #{item.irmRecord,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark" useGeneratedKeys="true" keyColumn="IRM_ID" keyProperty="irmId">
- insert into inp_remark
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="irmId != null">
- IRM_ID,
- </if>
- <if test="patientno != null">
- PatientNo,
- </if>
- <if test="hiId != null">
- HI_ID,
- </if>
- <if test="ddDepdm != null">
- DD_DepDm,
- </if>
- <if test="dwWarddm != null">
- DW_WardDm,
- </if>
- <if test="dbBedno != null">
- DB_BedNo,
- </if>
- <if test="irmMeasureTime != null">
- IRM_Measure_Time,
- </if>
- <if test="irmRecordor != null">
- IRM_Recordor,
- </if>
- <if test="irmRecordTime != null">
- IRM_Record_Time,
- </if>
- <if test="irmOperationTime != null">
- IRM_Operation_Time,
- </if>
- <if test="irmOperator != null">
- IRM_Operator,
- </if>
- <if test="irmIsdel != null">
- IRM_IsDel,
- </if>
- <if test="irmFormerid != null">
- IRM_FormerID,
- </if>
- <if test="irmRecord != null">
- IRM_Record,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="irmId != null">
- #{irmId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null">
- #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null">
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null">
- #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null">
- #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null">
- #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="irmMeasureTime != null">
- #{irmMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmRecordor != null">
- #{irmRecordor,jdbcType=VARCHAR},
- </if>
- <if test="irmRecordTime != null">
- #{irmRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmOperationTime != null">
- #{irmOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmOperator != null">
- #{irmOperator,jdbcType=VARCHAR},
- </if>
- <if test="irmIsdel != null">
- #{irmIsdel,jdbcType=INTEGER},
- </if>
- <if test="irmFormerid != null">
- #{irmFormerid,jdbcType=INTEGER},
- </if>
- <if test="irmRecord != null">
- #{irmRecord,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
- update inp_remark
- <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="irmMeasureTime != null">
- IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmRecordor != null">
- IRM_Recordor = #{irmRecordor,jdbcType=VARCHAR},
- </if>
- <if test="irmRecordTime != null">
- IRM_Record_Time = #{irmRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmOperationTime != null">
- IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="irmOperator != null">
- IRM_Operator = #{irmOperator,jdbcType=VARCHAR},
- </if>
- <if test="irmIsdel != null">
- IRM_IsDel = #{irmIsdel,jdbcType=INTEGER},
- </if>
- <if test="irmFormerid != null">
- IRM_FormerID = #{irmFormerid,jdbcType=INTEGER},
- </if>
- <if test="irmRecord != null">
- IRM_Record = #{irmRecord,jdbcType=VARCHAR},
- </if>
- </set>
- where IRM_ID = #{irmId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
- update inp_remark
- 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},
- IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP},
- IRM_Recordor = #{irmRecordor,jdbcType=VARCHAR},
- IRM_Record_Time = #{irmRecordTime,jdbcType=TIMESTAMP},
- IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
- IRM_Operator = #{irmOperator,jdbcType=VARCHAR},
- IRM_IsDel = #{irmIsdel,jdbcType=INTEGER},
- IRM_FormerID = #{irmFormerid,jdbcType=INTEGER},
- IRM_Record = #{irmRecord,jdbcType=VARCHAR}
- where IRM_ID = #{irmId,jdbcType=INTEGER}
- </update>
- <select id="selectByMeasureTime" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_remark
- where IRM_IsDel=0
- <if test="patientNo != null">
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="measureTime != null">
- and IRM_Measure_Time = #{measureTime,jdbcType=TIMESTAMP}
- </if>
- limit 1
- </select>
- <select id="selectBySelective" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_remark
- where IRM_IsDel=0
- and PatientNo in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=VARCHAR}
- </foreach>
- and IRM_Measure_Time = #{measureTime,jdbcType=TIMESTAMP}
- </select>
- <select id="selectByPatientNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_remark
- where IRM_IsDel=0
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- </select>
- <update id="updateByirmId">
- update inp_remark
- set IRM_IsDel = -1,
- IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
- IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
- where IRM_ID = #{irmId,jdbcType=INTEGER}
- </update>
- <update id="updateByirmIds">
- update inp_remark
- set IRM_IsDel = -1,
- IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
- IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
- where IRM_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <select id="selectByPatientTime" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_remark
- where IRM_IsDel=0
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- and IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP}
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </select>
- <update id="batchDel">
- update inp_remark
- set IRM_IsDel = -1,
- IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
- IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
- where IRM_ID in
- <foreach collection="list" item="item" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|