123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- <?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.InpIoMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIo" >
- <id column="IIO_ID" property="iioId" 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="IIO_Measure_Time" property="iioMeasureTime" jdbcType="TIMESTAMP" />
- <result column="IIO_Recordor" property="iioRecordor" jdbcType="VARCHAR" />
- <result column="IIO_Record_Time" property="iioRecordTime" jdbcType="TIMESTAMP" />
- <result column="IIO_Source" property="iioSource" jdbcType="INTEGER" />
- <result column="IC_ID" property="icId" jdbcType="INTEGER" />
- <result column="DIO_ID" property="dioId" jdbcType="INTEGER" />
- <result column="IIO_Type" property="iioType" jdbcType="INTEGER" />
- <result column="IIO_Amount" property="iioAmount" jdbcType="VARCHAR" />
- <result column="IIO_Unit" property="iioUnit" jdbcType="VARCHAR" />
- <result column="IIO_Nurse_Record" property="iioNurseRecord" jdbcType="VARCHAR" />
- <result column="IIO_IsRecord" property="iioIsrecord" jdbcType="INTEGER" />
- <result column="IIO_Operation_Time" property="iioOperationTime" jdbcType="TIMESTAMP" />
- <result column="IIO_Operator" property="iioOperator" jdbcType="VARCHAR" />
- <result column="IIO_IsDel" property="iioIsdel" jdbcType="INTEGER" />
- <result column="IIO_FormerID" property="iioFormerid" jdbcType="INTEGER" />
- <result column="IIO_AdviceCode" property="iioAdviceCode" jdbcType="VARCHAR" />
- <result column="IIO_Advice" property="iioAdvice" jdbcType="VARCHAR" />
- <result column="IIO_Original" property="iioOriginal" jdbcType="VARCHAR" />
- <result column="IIO_Original_ID" property="iioOriginalId" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IIO_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IIO_Measure_Time, IIO_Recordor,
- IIO_Record_Time, IIO_Source, IC_ID, DIO_ID, IIO_Type, IIO_Amount, IIO_Unit, IIO_Nurse_Record,
- IIO_IsRecord, IIO_Operation_Time, IIO_Operator, IIO_IsDel, IIO_FormerID, IIO_AdviceCode, IIO_Advice,
- IIO_Original,IIO_Original_ID
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0 and IIO_ID = #{iioId,jdbcType=INTEGER}
- </select>
- <select id="selectBatchList" resultMap="BaseResultMap" parameterType="List" >
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0 and IIO_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectSearchRecordTime" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpIOSearchRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="createTime != null">
- AND IIO_Measure_Time <![CDATA[>=]]> #{createTime}
- </if>
- <if test="endTime != null">
- AND IIO_Measure_Time <![CDATA[<=]]>#{endTime}
- </if>
- <if test="hiId != null">
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="irRecorder != null">
- AND IIO_Recordor = #{irRecorder,jdbcType=VARCHAR}
- </if>
- ORDER BY IIO_Record_Time DESC
- </select>
- <select id="selectSearchMeasureTime" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpIoSearchMeasurRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0
- <if test="type != null" >
- AND IIO_Type = #{type,jdbcType=INTEGER}
- </if>
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="dioId != null" >
- AND DIO_ID = #{dioId,jdbcType=INTEGER}
- </if>
- <if test="createTime != null">
- AND IIO_Measure_Time <![CDATA[>=]]> #{createTime}
- </if>
- <if test="endTime != null">
- AND IIO_Measure_Time <![CDATA[<]]>#{endTime}
- </if>
- <if test="hiId != null">
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_io
- where IIO_ID = #{iioId,jdbcType=INTEGER}
- </delete>
- <insert id="batchInsert" parameterType="List" useGeneratedKeys="true" keyColumn="IIO_ID" keyProperty="iioId">
- insert into inp_io
- (PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IIO_Measure_Time, IIO_Recordor, IIO_Record_Time, IIO_Source,
- IC_ID, DIO_ID, IIO_Type, IIO_Amount, IIO_Unit, IIO_Nurse_Record, IIO_IsRecord, IIO_Operation_Time, IIO_Operator, IIO_FormerID,
- IIO_Original, IIO_Original_ID)
- VALUES
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.patientno,jdbcType=VARCHAR},#{item.hiId,jdbcType=INTEGER},
- #{item.ddDepdm,jdbcType=VARCHAR},#{item.dwWarddm,jdbcType=VARCHAR},#{item.dbBedno,jdbcType=VARCHAR},
- #{item.iioMeasureTime,jdbcType=TIMESTAMP},#{item.iioRecordor,jdbcType=VARCHAR},now(),#{item.iioSource,jdbcType=INTEGER},
- #{item.icId,jdbcType=INTEGER},#{item.dioId,jdbcType=INTEGER},#{item.iioType,jdbcType=INTEGER},#{item.iioAmount,jdbcType=VARCHAR},
- #{item.iioUnit,jdbcType=VARCHAR},#{item.iioNurseRecord,jdbcType=VARCHAR},#{item.iioIsrecord,jdbcType=INTEGER}, now(),
- #{item.iioOperator,jdbcType=VARCHAR},
- #{item.iioFormerid,jdbcType=INTEGER},#{item.iioOriginal,jdbcType=VARCHAR},#{item.iioOriginalId,jdbcType=INTEGER})
- </foreach>
- </insert>
- <insert id="insertSelective" useGeneratedKeys="true" keyProperty="iioId" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIo" >
- insert into inp_io
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="iioId != null" >
- IIO_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="iioMeasureTime != null" >
- IIO_Measure_Time,
- </if>
- <if test="iioRecordor != null" >
- IIO_Recordor,
- </if>
- IIO_Record_Time,
- <if test="iioSource != null" >
- IIO_Source,
- </if>
- <if test="icId != null" >
- IC_ID,
- </if>
- <if test="dioId != null" >
- DIO_ID,
- </if>
- <if test="iioType != null" >
- IIO_Type,
- </if>
- <if test="iioAmount != null" >
- IIO_Amount,
- </if>
- <if test="iioUnit != null" >
- IIO_Unit,
- </if>
- <if test="iioNurseRecord != null" >
- IIO_Nurse_Record,
- </if>
- <if test="iioIsrecord != null" >
- IIO_IsRecord,
- </if>
- <if test="iioOperationTime != null" >
- IIO_Operation_Time,
- </if>
- <if test="iioOperator != null" >
- IIO_Operator,
- </if>
- <if test="iioIsdel != null" >
- IIO_IsDel,
- </if>
- <if test="iioFormerid != null" >
- IIO_FormerID,
- </if>
- <if test="iioAdviceCode != null" >
- IIO_AdviceCode,
- </if>
- <if test="iioAdvice != null" >
- IIO_Advice,
- </if>
- <if test="iioOriginal != null" >
- IIO_Original,
- </if>
- <if test="iioOriginalId != null" >
- IIO_Original_ID,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="iioId != null" >
- #{iioId,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="iioMeasureTime != null" >
- #{iioMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iioRecordor != null" >
- #{iioRecordor,jdbcType=VARCHAR},
- </if>
- now(),
- <if test="iioSource != null" >
- #{iioSource,jdbcType=INTEGER},
- </if>
- <if test="icId != null" >
- #{icId,jdbcType=INTEGER},
- </if>
- <if test="dioId != null" >
- #{dioId,jdbcType=INTEGER},
- </if>
- <if test="iioType != null" >
- #{iioType,jdbcType=INTEGER},
- </if>
- <if test="iioAmount != null" >
- #{iioAmount,jdbcType=VARCHAR},
- </if>
- <if test="iioUnit != null" >
- #{iioUnit,jdbcType=VARCHAR},
- </if>
- <if test="iioNurseRecord != null" >
- #{iioNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="iioIsrecord != null" >
- #{iioIsrecord,jdbcType=INTEGER},
- </if>
- <if test="iioOperationTime != null" >
- #{iioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iioOperator != null" >
- #{iioOperator,jdbcType=VARCHAR},
- </if>
- <if test="iioIsdel != null" >
- #{iioIsdel,jdbcType=INTEGER},
- </if>
- <if test="iioFormerid != null" >
- #{iioFormerid,jdbcType=INTEGER},
- </if>
- <if test="iioAdviceCode != null" >
- #{iioAdviceCode,jdbcType=VARCHAR},
- </if>
- <if test="iioAdvice != null" >
- #{iioAdvice,jdbcType=VARCHAR},
- </if>
- <if test="iioOriginal != null" >
- #{iioOriginal,jdbcType=VARCHAR},
- </if>
- <if test="iioOriginalId != null" >
- #{iioOriginalId,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIo" >
- update inp_io
- <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="iioMeasureTime != null" >
- IIO_Measure_Time = #{iioMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iioRecordor != null" >
- IIO_Recordor = #{iioRecordor,jdbcType=VARCHAR},
- </if>
- <if test="iioRecordTime != null" >
- IIO_Record_Time = #{iioRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iioSource != null" >
- IIO_Source = #{iioSource,jdbcType=INTEGER},
- </if>
- <if test="icId != null" >
- IC_ID = #{icId,jdbcType=INTEGER},
- </if>
- <if test="dioId != null" >
- DIO_ID = #{dioId,jdbcType=INTEGER},
- </if>
- <if test="iioType != null" >
- IIO_Type = #{iioType,jdbcType=INTEGER},
- </if>
- <if test="iioAmount != null" >
- IIO_Amount = #{iioAmount,jdbcType=VARCHAR},
- </if>
- <if test="iioUnit != null" >
- IIO_Unit = #{iioUnit,jdbcType=VARCHAR},
- </if>
- <if test="iioNurseRecord != null" >
- IIO_Nurse_Record = #{iioNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="iioIsrecord != null" >
- IIO_IsRecord = #{iioIsrecord,jdbcType=INTEGER},
- </if>
- <if test="iioOperationTime != null" >
- IIO_Operation_Time = #{iioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iioOperator != null" >
- IIO_Operator = #{iioOperator,jdbcType=VARCHAR},
- </if>
- <if test="iioIsdel != null" >
- IIO_IsDel = #{iioIsdel,jdbcType=INTEGER},
- </if>
- <if test="iioFormerid != null" >
- IIO_FormerID = #{iioFormerid,jdbcType=INTEGER},
- </if>
- <if test="iioAdviceCode != null" >
- IIO_AdviceCode = #{iioAdviceCode,jdbcType=VARCHAR},
- </if>
- <if test="iioAdvice != null" >
- IIO_Advice = #{iioAdvice,jdbcType=VARCHAR},
- </if>
- <if test="iioOriginal != null" >
- IIO_Original = #{iioOriginal,jdbcType=VARCHAR},
- </if>
- <if test="iioOriginalId != null" >
- IIO_Original_ID = #{iioOriginalId,jdbcType=INTEGER},
- </if>
- </set>
- where IIO_ID = #{iioId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatus" parameterType="java.lang.Integer" >
- update inp_io
- set IIO_IsDel = -1
- where IIO_ID = #{iioId,jdbcType=INTEGER}
- </update>
- <update id="updateBatchStatus" parameterType="List" >
- update inp_io
- set IIO_IsDel = -1
- where IIO_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateRecordStatus" parameterType="com.xinxin.topro.inpnurseservice.vo.InpRecordOriginalVo" >
- update inp_io
- set IIO_IsDel = -1
- where
- <if test="source != null" >
- IIO_Source = #{source,jdbcType=INTEGER}
- </if>
- <if test="originalId != null" >
- AND IIO_Original_ID = #{originalId,jdbcType=INTEGER}
- </if>
- <if test="original != null" >
- AND IIO_Original = #{original,jdbcType=VARCHAR}
- </if>
- </update>
- <select id="selectByMeasureTime" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.vo.InpIoSelectByDataRangeVo" >
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="createTime != null">
- AND IIO_Measure_Time <![CDATA[>=]]> #{createTime,jdbcType=TIMESTAMP}
- </if>
- <if test="endTime != null">
- AND IIO_Measure_Time <![CDATA[<=]]>#{endTime,jdbcType=TIMESTAMP}
- </if>
- <if test="dwWarddm != null">
- AND DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectSoureRecore" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.vo.InpRecordOriginalVo">
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0
- <if test="source != null" >
- AND IIO_Source = #{source,jdbcType=INTEGER}
- </if>
- <if test="originalId != null" >
- AND IIO_Original_ID = #{originalId,jdbcType=INTEGER}
- </if>
- <if test="original != null" >
- AND IIO_Original = #{original,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectFirstData" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_io
- where IIO_IsDel = 0
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- ORDER BY IIO_Measure_Time
- LIMIT 1
- </select>
- </mapper>
|