123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <?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.DicIoMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIo" >
- <id column="DIO_ID" property="dioId" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DW_WardDm" property="dwWardDm" jdbcType="VARCHAR" />
- <result column="DIO_IO_Code" property="dioIoCode" jdbcType="VARCHAR"/>
- <result column="DIO_Type" property="dioType" jdbcType="INTEGER" />
- <result column="DIO_IOName" property="dioIoname" jdbcType="VARCHAR" />
- <result column="DIO_IsAdvice" property="dioIsadvice" jdbcType="INTEGER" />
- <result column="DIO_Operation_Time" property="dioOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIO_Operator" property="dioOperator" jdbcType="VARCHAR" />
- <result column="DIO_PinyinCode" property="dioPinyinCode" jdbcType="VARCHAR"/>
- <result column="DIO_WubiCode" property="dioWubiCode" jdbcType="VARCHAR"/>
- <result column="DIO_OtherCode" property="dioOtherCode" jdbcType="VARCHAR"/>
- <result column="DIO_IsDel" property="dioIsdel" jdbcType="INTEGER" />
- <result column="DIO_Sort" property="dioSort" jdbcType="INTEGER"/>
- <result column="DIO_Color" property="dioColor" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- DIO_ID, HI_ID, DW_WardDm, DIO_IO_Code,DIO_Type, DIO_IOName, DIO_IsAdvice, DIO_Operation_Time,
- DIO_Operator,DIO_PinyinCode,DIO_WubiCode,DIO_OtherCode, DIO_IsDel,DIO_Sort, DIO_Color
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_io
- where DIO_IsDel = 0 AND DIO_ID = #{dioId,jdbcType=INTEGER}
- </select>
- <select id="selectIds" resultMap="BaseResultMap" parameterType="List" >
- select
- <include refid="Base_Column_List" />
- from dic_io
- where DIO_IsDel = 0 AND DIO_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- order by DIO_Sort asc
- </select>
- <select id="selectByType" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.DicIoSearchRequest" >
- select
- <include refid="Base_Column_List" />
- from dic_io
- where DIO_IsDel = 0
- <if test="type != null" >
- AND DIO_Type = #{type,jdbcType=INTEGER}
- </if>
- <if test="hiId != null" >
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="dwWardDm != null" >
- AND DW_WardDm = #{dwWardDm,jdbcType=VARCHAR}
- </if>
- <if test="dioIoCode != null" >
- AND DIO_IO_Code = #{dioIoCode,jdbcType=VARCHAR}
- </if>
- order by DIO_Sort asc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_io
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIo" >
- insert into dic_io
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dioId != null" >
- DIO_ID,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dioCode != null" >
- DIO_IO_Code,
- </if>
- <if test="dioType != null" >
- DIO_Type,
- </if>
- <if test="dioIoname != null" >
- DIO_IOName,
- </if>
- <if test="dioIsadvice != null" >
- DIO_IsAdvice,
- </if>
- <if test="dioOperationTime != null" >
- DIO_Operation_Time,
- </if>
- <if test="dioOperator != null" >
- DIO_Operator,
- </if>
- <if test="dioPinyinCode != null" >
- DIO_PinyinCode,
- </if>
- <if test="dioWubiCode != null" >
- DIO_WubiCode,
- </if>
- <if test="dioOtherCode != null" >
- DIO_OtherCode,
- </if>
- <if test="dioIsdel != null" >
- DIO_IsDel,
- </if>
- <if test="dioSort != null">
- DIO_Sort,
- </if>
- <if test="dioColor != null">
- DIO_Color,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dioId != null" >
- #{dioId,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dwWarddm != null" >
- #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dioCode != null" >
- #{dioCode,jdbcType=VARCHAR},
- </if>
- <if test="dioType != null" >
- #{dioType,jdbcType=INTEGER},
- </if>
- <if test="dioIoname != null" >
- #{dioIoname,jdbcType=VARCHAR},
- </if>
- <if test="dioIsadvice != null" >
- #{dioIsadvice,jdbcType=INTEGER},
- </if>
- <if test="dioOperationTime != null" >
- #{dioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dioOperator != null" >
- #{dioOperator,jdbcType=VARCHAR},
- </if>
- <if test="dioPinyinCode != null" >
- #{dioPinyinCode,jdbcType=VARCHAR},
- </if>
- <if test="dioWubiCode != null" >
- #{dioWubiCode,jdbcType=VARCHAR},
- </if>
- <if test="dioOtherCode != null" >
- #{dioOtherCode,jdbcType=VARCHAR},
- </if>
- <if test="dioIsdel != null" >
- #{dioIsdel,jdbcType=INTEGER},
- </if>
- <if test="dioSort =null">
- #{dioSort,jdbcTpye=INTEGER},
- </if>
- <if test="dioColor != null" >
- #{dioColor,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIo" >
- update dic_io
- <set >
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dioCode != null" >
- DIO_IO_Code = #{dioCode,jdbcType=VARCHAR},
- </if>
- <if test="dioType != null" >
- DIO_Type = #{dioType,jdbcType=INTEGER},
- </if>
- <if test="dioIoname != null" >
- DIO_IOName = #{dioIoname,jdbcType=VARCHAR},
- </if>
- <if test="dioIsadvice != null" >
- DIO_IsAdvice = #{dioIsadvice,jdbcType=INTEGER},
- </if>
- <if test="dioOperationTime != null" >
- DIO_Operation_Time = #{dioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dioOperator != null" >
- DIO_Operator = #{dioOperator,jdbcType=VARCHAR},
- </if>
- <if test="dioPinyinCode != null" >
- DIO_PinyinCode = #{dioPinyinCode,jdbcType=VARCHAR},
- </if>
- <if test="dioWubiCode != null" >
- DIO_WubiCode = #{dioWubiCode,jdbcType=VARCHAR},
- </if>
- <if test="dioOtherCode != null" >
- DIO_OtherCode = #{dioOtherCode,jdbcType=VARCHAR},
- </if>
- <if test="dioIsdel != null" >
- DIO_IsDel = #{dioIsdel,jdbcType=INTEGER},
- </if>
- <if test="dioSort != null" >
- DIO_Sort = #{dioSort,jdbcType=INTEGER},
- </if>
- <if test="dioColor != null" >
- DIO_Color = #{dioColor,jdbcType=VARCHAR},
- </if>
- </set>
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </update>
- <select id="selectAll" resultMap="BaseResultMap" >
- select
- <include refid="Base_Column_List" />
- from dic_io
- where DIO_IsDel = 0
- <if test="hiId != null" >
- AND (HI_ID = #{hiId,jdbcType=INTEGER} OR HI_ID = 0)
- </if>
- <if test="dwWardDm != null" >
- AND DW_WardDm = #{dwWardDm,jdbcType=VARCHAR}
- </if>
- order by DIO_Sort asc
- </select>
- <select id="selectByHiId" resultType="com.xinxin.topro.inpnurseservice.response.InpIoFullResponse">
- SELECT
- di.DIO_ID AS dioId,
- DIO_IO_Code AS dioIoCode,
- DIO_IOName AS dioIoName,
- dip.DIP_ID AS dipId,
- dip.DIP_PropCode AS dipPropCode,
- dip.DIP_PropName AS dipPropName,
- dip.DIP_SupID AS dipSupId,
- di.DIO_Type AS dioType
- FROM
- dic_io di
- LEFT JOIN dic_io_property dip ON di.DIO_ID = dip.DIO_ID
- WHERE
- di.DIO_IsDel = 0
- AND dip.DIP_IsDel = 0
- AND di.HI_ID = #{hiId,jdbcType=INTEGER}
- GROUP BY dip.DIP_ID
- </select>
- </mapper>
|