123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <?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.InpTempCustomMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
- <id column="ITC_ID" jdbcType="INTEGER" property="itcId" />
- <result column="ITC_Draw_Code" jdbcType="VARCHAR" property="itcDrawCode" />
- <result column="ITC_Draw_Name" jdbcType="VARCHAR" property="itcDrawName" />
- <result column="PatientNo" jdbcType="VARCHAR" property="patientno" />
- <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="ITC_Operation_Time" jdbcType="TIMESTAMP" property="itcOperationTime" />
- <result column="ITC_Operator" jdbcType="VARCHAR" property="itcOperator" />
- <result column="ITC_IsDel" jdbcType="INTEGER" property="itcIsdel" />
- <result column="ITC_Recordor" jdbcType="VARCHAR" property="itcRecordor" />
- <result column="ITC_Record_Time" jdbcType="TIMESTAMP" property="itcRecordTime" />
- <result column="ITC_TRP_Flag" jdbcType="INTEGER" property="itcTrpFlag" />
- </resultMap>
- <sql id="Base_Column_List">
- ITC_ID, ITC_Draw_Code, ITC_Draw_Name, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo,
- ITC_Operation_Time, ITC_Operator, ITC_IsDel, ITC_Recordor, ITC_Record_Time, ITC_TRP_Flag
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_temp_custom
- where ITC_ID = #{itcId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from inp_temp_custom
- where ITC_ID = #{itcId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
- insert into inp_temp_custom (ITC_ID, ITC_Draw_Code, ITC_Draw_Name,
- PatientNo, HI_ID, DD_DepDm,
- DW_WardDm, DB_BedNo, ITC_Operation_Time,
- ITC_Operator, ITC_IsDel, ITC_Recordor,
- ITC_Record_Time, ITC_TRP_Flag)
- values (#{itcId,jdbcType=INTEGER}, #{itcDrawCode,jdbcType=VARCHAR}, #{itcDrawName,jdbcType=VARCHAR},
- #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR},
- #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR}, #{itcOperationTime,jdbcType=TIMESTAMP},
- #{itcOperator,jdbcType=VARCHAR}, #{itcIsdel,jdbcType=INTEGER}, #{itcRecordor,jdbcType=VARCHAR},
- #{itcRecordTime,jdbcType=TIMESTAMP}, #{itcTrpFlag,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
- insert into inp_temp_custom
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="itcId != null">
- ITC_ID,
- </if>
- <if test="itcDrawCode != null">
- ITC_Draw_Code,
- </if>
- <if test="itcDrawName != null">
- ITC_Draw_Name,
- </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="itcOperationTime != null">
- ITC_Operation_Time,
- </if>
- <if test="itcOperator != null">
- ITC_Operator,
- </if>
- <if test="itcIsdel != null">
- ITC_IsDel,
- </if>
- <if test="itcRecordor != null">
- ITC_Recordor,
- </if>
- <if test="itcRecordTime != null">
- ITC_Record_Time,
- </if>
- <if test="itcTrpFlag != null">
- ITC_TRP_Flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="itcId != null">
- #{itcId,jdbcType=INTEGER},
- </if>
- <if test="itcDrawCode != null">
- #{itcDrawCode,jdbcType=VARCHAR},
- </if>
- <if test="itcDrawName != null">
- #{itcDrawName,jdbcType=VARCHAR},
- </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="itcOperationTime != null">
- #{itcOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="itcOperator != null">
- #{itcOperator,jdbcType=VARCHAR},
- </if>
- <if test="itcIsdel != null">
- #{itcIsdel,jdbcType=INTEGER},
- </if>
- <if test="itcRecordor != null">
- #{itcRecordor,jdbcType=VARCHAR},
- </if>
- <if test="itcRecordTime != null">
- #{itcRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="itcTrpFlag != null">
- #{itcTrpFlag,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
- update inp_temp_custom
- <set>
- <if test="itcDrawCode != null">
- ITC_Draw_Code = #{itcDrawCode,jdbcType=VARCHAR},
- </if>
- <if test="itcDrawName != null">
- ITC_Draw_Name = #{itcDrawName,jdbcType=VARCHAR},
- </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="itcOperationTime != null">
- ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="itcOperator != null">
- ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
- </if>
- <if test="itcIsdel != null">
- ITC_IsDel = #{itcIsdel,jdbcType=INTEGER},
- </if>
- <if test="itcRecordor != null">
- ITC_Recordor = #{itcRecordor,jdbcType=VARCHAR},
- </if>
- <if test="itcRecordTime != null">
- ITC_Record_Time = #{itcRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="itcTrpFlag != null">
- ITC_TRP_Flag = #{itcTrpFlag,jdbcType=INTEGER},
- </if>
- </set>
- where ITC_ID = #{itcId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
- update inp_temp_custom
- set ITC_Draw_Code = #{itcDrawCode,jdbcType=VARCHAR},
- ITC_Draw_Name = #{itcDrawName,jdbcType=VARCHAR},
- PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
- ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
- ITC_IsDel = #{itcIsdel,jdbcType=INTEGER},
- ITC_Recordor = #{itcRecordor,jdbcType=VARCHAR},
- ITC_Record_Time = #{itcRecordTime,jdbcType=TIMESTAMP},
- ITC_TRP_Flag = #{itcTrpFlag,jdbcType=INTEGER}
- where ITC_ID = #{itcId,jdbcType=INTEGER}
- </update>
- <select id="selectByPatientNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_temp_custom
- where ITC_IsDel = 0
- <if test="patientNo != null">
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="hiId != null">
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- </select>
- <insert id="bulkInsert" parameterType="java.util.List">
- insert into inp_temp_custom (ITC_ID, ITC_Draw_Code, ITC_Draw_Name,
- PatientNo, HI_ID, DD_DepDm,
- DW_WardDm, DB_BedNo, ITC_Operation_Time,
- ITC_Operator, ITC_IsDel, ITC_Recordor,
- ITC_Record_Time, ITC_TRP_Flag)
- values <foreach collection="list" item="item" separator=",">
- (#{item.itcId,jdbcType=INTEGER}, #{item.itcDrawCode,jdbcType=VARCHAR}, #{item.itcDrawName,jdbcType=VARCHAR},
- #{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER}, #{item.ddDepdm,jdbcType=VARCHAR},
- #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR}, #{item.itcOperationTime,jdbcType=TIMESTAMP},
- #{item.itcOperator,jdbcType=VARCHAR}, #{item.itcIsdel,jdbcType=INTEGER}, #{item.itcRecordor,jdbcType=VARCHAR},
- #{item.itcRecordTime,jdbcType=TIMESTAMP}, #{item.itcTrpFlag,jdbcType=INTEGER})
- </foreach>
- </insert>
- <select id="selectCountByPatientNo" resultType="java.lang.Integer">
- select count(1)
- from inp_temp_custom
- where ITC_IsDel = 0
- <if test="patientNo != null">
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="hiId != null">
- and HI_ID = #{hiId,jdbcType=VARCHAR}
- </if>
- </select>
- <update id="updateIsDelByPatientNo" parameterType="com.xinxin.topro.inpnurseservice.vo.InpTprCustomUpdateVo">
- update inp_temp_custom
- set ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
- ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
- ITC_IsDel = #{itcIsdel,jdbcType=INTEGER}
- where PatientNo = #{patientno,jdbcType=INTEGER}
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </update>
- </mapper>
|