123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- <?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.InpOpenRecordMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecord" >
- <id column="IOR_ID" property="iorId" 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="IOR_Measure_Time" property="iorMeasureTime" jdbcType="TIMESTAMP" />
- <result column="IOR_Recordor" property="iorRecordor" jdbcType="VARCHAR" />
- <result column="IOR_Record_Time" property="iorRecordTime" jdbcType="TIMESTAMP" />
- <result column="IOR_Level" property="iorLevel" jdbcType="INTEGER" />
- <result column="IOR_Operation_Time" property="iorOperationTime" jdbcType="TIMESTAMP" />
- <result column="IOR_Operator" property="iorOperator" jdbcType="VARCHAR" />
- <result column="IOR_IsDel" property="iorIsdel" jdbcType="INTEGER" />
- <result column="IOR_Remark" property="iorRemark" jdbcType="VARCHAR" />
- <result column="IOR_FormerID" property="iorFormerid" jdbcType="INTEGER" />
- <result column="IOR_IsPrint" property="iorIsprint" jdbcType="INTEGER" />
- <result column="IOR_Printer" property="iorPrinter" jdbcType="VARCHAR" />
- <result column="IOR_Out_Time" property="iorOutTime" jdbcType="TIMESTAMP" />
- <result column="IOR_Out_Operator" property="iorOutOperator" jdbcType="VARCHAR" />
- <result column="IOR_Back_Time" property="iorBackTime" jdbcType="TIMESTAMP" />
- <result column="IOR_Back_Operator" property="iorBackOperator" jdbcType="VARCHAR" />
- <result column="IOR_Cooperate" property="iorCooperate" jdbcType="VARCHAR" />
- </resultMap>
- <resultMap id="ResultMap" extends="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecordVo">
- <result column="iorOutOperatorName" property="iorOutOperatorName" jdbcType="VARCHAR" />
- <result column="iorBackOperatorName" property="iorBackOperatorName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IOR_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IOR_Measure_Time, IOR_Recordor,
- IOR_Record_Time, IOR_Level, IOR_Operation_Time, IOR_Operator, IOR_IsDel, IOR_Remark,
- IOR_FormerID, IOR_IsPrint, IOR_Printer, IOR_Out_Time, IOR_Out_Operator, IOR_Back_Time,
- IOR_Back_Operator, IOR_Cooperate
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_open_record
- where IOR_ID = #{iorId,jdbcType=INTEGER}
- </select>
- <select id="selectByPatient" resultMap="ResultMap">
- select <include refid="Base_Column_List"/>,
- (select UI_Name from sys_userinfo b where a.IOR_Out_Operator = b.UI_Code) iorOutOperatorName,
- (select UI_Name from sys_userinfo b where a.IOR_Back_Operator = b.UI_Code) iorBackOperatorName
- from inp_open_record a
- where a.PatientNo=#{patientNO,jdbcType=VARCHAR} and a.IOR_IsDel='0'
- and a.IOR_Measure_Time between #{startTime,jdbcType=TIMESTAMP} and #{endTime,jdbcType=TIMESTAMP} order by IOR_Measure_Time desc
- </select>
- <select id="selectByPatientPrint" resultMap="ResultMap">
- select <include refid="Base_Column_List"/>,
- (select UI_Name from sys_userinfo b where a.IOR_Out_Operator = b.UI_Code) iorOutOperatorName,
- (select UI_Name from sys_userinfo b where a.IOR_Back_Operator = b.UI_Code) iorBackOperatorName
- from inp_open_record a
- where a.PatientNo=#{patientNO,jdbcType=VARCHAR} and a.IOR_IsDel='0'
- and a.IOR_Measure_Time between #{startTime,jdbcType=TIMESTAMP} and #{endTime,jdbcType=TIMESTAMP} order by IOR_Measure_Time asc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_open_record
- where IOR_ID = #{iorId,jdbcType=INTEGER}
- </delete>
- <update id="delIroById">
- update inp_open_record set IOR_IsDel=-1,IOR_Operator=#{iorOperator,jdbcType=VARCHAR},
- IOR_Operation_Time =#{iorOperationTime,jdbcType=TIMESTAMP}
- where IOR_ID = #{iorId,jdbcType=INTEGER}
- </update>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecord" >
- insert into inp_open_record (IOR_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IOR_Measure_Time, IOR_Recordor, IOR_Record_Time,
- IOR_Level, IOR_Operation_Time, IOR_Operator,
- IOR_IsDel, IOR_Remark, IOR_FormerID,
- IOR_IsPrint, IOR_Printer, IOR_Out_Time,
- IOR_Out_Operator, IOR_Back_Time, IOR_Back_Operator,
- IOR_Cooperate)
- values (#{iorId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{iorMeasureTime,jdbcType=TIMESTAMP}, #{iorRecordor,jdbcType=VARCHAR}, #{iorRecordTime,jdbcType=TIMESTAMP},
- #{iorLevel,jdbcType=INTEGER}, #{iorOperationTime,jdbcType=TIMESTAMP}, #{iorOperator,jdbcType=VARCHAR},
- #{iorIsdel,jdbcType=INTEGER}, #{iorRemark,jdbcType=VARCHAR}, #{iorFormerid,jdbcType=INTEGER},
- #{iorIsprint,jdbcType=INTEGER}, #{iorPrinter,jdbcType=VARCHAR}, #{iorOutTime,jdbcType=TIMESTAMP},
- #{iorOutOperator,jdbcType=VARCHAR}, #{iorBackTime,jdbcType=TIMESTAMP}, #{iorBackOperator,jdbcType=VARCHAR},
- #{iorCooperate,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecord" >
- insert into inp_open_record
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="iorId != null" >
- IOR_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="iorMeasureTime != null" >
- IOR_Measure_Time,
- </if>
- <if test="iorRecordor != null" >
- IOR_Recordor,
- </if>
- <if test="iorRecordTime != null" >
- IOR_Record_Time,
- </if>
- <if test="iorLevel != null" >
- IOR_Level,
- </if>
- <if test="iorOperationTime != null" >
- IOR_Operation_Time,
- </if>
- <if test="iorOperator != null" >
- IOR_Operator,
- </if>
- <if test="iorIsdel != null" >
- IOR_IsDel,
- </if>
- <if test="iorRemark != null" >
- IOR_Remark,
- </if>
- <if test="iorFormerid != null" >
- IOR_FormerID,
- </if>
- <if test="iorIsprint != null" >
- IOR_IsPrint,
- </if>
- <if test="iorPrinter != null" >
- IOR_Printer,
- </if>
- <if test="iorOutTime != null" >
- IOR_Out_Time,
- </if>
- <if test="iorOutOperator != null" >
- IOR_Out_Operator,
- </if>
- <if test="iorBackTime != null" >
- IOR_Back_Time,
- </if>
- <if test="iorBackOperator != null" >
- IOR_Back_Operator,
- </if>
- <if test="iorCooperate != null" >
- IOR_Cooperate,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="iorId != null" >
- #{iorId,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="iorMeasureTime != null" >
- #{iorMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorRecordor != null" >
- #{iorRecordor,jdbcType=VARCHAR},
- </if>
- <if test="iorRecordTime != null" >
- #{iorRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorLevel != null" >
- #{iorLevel,jdbcType=INTEGER},
- </if>
- <if test="iorOperationTime != null" >
- #{iorOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorOperator != null" >
- #{iorOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorIsdel != null" >
- #{iorIsdel,jdbcType=INTEGER},
- </if>
- <if test="iorRemark != null" >
- #{iorRemark,jdbcType=VARCHAR},
- </if>
- <if test="iorFormerid != null" >
- #{iorFormerid,jdbcType=INTEGER},
- </if>
- <if test="iorIsprint != null" >
- #{iorIsprint,jdbcType=INTEGER},
- </if>
- <if test="iorPrinter != null" >
- #{iorPrinter,jdbcType=VARCHAR},
- </if>
- <if test="iorOutTime != null" >
- #{iorOutTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorOutOperator != null" >
- #{iorOutOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorBackTime != null" >
- #{iorBackTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorBackOperator != null" >
- #{iorBackOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorCooperate != null" >
- #{iorCooperate,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecord" >
- update inp_open_record
- <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="iorMeasureTime != null" >
- IOR_Measure_Time = #{iorMeasureTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorRecordor != null" >
- IOR_Recordor = #{iorRecordor,jdbcType=VARCHAR},
- </if>
- <if test="iorRecordTime != null" >
- IOR_Record_Time = #{iorRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorLevel != null" >
- IOR_Level = #{iorLevel,jdbcType=INTEGER},
- </if>
- <if test="iorOperationTime != null" >
- IOR_Operation_Time = #{iorOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorOperator != null" >
- IOR_Operator = #{iorOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorIsdel != null" >
- IOR_IsDel = #{iorIsdel,jdbcType=INTEGER},
- </if>
- <if test="iorRemark != null" >
- IOR_Remark = #{iorRemark,jdbcType=VARCHAR},
- </if>
- <if test="iorFormerid != null" >
- IOR_FormerID = #{iorFormerid,jdbcType=INTEGER},
- </if>
- <if test="iorIsprint != null" >
- IOR_IsPrint = #{iorIsprint,jdbcType=INTEGER},
- </if>
- <if test="iorPrinter != null" >
- IOR_Printer = #{iorPrinter,jdbcType=VARCHAR},
- </if>
- <if test="iorOutTime != null" >
- IOR_Out_Time = #{iorOutTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorOutOperator != null" >
- IOR_Out_Operator = #{iorOutOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorBackTime != null" >
- IOR_Back_Time = #{iorBackTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iorBackOperator != null" >
- IOR_Back_Operator = #{iorBackOperator,jdbcType=VARCHAR},
- </if>
- <if test="iorCooperate != null" >
- IOR_Cooperate = #{iorCooperate,jdbcType=VARCHAR},
- </if>
- </set>
- where IOR_ID = #{iorId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpOpenRecord" >
- update inp_open_record
- 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},
- IOR_Measure_Time = #{iorMeasureTime,jdbcType=TIMESTAMP},
- IOR_Recordor = #{iorRecordor,jdbcType=VARCHAR},
- IOR_Record_Time = #{iorRecordTime,jdbcType=TIMESTAMP},
- IOR_Level = #{iorLevel,jdbcType=INTEGER},
- IOR_Operation_Time = #{iorOperationTime,jdbcType=TIMESTAMP},
- IOR_Operator = #{iorOperator,jdbcType=VARCHAR},
- IOR_IsDel = #{iorIsdel,jdbcType=INTEGER},
- IOR_Remark = #{iorRemark,jdbcType=VARCHAR},
- IOR_FormerID = #{iorFormerid,jdbcType=INTEGER},
- IOR_IsPrint = #{iorIsprint,jdbcType=INTEGER},
- IOR_Printer = #{iorPrinter,jdbcType=VARCHAR},
- IOR_Out_Time = #{iorOutTime,jdbcType=TIMESTAMP},
- IOR_Out_Operator = #{iorOutOperator,jdbcType=VARCHAR},
- IOR_Back_Time = #{iorBackTime,jdbcType=TIMESTAMP},
- IOR_Back_Operator = #{iorBackOperator,jdbcType=VARCHAR},
- IOR_Cooperate = #{iorCooperate,jdbcType=VARCHAR}
- where IOR_ID = #{iorId,jdbcType=INTEGER}
- </update>
- </mapper>
|