123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <?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.InpFormPrintMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
- <id column="IFP_ID" property="ifpId" jdbcType="INTEGER" />
- <result column="DFT_ID" property="dftId" 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="IFP_Print_Time" property="ifpPrintTime" jdbcType="TIMESTAMP" />
- <result column="IFP_Printer" property="ifpPrinter" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IFP_ID, DFT_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IFP_Print_Time,
- IFP_Printer
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_form_print
- where IFP_ID = #{ifpId,jdbcType=INTEGER}
- </select>
- <select id="selectByDFTID" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_form_print
- where DFT_ID = #{dftId,jdbcType=INTEGER} and PatientNo = #{patientNo,jdbcType=VARCHAR}
- ORDER BY IFP_Print_Time DESC
- </select>
- <select id="selectByPatientNo" resultMap="BaseResultMap" parameterType="java.lang.String">
- select
- <include refid="Base_Column_List" />
- from inp_form_print
- where PatientNo = #{patientNo,jdbcType=VARCHAR}
- ORDER BY IFP_Print_Time DESC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_form_print
- where IFP_ID = #{ifpId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
- insert into inp_form_print (IFP_ID, DFT_ID, PatientNo,
- HI_ID, DD_DepDm, DW_WardDm,
- DB_BedNo, IFP_Print_Time, IFP_Printer
- )
- values (#{ifpId,jdbcType=INTEGER}, #{dftId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR},
- #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR},
- #{dbBedno,jdbcType=VARCHAR}, #{ifpPrintTime,jdbcType=TIMESTAMP}, #{ifpPrinter,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
- insert into inp_form_print
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ifpId != null" >
- IFP_ID,
- </if>
- <if test="dftId != null" >
- DFT_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>
- IFP_Print_Time,
- <if test="ifpPrinter != null" >
- IFP_Printer,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ifpId != null" >
- #{ifpId,jdbcType=INTEGER},
- </if>
- <if test="dftId != null" >
- #{dftId,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>
- now(),
- <if test="ifpPrinter != null" >
- #{ifpPrinter,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
- update inp_form_print
- <set >
- <if test="dftId != null" >
- DFT_ID = #{dftId,jdbcType=INTEGER},
- </if>
- <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="ifpPrintTime != null" >
- IFP_Print_Time = #{ifpPrintTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ifpPrinter != null" >
- IFP_Printer = #{ifpPrinter,jdbcType=VARCHAR},
- </if>
- </set>
- where IFP_ID = #{ifpId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
- update inp_form_print
- set DFT_ID = #{dftId,jdbcType=INTEGER},
- PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- IFP_Print_Time = #{ifpPrintTime,jdbcType=TIMESTAMP},
- IFP_Printer = #{ifpPrinter,jdbcType=VARCHAR}
- where IFP_ID = #{ifpId,jdbcType=INTEGER}
- </update>
- </mapper>
|