123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- <?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.DicCatheterMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- <id column="DC_ID" property="dcId" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DC_Catheter_Name" property="dcCatheterName" jdbcType="VARCHAR" />
- <result column="DC_PinyinCode" property="dcPinyincode" jdbcType="VARCHAR" />
- <result column="DC_WubiCode" property="dcWubicode" jdbcType="VARCHAR" />
- <result column="DC_OtherCode" property="dcOthercode" jdbcType="VARCHAR" />
- <result column="DC_Sort" property="dcSort" jdbcType="INTEGER" />
- <result column="DC_Material" property="dcMaterial" jdbcType="VARCHAR" />
- <result column="DC_Way" property="dcWay" jdbcType="VARCHAR" />
- <result column="DC_Category" property="dcCategory" jdbcType="VARCHAR" />
- <result column="DC_Valid_Time" property="dcValidTime" jdbcType="INTEGER" />
- <result column="DC_IsDel" property="dcIsdel" jdbcType="INTEGER" />
- <result column="DC_IsVein" property="dcIsVein" jdbcType="INTEGER" />
- <result column="DC_Crisis" property="dcCrisis" jdbcType="INTEGER" />
- </resultMap>
- <resultMap id="HashMap" type="com.xinxin.topro.sysservice.vo.DicPartVO" extends="BaseResultMap">
- <result column="SDD_ID" property="sddId" jdbcType="INTEGER" />
- <result column="SD_ID" property="sdId" jdbcType="INTEGER" />
- <result column="SDD_Detail_Code" property="sddDetailCode" jdbcType="VARCHAR" />
- <result column="SDD_Detail_Name" property="sddDetailName" jdbcType="VARCHAR" />
- <result column="SDD_PinyinCode" property="sddPinyincode" jdbcType="VARCHAR" />
- <result column="SDD_WubiCode" property="sddWubicode" jdbcType="VARCHAR" />
- <result column="SDD_OtherCode" property="sddOthercode" jdbcType="VARCHAR" />
- <result column="SDD_Sort" property="sddSort" jdbcType="INTEGER" />
- <result column="UI_ID" property="uiId" jdbcType="VARCHAR" />
- <result column="SDD_Update_Time" property="sddUpdateTime" jdbcType="TIMESTAMP" />
- <result column="DCP_ID" property="dcpId" jdbcType="INTEGER" />
- <result column="DC_ID" property="dcId" jdbcType="INTEGER" />
- <result column="DCP_Part" property="dcpPart" jdbcType="VARCHAR" />
- <result column="DIP_Operation_Time" property="dipOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIP_Operator" property="dipOperator" jdbcType="VARCHAR" />
- <result column="DIP_IsDel" property="dipIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- DC_ID, HI_ID,DC_Catheter_Name, DC_PinyinCode, DC_WubiCode, DC_OtherCode,
- DC_Sort, DC_Material, DC_Way, DC_Category, DC_Valid_Time, DC_IsDel, DC_IsVein, DC_Crisis
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_catheter
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_catheter
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- insert into dic_catheter (DC_ID, HI_ID,
- DC_Catheter_Name, DC_PinyinCode, DC_WubiCode,
- DC_OtherCode, DC_Sort, DC_Material,
- DC_Way, DC_Category, DC_Valid_Time,
- DC_IsDel, DC_IsVein, DC_Crisis)
- values (#{dcId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},
- #{dcCatheterName,jdbcType=VARCHAR}, #{dcPinyincode,jdbcType=VARCHAR}, #{dcWubicode,jdbcType=VARCHAR},
- #{dcOthercode,jdbcType=VARCHAR}, #{dcSort,jdbcType=INTEGER}, #{dcMaterial,jdbcType=VARCHAR},
- #{dcWay,jdbcType=VARCHAR}, #{dcCategory,jdbcType=VARCHAR}, #{dcValidTime,jdbcType=INTEGER},
- #{dcIsdel,jdbcType=INTEGER},#{dcIsVein,jdbcType=INTEGER},#{dcCrisis,jdbcType=INTEGER} )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- insert into dic_catheter
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dcId != null" >
- DC_ID,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="dcCatheterName != null" >
- DC_Catheter_Name,
- </if>
- <if test="dcPinyincode != null" >
- DC_PinyinCode,
- </if>
- <if test="dcWubicode != null" >
- DC_WubiCode,
- </if>
- <if test="dcOthercode != null" >
- DC_OtherCode,
- </if>
- <if test="dcSort != null" >
- DC_Sort,
- </if>
- <if test="dcMaterial != null" >
- DC_Material,
- </if>
- <if test="dcWay != null" >
- DC_Way,
- </if>
- <if test="dcCategory != null" >
- DC_Category,
- </if>
- <if test="dcValidTime != null" >
- DC_Valid_Time,
- </if>
- <if test="dcIsdel != null" >
- DC_IsDel,
- </if>
- <if test="dcIsVein != null" >
- DC_IsVein,
- </if>
- <if test="dcCrisis != null" >
- DC_Crisis,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dcId != null" >
- #{dcId,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dcCatheterName != null" >
- #{dcCatheterName,jdbcType=VARCHAR},
- </if>
- <if test="dcPinyincode != null" >
- #{dcPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dcWubicode != null" >
- #{dcWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dcOthercode != null" >
- #{dcOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dcSort != null" >
- #{dcSort,jdbcType=INTEGER},
- </if>
- <if test="dcMaterial != null" >
- #{dcMaterial,jdbcType=VARCHAR},
- </if>
- <if test="dcWay != null" >
- #{dcWay,jdbcType=VARCHAR},
- </if>
- <if test="dcCategory != null" >
- #{dcCategory,jdbcType=VARCHAR},
- </if>
- <if test="dcValidTime != null" >
- #{dcValidTime,jdbcType=INTEGER},
- </if>
- <if test="dcIsdel != null" >
- #{dcIsdel,jdbcType=INTEGER},
- </if>
- <if test="dcIsVein != null" >
- #{dcIsVein,jdbcType=INTEGER},
- </if>
- <if test="dcCrisis != null" >
- #{dcCrisis,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- update dic_catheter
- <set >
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dcCatheterName != null" >
- DC_Catheter_Name = #{dcCatheterName,jdbcType=VARCHAR},
- </if>
- <if test="dcPinyincode != null" >
- DC_PinyinCode = #{dcPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dcWubicode != null" >
- DC_WubiCode = #{dcWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dcOthercode != null" >
- DC_OtherCode = #{dcOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dcSort != null" >
- DC_Sort = #{dcSort,jdbcType=INTEGER},
- </if>
- <if test="dcMaterial != null" >
- DC_Material = #{dcMaterial,jdbcType=VARCHAR},
- </if>
- <if test="dcWay != null" >
- DC_Way = #{dcWay,jdbcType=VARCHAR},
- </if>
- <if test="dcCategory != null" >
- DC_Category = #{dcCategory,jdbcType=VARCHAR},
- </if>
- <if test="dcValidTime != null" >
- DC_Valid_Time = #{dcValidTime,jdbcType=INTEGER},
- </if>
- <if test="dcIsdel != null" >
- DC_IsDel = #{dcIsdel,jdbcType=INTEGER},
- </if>
- <if test="dcIsVein != null" >
- DC_IsVein = #{dcIsVein,jdbcType=INTEGER}
- </if>
- <if test="dcCrisis != null" >
- DC_Crisis = #{dcCrisis,jdbcType=INTEGER},
- </if>
- </set>
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- update dic_catheter
- set
- DC_Catheter_Name = #{dcCatheterName,jdbcType=VARCHAR},
- DC_PinyinCode = #{dcPinyincode,jdbcType=VARCHAR},
- DC_WubiCode = #{dcWubicode,jdbcType=VARCHAR},
- DC_Sort = #{dcSort,jdbcType=INTEGER},
- DC_Material = #{dcMaterial,jdbcType=VARCHAR},
- DC_Way = #{dcWay,jdbcType=VARCHAR},
- DC_Category = #{dcCategory,jdbcType=VARCHAR},
- DC_Valid_Time = #{dcValidTime,jdbcType=INTEGER},
- DC_IsVein = #{dcIsVein,jdbcType=INTEGER},
- DC_Crisis = #{dcCrisis,jdbcType=INTEGER}
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </update>
- <select id="selectDetailList" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List" />
- FROM
- dic_catheter
- WHERE
- DC_IsDel = 0
- and (HI_ID = #{hiId,jdbcType=INTEGER} or HI_ID = 0)
- <if test="dcCatheterName != null and dcCatheterName != '' ">
- and (DC_Catheter_Name like concat('%',#{dcCatheterName,jdbcType=VARCHAR},'%')
- or DC_PinyinCode like concat('%',#{dcCatheterName,jdbcType=VARCHAR},'%')
- or DC_WubiCode like concat('%',#{dcCatheterName,jdbcType=VARCHAR},'%'))
- </if>
- </select>
- <select id="selectPartName" resultMap="HashMap">
- SELECT
- sdd.SDD_Detail_Name,
- sdd.SDD_Detail_Code,
- dcp.DCP_Part,
- dc.DC_ID,
- sdd.SD_ID,
- dcp.DCP_ID,
- sdd.SDD_ID
- FROM
- dic_catheter_part dcp,
- dic_catheter dc,
- sys_dictionary_detail sdd
- WHERE
- dc.DC_ID = dcp.DC_ID
- and sdd.SDD_Detail_Code = dcp.DCP_Part
- and dc.DC_ID = #{dcId,jdbcType=INTEGER}
- and (dc.HI_ID = #{hiId,jdbcType=INTEGER} or dc.HI_ID = 0)
- and dc.DC_IsDel = 0
- and sdd.SDD_IsDel = 0
- and dcp.DIP_IsDel = 0
- <if test="sddDetailName != null and sddDetailName != '' ">
- and (SDD_Detail_Name like concat('%',#{sddDetailName,jdbcType=VARCHAR},'%')
- or SDD_Detail_Code like concat('%',#{sddDetailName,jdbcType=VARCHAR},'%')
- or SDD_PinyinCode like concat('%',#{sddDetailName,jdbcType=VARCHAR},'%')
- or SDD_WubiCode like concat('%',#{sddDetailName,jdbcType=VARCHAR},'%'))
- </if>
- ORDER BY sdd.SDD_Sort
- </select>
- <update id="updateDel" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicCatheter" >
- update dic_catheter
- set
- DC_IsDel = #{dcIsdel,jdbcType=INTEGER}
- where DC_ID = #{dcId,jdbcType=INTEGER}
- </update>
- </mapper>
|