123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <?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.sysservice.dao.mysqlmapper.DicIntellectMattressMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicIntellectMattress" >
- <id column="DIM_ID" property="dimId" jdbcType="INTEGER" />
- <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="DIM_BED" property="dimBed" jdbcType="VARCHAR" />
- <result column="DIM_MATTRESS" property="dimMattress" jdbcType="VARCHAR" />
- <result column="DIM_Operation_Time" property="dimOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIM_Operator" property="dimOperator" jdbcType="VARCHAR" />
- <result column="DIM_IsDel" property="dimIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DIM_ID, HI_ID, DD_DepDm, DW_WardDm, DIM_BED, DIM_MATTRESS, DIM_Operation_Time, DIM_Operator,
- DIM_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_intellect_mattress
- where DIM_IsDel = 0 and DIM_ID = #{dimId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_intellect_mattress
- where DIM_ID = #{dimId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicIntellectMattress" >
- insert into dic_intellect_mattress (DIM_ID, HI_ID, DD_DepDm,
- DW_WardDm, DIM_BED, DIM_MATTRESS,
- DIM_Operation_Time, DIM_Operator, DIM_IsDel
- )
- values (#{dimId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR},
- #{dwWarddm,jdbcType=VARCHAR}, #{dimBed,jdbcType=VARCHAR}, #{dimMattress,jdbcType=VARCHAR},
- #{dimOperationTime,jdbcType=TIMESTAMP}, #{dimOperator,jdbcType=VARCHAR}, #{dimIsdel,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicIntellectMattress" >
- insert into dic_intellect_mattress
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dimId != null" >
- DIM_ID,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dimBed != null" >
- DIM_BED,
- </if>
- <if test="dimMattress != null" >
- DIM_MATTRESS,
- </if>
- <if test="dimOperationTime != null" >
- DIM_Operation_Time,
- </if>
- <if test="dimOperator != null" >
- DIM_Operator,
- </if>
- <if test="dimIsdel != null" >
- DIM_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dimId != null" >
- #{dimId,jdbcType=INTEGER},
- </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="dimBed != null" >
- #{dimBed,jdbcType=VARCHAR},
- </if>
- <if test="dimMattress != null" >
- #{dimMattress,jdbcType=VARCHAR},
- </if>
- <if test="dimOperationTime != null" >
- #{dimOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dimOperator != null" >
- #{dimOperator,jdbcType=VARCHAR},
- </if>
- <if test="dimIsdel != null" >
- #{dimIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicIntellectMattress" >
- update dic_intellect_mattress
- <set >
- <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="dimBed != null" >
- DIM_BED = #{dimBed,jdbcType=VARCHAR},
- </if>
- <if test="dimMattress != null" >
- DIM_MATTRESS = #{dimMattress,jdbcType=VARCHAR},
- </if>
- <if test="dimOperationTime != null" >
- DIM_Operation_Time = #{dimOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dimOperator != null" >
- DIM_Operator = #{dimOperator,jdbcType=VARCHAR},
- </if>
- <if test="dimIsdel != null" >
- DIM_IsDel = #{dimIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where DIM_ID = #{dimId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicIntellectMattress" >
- update dic_intellect_mattress
- set HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DIM_BED = #{dimBed,jdbcType=VARCHAR},
- DIM_MATTRESS = #{dimMattress,jdbcType=VARCHAR},
- DIM_Operation_Time = #{dimOperationTime,jdbcType=TIMESTAMP},
- DIM_Operator = #{dimOperator,jdbcType=VARCHAR},
- DIM_IsDel = #{dimIsdel,jdbcType=INTEGER}
- where DIM_ID = #{dimId,jdbcType=INTEGER}
- </update>
- <select id="selectByHIid" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from dic_intellect_mattress
- where DIM_IsDel = 0
- and HI_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- <if test="name != null" >
- and (DIM_BED like concat('%',#{name},'%') or DIM_MATTRESS like concat('%',#{name},'%'))
- </if>
- order by DIM_Operation_Time desc
- </select>
- <update id="updateStatus">
- update dic_intellect_mattress
- set
- DIM_Operation_Time = #{time,jdbcType=TIMESTAMP},
- DIM_Operator = #{uiCode,jdbcType=VARCHAR},
- DIM_IsDel = -1
- where DIM_ID = #{dimId,jdbcType=INTEGER}
- </update>
- </mapper>
|