123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <?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.InpIcuSyncPatientMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIcuSyncPatient" >
- <id column="isp_id" property="ispId" jdbcType="INTEGER" />
- <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="isp_recorder" property="ispRecorder" jdbcType="VARCHAR" />
- <result column="isp_record_time" property="ispRecordTime" jdbcType="TIMESTAMP" />
- <result column="isp_operator" property="ispOperator" jdbcType="VARCHAR" />
- <result column="isp_operate_time" property="ispOperateTime" jdbcType="TIMESTAMP" />
- <result column="isp_is_del" property="ispIsDel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- isp_id, PatientNo, HI_ID, isp_recorder, isp_record_time, isp_operator, isp_operate_time,
- isp_is_del
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_icu_sync_patient
- where isp_id = #{ispId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_icu_sync_patient
- where isp_id = #{ispId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIcuSyncPatient" >
- insert into inp_icu_sync_patient (PatientNo, HI_ID,
- isp_recorder, isp_record_time, isp_operator,
- isp_operate_time, isp_is_del)
- values (#{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ispRecorder,jdbcType=VARCHAR}, #{ispRecordTime,jdbcType=TIMESTAMP}, #{ispOperator,jdbcType=VARCHAR},
- now(), 0)
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIcuSyncPatient" >
- insert into inp_icu_sync_patient
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ispId != null" >
- isp_id,
- </if>
- <if test="patientno != null" >
- PatientNo,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ispRecorder != null" >
- isp_recorder,
- </if>
- <if test="ispRecordTime != null" >
- isp_record_time,
- </if>
- <if test="ispOperator != null" >
- isp_operator,
- </if>
- <if test="ispOperateTime != null" >
- isp_operate_time,
- </if>
- <if test="ispIsDel != null" >
- isp_is_del,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ispId != null" >
- #{ispId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null" >
- #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ispRecorder != null" >
- #{ispRecorder,jdbcType=VARCHAR},
- </if>
- <if test="ispRecordTime != null" >
- #{ispRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ispOperator != null" >
- #{ispOperator,jdbcType=VARCHAR},
- </if>
- <if test="ispOperateTime != null" >
- #{ispOperateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ispIsDel != null" >
- #{ispIsDel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIcuSyncPatient" >
- update inp_icu_sync_patient
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ispRecorder != null" >
- isp_recorder = #{ispRecorder,jdbcType=VARCHAR},
- </if>
- <if test="ispRecordTime != null" >
- isp_record_time = #{ispRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ispOperator != null" >
- isp_operator = #{ispOperator,jdbcType=VARCHAR},
- </if>
- <if test="ispOperateTime != null" >
- isp_operate_time = #{ispOperateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ispIsDel != null" >
- isp_is_del = #{ispIsDel,jdbcType=INTEGER},
- </if>
- </set>
- where isp_id = #{ispId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIcuSyncPatient" >
- update inp_icu_sync_patient
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- isp_recorder = #{ispRecorder,jdbcType=VARCHAR},
- isp_record_time = #{ispRecordTime,jdbcType=TIMESTAMP},
- isp_operator = #{ispOperator,jdbcType=VARCHAR},
- isp_operate_time = #{ispOperateTime,jdbcType=TIMESTAMP},
- isp_is_del = #{ispIsDel,jdbcType=INTEGER}
- where isp_id = #{ispId,jdbcType=INTEGER}
- </update>
- <select id="selectByPatient" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/>
- from inp_icu_sync_patient
- where PatientNo = #{patientNo,jdbcType=VARCHAR}
- and isp_is_del = 0
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </select>
- <update id="batchDel">
- update inp_icu_sync_patient
- set isp_is_del = -1,
- isp_operator = #{ispOperator,jdbcType=VARCHAR},
- isp_operate_time = now()
- where
- isp_id in
- <foreach collection="list" separator="," open="(" close=")" item="item">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|