123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- <?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.InpBedShiftMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- <id column="IBS_ID" property="ibsId" 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="IBS_Shift" property="ibsShift" jdbcType="VARCHAR" />
- <result column="IBS_Time" property="ibsTime" jdbcType="TIMESTAMP" />
- <result column="IBS_Hander" property="ibsHander" jdbcType="VARCHAR" />
- <result column="IBS_Record_Time" property="ibsRecordTime" jdbcType="TIMESTAMP" />
- <result column="IBS_Hand_WardDm" property="ibsHandWarddm" jdbcType="VARCHAR" />
- <result column="IBS_Type" property="ibsType" jdbcType="INTEGER" />
- <result column="IBS_Receive_Shift" property="ibsReceiveShift" jdbcType="VARCHAR" />
- <result column="IBS_Receive_Time" property="ibsReceiveTime" jdbcType="TIMESTAMP" />
- <result column="IBS_Receiver" property="ibsReceiver" jdbcType="VARCHAR" />
- <result column="IBS_Status" property="ibsStatus" jdbcType="INTEGER" />
- <result column="IBS_Recordor" property="ibsRecordor" jdbcType="VARCHAR" />
- <result column="IBS_IsDel" property="ibsIsdel" jdbcType="INTEGER" />
- <result column="IBS_Operation_Time" property="ibsOperationTime" jdbcType="TIMESTAMP" />
- <result column="IBS_Operator" property="ibsOperator" jdbcType="VARCHAR" />
- </resultMap>
- <resultMap id="ResultMapWithBLOBs" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" extends="BaseResultMap" >
- <result column="IBS_Content" property="ibsContent" jdbcType="LONGVARCHAR" />
- <result column="IBS_Remark" property="ibsRemark" jdbcType="LONGVARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IBS_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IBS_Shift, IBS_Time, IBS_Hander,
- IBS_Record_Time, IBS_Hand_WardDm, IBS_Type, IBS_Receive_Shift, IBS_Receive_Time,
- IBS_Receiver, IBS_Status, IBS_Recordor, IBS_IsDel, IBS_Operation_Time, IBS_Operator
- </sql>
- <sql id="Blob_Column_List" >
- IBS_Content,IBS_Remark
- </sql>
- <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from inp_bed_shift
- where IBS_IsDel = 0 and IBS_ID = #{ibsId,jdbcType=INTEGER}
- </select>
- <select id="selectByPatientNo" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from inp_bed_shift
- where IBS_IsDel = 0 and PatientNo = #{PatientNo,jdbcType=VARCHAR}
- order by IBS_ID desc
- </select>
- <select id="selectByBedShift" resultMap="ResultMapWithBLOBs" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from inp_bed_shift
- where IBS_IsDel = 0
- <if test="hiId != null" >
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="dwWarddm != null" >
- and DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
- </if>
- <if test="beginTime != null" >
- and IBS_Time <![CDATA[>=]]> #{beginTime}
- </if>
- <if test="endTime != null" >
- and IBS_Time <![CDATA[<=]]> #{endTime}
- </if>
- order by IBS_Time desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_bed_shift
- where IBS_ID = #{ibsId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- insert into inp_bed_shift (IBS_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IBS_Shift, IBS_Time, IBS_Hander,
- IBS_Record_Time, IBS_Hand_WardDm, IBS_Type,
- IBS_Receive_Shift, IBS_Receive_Time, IBS_Receiver,
- IBS_Status, IBS_Recordor, IBS_IsDel,
- IBS_Operation_Time, IBS_Operator, IBS_Content,IBS_Remark
- )
- values (#{ibsId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{ibsShift,jdbcType=VARCHAR}, #{ibsTime,jdbcType=TIMESTAMP}, #{ibsHander,jdbcType=VARCHAR},
- #{ibsRecordTime,jdbcType=TIMESTAMP}, #{ibsHandWarddm,jdbcType=VARCHAR}, #{ibsType,jdbcType=INTEGER},
- #{ibsReceiveShift,jdbcType=VARCHAR}, #{ibsReceiveTime,jdbcType=TIMESTAMP}, #{ibsReceiver,jdbcType=VARCHAR},
- #{ibsStatus,jdbcType=INTEGER}, #{ibsRecordor,jdbcType=VARCHAR}, #{ibsIsdel,jdbcType=INTEGER},
- #{ibsOperationTime,jdbcType=TIMESTAMP}, #{ibsOperator,jdbcType=VARCHAR}, #{ibsContent,jdbcType=LONGVARCHAR},#{ibsRemark,jdbcType=LONGVARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- insert into inp_bed_shift
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ibsId != null" >
- IBS_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="ibsShift != null" >
- IBS_Shift,
- </if>
- <if test="ibsTime != null" >
- IBS_Time,
- </if>
- <if test="ibsHander != null" >
- IBS_Hander,
- </if>
- IBS_Record_Time,
- <if test="ibsHandWarddm != null" >
- IBS_Hand_WardDm,
- </if>
- <if test="ibsType != null" >
- IBS_Type,
- </if>
- <if test="ibsReceiveShift != null" >
- IBS_Receive_Shift,
- </if>
- <if test="ibsReceiveTime != null" >
- IBS_Receive_Time,
- </if>
- <if test="ibsReceiver != null" >
- IBS_Receiver,
- </if>
- <if test="ibsStatus != null" >
- IBS_Status,
- </if>
- <if test="ibsRecordor != null" >
- IBS_Recordor,
- </if>
- <if test="ibsIsdel != null" >
- IBS_IsDel,
- </if>
- IBS_Operation_Time,
- <if test="ibsOperator != null" >
- IBS_Operator,
- </if>
- <if test="ibsContent != null" >
- IBS_Content,
- </if>
- <if test="ibsRemark != null" >
- IBS_Remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ibsId != null" >
- #{ibsId,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="ibsShift != null" >
- #{ibsShift,jdbcType=VARCHAR},
- </if>
- <if test="ibsTime != null" >
- #{ibsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsHander != null" >
- #{ibsHander,jdbcType=VARCHAR},
- </if>
- now(),
- <if test="ibsHandWarddm != null" >
- #{ibsHandWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ibsType != null" >
- #{ibsType,jdbcType=INTEGER},
- </if>
- <if test="ibsReceiveShift != null" >
- #{ibsReceiveShift,jdbcType=VARCHAR},
- </if>
- <if test="ibsReceiveTime != null" >
- #{ibsReceiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsReceiver != null" >
- #{ibsReceiver,jdbcType=VARCHAR},
- </if>
- <if test="ibsStatus != null" >
- #{ibsStatus,jdbcType=INTEGER},
- </if>
- <if test="ibsRecordor != null" >
- #{ibsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ibsIsdel != null" >
- #{ibsIsdel,jdbcType=INTEGER},
- </if>
- now(),
- <if test="ibsOperator != null" >
- #{ibsOperator,jdbcType=VARCHAR},
- </if>
- <if test="ibsContent != null" >
- #{ibsContent,jdbcType=LONGVARCHAR},
- </if>
- <if test="ibsRemark != null" >
- #{ibsRemark,jdbcType=LONGVARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- update inp_bed_shift
- <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="ibsShift != null" >
- IBS_Shift = #{ibsShift,jdbcType=VARCHAR},
- </if>
- <if test="ibsTime != null" >
- IBS_Time = #{ibsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsHander != null" >
- IBS_Hander = #{ibsHander,jdbcType=VARCHAR},
- </if>
- <if test="ibsRecordTime != null" >
- IBS_Record_Time = #{ibsRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsHandWarddm != null" >
- IBS_Hand_WardDm = #{ibsHandWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ibsType != null" >
- IBS_Type = #{ibsType,jdbcType=INTEGER},
- </if>
- <if test="ibsReceiveShift != null" >
- IBS_Receive_Shift = #{ibsReceiveShift,jdbcType=VARCHAR},
- </if>
- <if test="ibsReceiveTime != null" >
- IBS_Receive_Time = #{ibsReceiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsReceiver != null" >
- IBS_Receiver = #{ibsReceiver,jdbcType=VARCHAR},
- </if>
- <if test="ibsStatus != null" >
- IBS_Status = #{ibsStatus,jdbcType=INTEGER},
- </if>
- <if test="ibsRecordor != null" >
- IBS_Recordor = #{ibsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ibsIsdel != null" >
- IBS_IsDel = #{ibsIsdel,jdbcType=INTEGER},
- </if>
- <if test="ibsOperationTime != null" >
- IBS_Operation_Time = #{ibsOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ibsOperator != null" >
- IBS_Operator = #{ibsOperator,jdbcType=VARCHAR},
- </if>
- <if test="ibsContent != null" >
- IBS_Content = #{ibsContent,jdbcType=LONGVARCHAR},
- </if>
- <if test="ibsRemark != null" >
- IBS_Remark = #{ibsRemark,jdbcType=LONGVARCHAR},
- </if>
- </set>
- where IBS_ID = #{ibsId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- update inp_bed_shift
- 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},
- IBS_Shift = #{ibsShift,jdbcType=VARCHAR},
- IBS_Time = #{ibsTime,jdbcType=TIMESTAMP},
- IBS_Hander = #{ibsHander,jdbcType=VARCHAR},
- IBS_Record_Time = #{ibsRecordTime,jdbcType=TIMESTAMP},
- IBS_Hand_WardDm = #{ibsHandWarddm,jdbcType=VARCHAR},
- IBS_Type = #{ibsType,jdbcType=INTEGER},
- IBS_Receive_Shift = #{ibsReceiveShift,jdbcType=VARCHAR},
- IBS_Receive_Time = #{ibsReceiveTime,jdbcType=TIMESTAMP},
- IBS_Receiver = #{ibsReceiver,jdbcType=VARCHAR},
- IBS_Status = #{ibsStatus,jdbcType=INTEGER},
- IBS_Recordor = #{ibsRecordor,jdbcType=VARCHAR},
- IBS_IsDel = #{ibsIsdel,jdbcType=INTEGER},
- IBS_Operation_Time = #{ibsOperationTime,jdbcType=TIMESTAMP},
- IBS_Operator = #{ibsOperator,jdbcType=VARCHAR},
- IBS_Content = #{ibsContent,jdbcType=LONGVARCHAR},
- IBS_Remark = #{ibsRemark,jdbcType=LONGVARCHAR}
- where IBS_ID = #{ibsId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBedShift" >
- update inp_bed_shift
- 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},
- IBS_Shift = #{ibsShift,jdbcType=VARCHAR},
- IBS_Time = #{ibsTime,jdbcType=TIMESTAMP},
- IBS_Hander = #{ibsHander,jdbcType=VARCHAR},
- IBS_Record_Time = #{ibsRecordTime,jdbcType=TIMESTAMP},
- IBS_Hand_WardDm = #{ibsHandWarddm,jdbcType=VARCHAR},
- IBS_Type = #{ibsType,jdbcType=INTEGER},
- IBS_Receive_Shift = #{ibsReceiveShift,jdbcType=VARCHAR},
- IBS_Receive_Time = #{ibsReceiveTime,jdbcType=TIMESTAMP},
- IBS_Receiver = #{ibsReceiver,jdbcType=VARCHAR},
- IBS_Status = #{ibsStatus,jdbcType=INTEGER},
- IBS_Recordor = #{ibsRecordor,jdbcType=VARCHAR},
- IBS_IsDel = #{ibsIsdel,jdbcType=INTEGER},
- IBS_Operation_Time = #{ibsOperationTime,jdbcType=TIMESTAMP},
- IBS_Operator = #{ibsOperator,jdbcType=VARCHAR},
- IBS_Remark = #{ibsRemark,jdbcType=VARCHAR}
- where IBS_ID = #{ibsId,jdbcType=INTEGER}
- </update>
- <update id="updateStatusBatch" parameterType="List" >
- update inp_bed_shift
- set IBS_IsDel = -1
- where IBS_ID in
- <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|