123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <?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.InpCatheterPartMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpCatheterPart" >
- <id column="ICP_ID" property="icpId" jdbcType="INTEGER" />
- <result column="IC_ID" property="icId" jdbcType="INTEGER" />
- <result column="ICP_Part" property="icpPart" jdbcType="VARCHAR" />
- <result column="ICP_Position" property="icpPosition" jdbcType="VARCHAR" />
- <result column="UI_ID" property="uiId" jdbcType="VARCHAR" />
- <result column="ICP_Update_Time" property="icpUpdateTime" jdbcType="TIMESTAMP" />
- <result column="ICP_IsDel" property="icpIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- ICP_ID, IC_ID, ICP_Part, ICP_Position, UI_ID, ICP_Update_Time, ICP_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_catheter_part
- where ICP_IsDel = 0 and ICP_ID = #{icpId,jdbcType=INTEGER}
- </select>
- <!-- 根据管路信息获取部位和位置 -->
- <select id="selectByICID" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_catheter_part
- where ICP_IsDel = 0 and IC_ID = #{IC_ID,jdbcType=INTEGER}
- </select>
- <select id="selectByIcIds" resultMap="BaseResultMap" parameterType="List" >
- select
- <include refid="Base_Column_List" />
- from inp_catheter_part
- where ICP_IsDel = 0 and IC_ID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- Order by ICP_ID desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_catheter_part
- where ICP_ID = #{icpId,jdbcType=INTEGER}
- </delete>
- <insert id="batchInsert" >
- insert into inp_catheter_part (
- IC_ID,
- ICP_Part,
- ICP_Position,
- UI_ID,
- ICP_Update_Time,
- ICP_IsDel)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.icId,jdbcType=INTEGER},
- #{item.icpPart,jdbcType=VARCHAR},
- #{item.icpPosition,jdbcType=VARCHAR},
- #{item.uiId,jdbcType=VARCHAR},
- #{item.icpUpdateTime,jdbcType=TIMESTAMP},
- 0)
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpCatheterPart">
- insert into inp_catheter_part
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="icpId != null" >
- ICP_ID,
- </if>
- <if test="icId != null" >
- IC_ID,
- </if>
- <if test="icpPart != null" >
- ICP_Part,
- </if>
- <if test="icpPosition != null" >
- ICP_Position,
- </if>
- <if test="uiId != null" >
- UI_ID,
- </if>
- <if test="icpUpdateTime != null" >
- ICP_Update_Time,
- </if>
- <if test="icpIsdel != null" >
- ICP_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="icpId != null" >
- #{icpId,jdbcType=INTEGER},
- </if>
- <if test="icId != null" >
- #{icId,jdbcType=INTEGER},
- </if>
- <if test="icpPart != null" >
- #{icpPart,jdbcType=VARCHAR},
- </if>
- <if test="icpPosition != null" >
- #{icpPosition,jdbcType=VARCHAR},
- </if>
- <if test="uiId != null" >
- #{uiId,jdbcType=VARCHAR},
- </if>
- <if test="icpUpdateTime != null" >
- #{icpUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icpIsdel != null" >
- #{icpIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpCatheterPart" >
- update inp_catheter_part
- <set >
- <if test="icId != null" >
- IC_ID = #{icId,jdbcType=INTEGER},
- </if>
- <if test="icpPart != null" >
- ICP_Part = #{icpPart,jdbcType=VARCHAR},
- </if>
- <if test="icpPosition != null" >
- ICP_Position = #{icpPosition,jdbcType=VARCHAR},
- </if>
- <if test="uiId != null" >
- UI_ID = #{uiId,jdbcType=VARCHAR},
- </if>
- <if test="icpUpdateTime != null" >
- ICP_Update_Time = #{icpUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icpIsdel != null" >
- ICP_IsDel = #{icpIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where ICP_ID = #{icpId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatus" >
- update inp_catheter_part
- set ICP_IsDel = -1
- where IC_ID = #{icId,jdbcType=INTEGER}
- </update>
- <update id="batchDel">
- update inp_catheter_part
- set ICP_IsDel = -1
- where IC_ID in
- <foreach collection="list" item="item" open="(" close=")" separator=",">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|