123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <?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.InpComplicationResultMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationResult" >
- <id column="ICR_ID" property="icrId" jdbcType="INTEGER" />
- <result column="ICOM_ID" property="icomId" jdbcType="INTEGER" />
- <result column="ICR_Code" property="icrCode" jdbcType="VARCHAR" />
- <result column="ICR_Name" property="icrName" jdbcType="VARCHAR" />
- <result column="ICR_Recordor" property="icrRecordor" jdbcType="VARCHAR" />
- <result column="ICR_Record_Time" property="icrRecordTime" jdbcType="TIMESTAMP" />
- <result column="ICR_IsDel" property="icrIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- ICR_ID, ICOM_ID, ICR_Code, ICR_Name, ICR_Recordor, ICR_Record_Time, ICR_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_complication_result
- where ICR_ID = #{icrId,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationResult" >
- insert into inp_complication_result (ICR_ID, ICOM_ID, ICR_Code,
- ICR_Name, ICR_Recordor, ICR_Record_Time,
- ICR_IsDel)
- values (#{icrId,jdbcType=INTEGER}, #{icomId,jdbcType=INTEGER}, #{icrCode,jdbcType=VARCHAR},
- #{icrName,jdbcType=VARCHAR}, #{icrRecordor,jdbcType=VARCHAR}, #{icrRecordTime,jdbcType=TIMESTAMP},
- #{icrIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationResult" >
- insert into inp_complication_result
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="icrId != null" >
- ICR_ID,
- </if>
- <if test="icomId != null" >
- ICOM_ID,
- </if>
- <if test="icrCode != null" >
- ICR_Code,
- </if>
- <if test="icrName != null" >
- ICR_Name,
- </if>
- <if test="icrRecordor != null" >
- ICR_Recordor,
- </if>
- <if test="icrRecordTime != null" >
- ICR_Record_Time,
- </if>
- <if test="icrIsdel != null" >
- ICR_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="icrId != null" >
- #{icrId,jdbcType=INTEGER},
- </if>
- <if test="icomId != null" >
- #{icomId,jdbcType=INTEGER},
- </if>
- <if test="icrCode != null" >
- #{icrCode,jdbcType=VARCHAR},
- </if>
- <if test="icrName != null" >
- #{icrName,jdbcType=VARCHAR},
- </if>
- <if test="icrRecordor != null" >
- #{icrRecordor,jdbcType=VARCHAR},
- </if>
- <if test="icrRecordTime != null" >
- #{icrRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icrIsdel != null" >
- #{icrIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationResult" >
- update inp_complication_result
- <set >
- <if test="icomId != null" >
- ICOM_ID = #{icomId,jdbcType=INTEGER},
- </if>
- <if test="icrCode != null" >
- ICR_Code = #{icrCode,jdbcType=VARCHAR},
- </if>
- <if test="icrName != null" >
- ICR_Name = #{icrName,jdbcType=VARCHAR},
- </if>
- <if test="icrRecordor != null" >
- ICR_Recordor = #{icrRecordor,jdbcType=VARCHAR},
- </if>
- <if test="icrRecordTime != null" >
- ICR_Record_Time = #{icrRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="icrIsdel != null" >
- ICR_IsDel = #{icrIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where ICR_ID = #{icrId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpComplicationResult" >
- update inp_complication_result
- set ICOM_ID = #{icomId,jdbcType=INTEGER},
- ICR_Code = #{icrCode,jdbcType=VARCHAR},
- ICR_Name = #{icrName,jdbcType=VARCHAR},
- ICR_Recordor = #{icrRecordor,jdbcType=VARCHAR},
- ICR_Record_Time = #{icrRecordTime,jdbcType=TIMESTAMP},
- ICR_IsDel = #{icrIsdel,jdbcType=INTEGER}
- where ICR_ID = #{icrId,jdbcType=INTEGER}
- </update>
- <insert id="batchInsert">
- insert into inp_complication_result (ICOM_ID, ICR_Code,
- ICR_Name, ICR_Recordor, ICR_Record_Time,
- ICR_IsDel)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.icomId,jdbcType=INTEGER}, #{item.icrCode,jdbcType=VARCHAR},
- #{item.icrName,jdbcType=VARCHAR}, #{item.icrRecordor,jdbcType=VARCHAR}, now(),
- 0)
- </foreach>
- </insert>
- <update id="delByIcomId">
- update inp_complication_result
- set ICR_IsDel = -1,
- ICR_Recordor = #{icrRecordor,jdbcType=VARCHAR},
- ICR_Record_Time = now()
- where ICOM_ID = #{icomId,jdbcType=INTEGER}
- </update>
- <select id="selectDicIdByIcomId" resultType="java.lang.String">
- select ICR_Code from inp_complication_result
- where ICOM_ID = #{icomId,jdbcType=INTEGER}
- and ICR_IsDel = 0
- </select>
- </mapper>
|