123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <?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.PdaTransfusionMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.PdaTransfusion">
- <id column="PT_ID" jdbcType="INTEGER" property="ptId" />
- <result column="PT_PatientNo" jdbcType="VARCHAR" property="ptPatientno" />
- <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="PT_Operator" jdbcType="VARCHAR" property="ptOperator" />
- <result column="PT_OperateTime" jdbcType="TIMESTAMP" property="ptOperatetime" />
- <result column="PT_CheckMan" jdbcType="VARCHAR" property="ptCheckman" />
- <result column="PT_CheckTime" jdbcType="TIMESTAMP" property="ptChecktime" />
- <result column="PT_Executor" jdbcType="VARCHAR" property="ptExecutor" />
- <result column="PT_ExecuteTime" jdbcType="TIMESTAMP" property="ptExecutetime" />
- <result column="PT_BarCode" jdbcType="VARCHAR" property="ptBarcode" />
- <result column="PT_AdviceCode" jdbcType="VARCHAR" property="ptAdvicecode" />
- <result column="PT_Status" jdbcType="INTEGER" property="ptStatus" />
- <result column="PT_IsDel" jdbcType="INTEGER" property="ptIsdel" />
- <result column="PT_Version" jdbcType="INTEGER" property="ptVersion" />
- <result column="PT_Exception_Code" jdbcType="VARCHAR" property="ptExceptionCode" />
- <result column="PT_Exception" jdbcType="VARCHAR" property="ptException" />
- <result column="PT_Exception_Code2" jdbcType="VARCHAR" property="ptExceptionCode2" />
- <result column="PT_Exception2" jdbcType="VARCHAR" property="ptException2" />
- <result column="PT_Measure" jdbcType="VARCHAR" property="ptMeasure" />
- <result column="PT_Dose" jdbcType="DOUBLE" property="ptDose" />
- <result column="PT_DoseUnit" jdbcType="VARCHAR" property="ptDoseunit" />
- <result column="PT_Name" jdbcType="VARCHAR" property="ptName" />
- <result column="PT_Remark" jdbcType="VARCHAR" property="ptRemark" />
- <result column="chartNo" jdbcType="VARCHAR" property="chartNo" />
- <result column="patinetName" jdbcType="VARCHAR" property="patinetName" />
- </resultMap>
- <sql id="Base_Column_List">
- PT_ID, PT_PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, PT_Operator, PT_OperateTime,
- PT_CheckMan, PT_CheckTime, PT_Executor, PT_ExecuteTime, PT_BarCode, PT_AdviceCode,
- PT_Status, PT_IsDel, PT_Version, PT_Exception_Code, PT_Exception, PT_Exception_Code2,
- PT_Exception2, PT_Measure, PT_Dose, PT_DoseUnit, PT_Name, PT_Remark
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from pda_transfusion
- where PT_IsDel = 0 and PT_ID = #{ptId,jdbcType=INTEGER}
- </select>
- <select id="selectByBarCode" resultMap="BaseResultMap" >
- select
- <include refid="Base_Column_List" />
- from pda_transfusion
- where PT_BarCode = #{barCode,jdbcType=VARCHAR} AND PT_IsDel = 0 and PT_Version = 1 limit 1
- </select>
- <select id="selectBySelective" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select a.*,c.IP_Med_Rec chartNo, c.IP_Name patinetName
- from pda_transfusion a
- INNER JOIN inp_patient c on a.PT_PatientNo = c.IP_PatientNo
- where a.PT_IsDel = 0
- AND a.DW_WardDm = #{departNo} and a.PT_ExecuteTime >= #{execSTime} and a.PT_ExecuteTime <= #{execETime}
- <if test='beds!=null'> and DB_BedNo in <foreach item='item' index='index' collection='beds' open='(' separator=',' close=')'> #{item} </foreach></if>
- and c.IP_Status = #{inHospitalStatus}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from pda_transfusion
- where PT_ID = #{ptId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.PdaTransfusion">
- insert into pda_transfusion (PT_ID, PT_PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- PT_Operator, PT_OperateTime, PT_CheckMan,
- PT_CheckTime, PT_Executor, PT_ExecuteTime,
- PT_BarCode, PT_AdviceCode, PT_Status,
- PT_IsDel, PT_Version, PT_Exception_Code,
- PT_Exception, PT_Exception_Code2, PT_Exception2,
- PT_Measure, PT_Dose, PT_DoseUnit,
- PT_Name, PT_Remark)
- values (#{ptId,jdbcType=INTEGER}, #{ptPatientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{ptOperator,jdbcType=VARCHAR}, #{ptOperatetime,jdbcType=TIMESTAMP}, #{ptCheckman,jdbcType=VARCHAR},
- #{ptChecktime,jdbcType=TIMESTAMP}, #{ptExecutor,jdbcType=VARCHAR}, #{ptExecutetime,jdbcType=TIMESTAMP},
- #{ptBarcode,jdbcType=VARCHAR}, #{ptAdvicecode,jdbcType=VARCHAR}, #{ptStatus,jdbcType=INTEGER},
- #{ptIsdel,jdbcType=INTEGER}, #{ptVersion,jdbcType=INTEGER}, #{ptExceptionCode,jdbcType=VARCHAR},
- #{ptException,jdbcType=VARCHAR}, #{ptExceptionCode2,jdbcType=VARCHAR}, #{ptException2,jdbcType=VARCHAR},
- #{ptMeasure,jdbcType=VARCHAR}, #{ptDose,jdbcType=DOUBLE}, #{ptDoseunit,jdbcType=VARCHAR},
- #{ptName,jdbcType=VARCHAR}, #{ptRemark,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.PdaTransfusion">
- insert into pda_transfusion
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ptId != null">
- PT_ID,
- </if>
- <if test="ptPatientno != null">
- PT_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="ptOperator != null">
- PT_Operator,
- </if>
- <if test="ptOperatetime != null">
- PT_OperateTime,
- </if>
- <if test="ptCheckman != null">
- PT_CheckMan,
- </if>
- <if test="ptChecktime != null">
- PT_CheckTime,
- </if>
- <if test="ptExecutor != null">
- PT_Executor,
- </if>
- <if test="ptExecutetime != null">
- PT_ExecuteTime,
- </if>
- <if test="ptBarcode != null">
- PT_BarCode,
- </if>
- <if test="ptAdvicecode != null">
- PT_AdviceCode,
- </if>
- <if test="ptStatus != null">
- PT_Status,
- </if>
- <if test="ptIsdel != null">
- PT_IsDel,
- </if>
- <if test="ptVersion != null">
- PT_Version,
- </if>
- <if test="ptExceptionCode != null">
- PT_Exception_Code,
- </if>
- <if test="ptException != null">
- PT_Exception,
- </if>
- <if test="ptExceptionCode2 != null">
- PT_Exception_Code2,
- </if>
- <if test="ptException2 != null">
- PT_Exception2,
- </if>
- <if test="ptMeasure != null">
- PT_Measure,
- </if>
- <if test="ptDose != null">
- PT_Dose,
- </if>
- <if test="ptDoseunit != null">
- PT_DoseUnit,
- </if>
- <if test="ptName != null">
- PT_Name,
- </if>
- <if test="ptRemark != null">
- PT_Remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ptId != null">
- #{ptId,jdbcType=INTEGER},
- </if>
- <if test="ptPatientno != null">
- #{ptPatientno,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="ptOperator != null">
- #{ptOperator,jdbcType=VARCHAR},
- </if>
- <if test="ptOperatetime != null">
- #{ptOperatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptCheckman != null">
- #{ptCheckman,jdbcType=VARCHAR},
- </if>
- <if test="ptChecktime != null">
- #{ptChecktime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptExecutor != null">
- #{ptExecutor,jdbcType=VARCHAR},
- </if>
- <if test="ptExecutetime != null">
- #{ptExecutetime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptBarcode != null">
- #{ptBarcode,jdbcType=VARCHAR},
- </if>
- <if test="ptAdvicecode != null">
- #{ptAdvicecode,jdbcType=VARCHAR},
- </if>
- <if test="ptStatus != null">
- #{ptStatus,jdbcType=INTEGER},
- </if>
- <if test="ptIsdel != null">
- #{ptIsdel,jdbcType=INTEGER},
- </if>
- <if test="ptVersion != null">
- #{ptVersion,jdbcType=INTEGER},
- </if>
- <if test="ptExceptionCode != null">
- #{ptExceptionCode,jdbcType=VARCHAR},
- </if>
- <if test="ptException != null">
- #{ptException,jdbcType=VARCHAR},
- </if>
- <if test="ptExceptionCode2 != null">
- #{ptExceptionCode2,jdbcType=VARCHAR},
- </if>
- <if test="ptException2 != null">
- #{ptException2,jdbcType=VARCHAR},
- </if>
- <if test="ptMeasure != null">
- #{ptMeasure,jdbcType=VARCHAR},
- </if>
- <if test="ptDose != null">
- #{ptDose,jdbcType=DOUBLE},
- </if>
- <if test="ptDoseunit != null">
- #{ptDoseunit,jdbcType=VARCHAR},
- </if>
- <if test="ptName != null">
- #{ptName,jdbcType=VARCHAR},
- </if>
- <if test="ptRemark != null">
- #{ptRemark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.PdaTransfusion">
- update pda_transfusion
- <set>
- <if test="ptPatientno != null">
- PT_PatientNo = #{ptPatientno,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="ptOperator != null">
- PT_Operator = #{ptOperator,jdbcType=VARCHAR},
- </if>
- <if test="ptOperatetime != null">
- PT_OperateTime = #{ptOperatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptCheckman != null">
- PT_CheckMan = #{ptCheckman,jdbcType=VARCHAR},
- </if>
- <if test="ptChecktime != null">
- PT_CheckTime = #{ptChecktime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptExecutor != null">
- PT_Executor = #{ptExecutor,jdbcType=VARCHAR},
- </if>
- <if test="ptExecutetime != null">
- PT_ExecuteTime = #{ptExecutetime,jdbcType=TIMESTAMP},
- </if>
- <if test="ptBarcode != null">
- PT_BarCode = #{ptBarcode,jdbcType=VARCHAR},
- </if>
- <if test="ptAdvicecode != null">
- PT_AdviceCode = #{ptAdvicecode,jdbcType=VARCHAR},
- </if>
- <if test="ptStatus != null">
- PT_Status = #{ptStatus,jdbcType=INTEGER},
- </if>
- <if test="ptIsdel != null">
- PT_IsDel = #{ptIsdel,jdbcType=INTEGER},
- </if>
- <if test="ptVersion != null">
- PT_Version = #{ptVersion,jdbcType=INTEGER},
- </if>
- <if test="ptExceptionCode != null">
- PT_Exception_Code = #{ptExceptionCode,jdbcType=VARCHAR},
- </if>
- <if test="ptException != null">
- PT_Exception = #{ptException,jdbcType=VARCHAR},
- </if>
- <if test="ptExceptionCode2 != null">
- PT_Exception_Code2 = #{ptExceptionCode2,jdbcType=VARCHAR},
- </if>
- <if test="ptException2 != null">
- PT_Exception2 = #{ptException2,jdbcType=VARCHAR},
- </if>
- <if test="ptMeasure != null">
- PT_Measure = #{ptMeasure,jdbcType=VARCHAR},
- </if>
- <if test="ptDose != null">
- PT_Dose = #{ptDose,jdbcType=DOUBLE},
- </if>
- <if test="ptDoseunit != null">
- PT_DoseUnit = #{ptDoseunit,jdbcType=VARCHAR},
- </if>
- <if test="ptName != null">
- PT_Name = #{ptName,jdbcType=VARCHAR},
- </if>
- <if test="ptRemark != null">
- PT_Remark = #{ptRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where PT_ID = #{ptId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.PdaTransfusion">
- update pda_transfusion
- set PT_PatientNo = #{ptPatientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- PT_Operator = #{ptOperator,jdbcType=VARCHAR},
- PT_OperateTime = #{ptOperatetime,jdbcType=TIMESTAMP},
- PT_CheckMan = #{ptCheckman,jdbcType=VARCHAR},
- PT_CheckTime = #{ptChecktime,jdbcType=TIMESTAMP},
- PT_Executor = #{ptExecutor,jdbcType=VARCHAR},
- PT_ExecuteTime = #{ptExecutetime,jdbcType=TIMESTAMP},
- PT_BarCode = #{ptBarcode,jdbcType=VARCHAR},
- PT_AdviceCode = #{ptAdvicecode,jdbcType=VARCHAR},
- PT_Status = #{ptStatus,jdbcType=INTEGER},
- PT_IsDel = #{ptIsdel,jdbcType=INTEGER},
- PT_Version = #{ptVersion,jdbcType=INTEGER},
- PT_Exception_Code = #{ptExceptionCode,jdbcType=VARCHAR},
- PT_Exception = #{ptException,jdbcType=VARCHAR},
- PT_Exception_Code2 = #{ptExceptionCode2,jdbcType=VARCHAR},
- PT_Exception2 = #{ptException2,jdbcType=VARCHAR},
- PT_Measure = #{ptMeasure,jdbcType=VARCHAR},
- PT_Dose = #{ptDose,jdbcType=DOUBLE},
- PT_DoseUnit = #{ptDoseunit,jdbcType=VARCHAR},
- PT_Name = #{ptName,jdbcType=VARCHAR},
- PT_Remark = #{ptRemark,jdbcType=VARCHAR}
- where PT_ID = #{ptId,jdbcType=INTEGER}
- </update>
- </mapper>
|