123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <?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.InpWardShiftMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- <id column="IWS_ID" property="iwsId" jdbcType="INTEGER" />
- <result column="IWS_Time" property="iwsTime" jdbcType="TIMESTAMP" />
- <result column="IWS_Hander" property="iwsHander" jdbcType="VARCHAR" />
- <result column="IWS_Record_Time" property="iwsRecordTime" jdbcType="TIMESTAMP" />
- <result column="IWS_Hand_WardDm" property="iwsHandWarddm" jdbcType="VARCHAR" />
- <result column="IWS_Recordor" property="iwsRecordor" jdbcType="VARCHAR" />
- <result column="IWS_IsDel" property="iwsIsdel" jdbcType="INTEGER" />
- <result column="IWS_Operation_Time" property="iwsOperationTime" jdbcType="TIMESTAMP" />
- <result column="IWS_Operator" property="iwsOperator" jdbcType="VARCHAR" />
- <result column="IWS_FormerID" property="iwsFormerid" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- </resultMap>
- <resultMap id="ResultMapWithBLOBs" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" extends="BaseResultMap" >
- <result column="IWS_Content" property="iwsContent" jdbcType="LONGVARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IWS_ID, IWS_Time, IWS_Hander, IWS_Record_Time, IWS_Hand_WardDm, IWS_Recordor, IWS_IsDel,
- IWS_Operation_Time, IWS_Operator, IWS_FormerID, HI_ID
- </sql>
- <sql id="Blob_Column_List" >
- IWS_Content
- </sql>
- <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from inp_ward_shift
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </select>
- <select id="selectByWardHandTime" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from inp_ward_shift
- where IWS_Hand_WardDm = #{wardDm,jdbcType=VARCHAR} AND date_format(IWS_Time,'%Y-%m-%d') = #{handTime,jdbcType=VARCHAR} AND IWS_IsDel = 0 limit 1
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_ward_shift
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- insert into inp_ward_shift (IWS_ID, IWS_Time, IWS_Hander,
- IWS_Record_Time, IWS_Hand_WardDm, IWS_Recordor,
- IWS_IsDel, IWS_Operation_Time, IWS_Operator,
- IWS_FormerID, HI_ID, IWS_Content
- )
- values (#{iwsId,jdbcType=INTEGER}, #{iwsTime,jdbcType=TIMESTAMP}, #{iwsHander,jdbcType=VARCHAR},
- #{iwsRecordTime,jdbcType=TIMESTAMP}, #{iwsHandWarddm,jdbcType=VARCHAR}, #{iwsRecordor,jdbcType=VARCHAR},
- #{iwsIsdel,jdbcType=INTEGER}, #{iwsOperationTime,jdbcType=TIMESTAMP}, #{iwsOperator,jdbcType=VARCHAR},
- #{iwsFormerid,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{iwsContent,jdbcType=LONGVARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- insert into inp_ward_shift
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="iwsId != null" >
- IWS_ID,
- </if>
- <if test="iwsTime != null" >
- IWS_Time,
- </if>
- <if test="iwsHander != null" >
- IWS_Hander,
- </if>
- <if test="iwsRecordTime != null" >
- IWS_Record_Time,
- </if>
- <if test="iwsHandWarddm != null" >
- IWS_Hand_WardDm,
- </if>
- <if test="iwsRecordor != null" >
- IWS_Recordor,
- </if>
- <if test="iwsIsdel != null" >
- IWS_IsDel,
- </if>
- <if test="iwsOperationTime != null" >
- IWS_Operation_Time,
- </if>
- <if test="iwsOperator != null" >
- IWS_Operator,
- </if>
- <if test="iwsFormerid != null" >
- IWS_FormerID,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="iwsContent != null" >
- IWS_Content,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="iwsId != null" >
- #{iwsId,jdbcType=INTEGER},
- </if>
- <if test="iwsTime != null" >
- #{iwsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsHander != null" >
- #{iwsHander,jdbcType=VARCHAR},
- </if>
- <if test="iwsRecordTime != null" >
- #{iwsRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsHandWarddm != null" >
- #{iwsHandWarddm,jdbcType=VARCHAR},
- </if>
- <if test="iwsRecordor != null" >
- #{iwsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="iwsIsdel != null" >
- #{iwsIsdel,jdbcType=INTEGER},
- </if>
- <if test="iwsOperationTime != null" >
- #{iwsOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsOperator != null" >
- #{iwsOperator,jdbcType=VARCHAR},
- </if>
- <if test="iwsFormerid != null" >
- #{iwsFormerid,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="iwsContent != null" >
- #{iwsContent,jdbcType=LONGVARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- update inp_ward_shift
- <set >
- <if test="iwsTime != null" >
- IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsHander != null" >
- IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
- </if>
- <if test="iwsRecordTime != null" >
- IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsHandWarddm != null" >
- IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
- </if>
- <if test="iwsRecordor != null" >
- IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
- </if>
- <if test="iwsIsdel != null" >
- IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
- </if>
- <if test="iwsOperationTime != null" >
- IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iwsOperator != null" >
- IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
- </if>
- <if test="iwsFormerid != null" >
- IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="iwsContent != null" >
- IWS_Content = #{iwsContent,jdbcType=LONGVARCHAR},
- </if>
- </set>
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- update inp_ward_shift
- set IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
- IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
- IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
- IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
- IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
- IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
- IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
- IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
- IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
- HI_ID = #{hiId,jdbcType=INTEGER},
- IWS_Content = #{iwsContent,jdbcType=LONGVARCHAR}
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
- update inp_ward_shift
- set IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
- IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
- IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
- IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
- IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
- IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
- IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
- IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
- IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
- HI_ID = #{hiId,jdbcType=INTEGER}
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </update>
- <update id="updateStatus" parameterType="java.lang.Integer" >
- update inp_ward_shift
- set
- IWS_IsDel = -1
- where IWS_ID = #{iwsId,jdbcType=INTEGER}
- </update>
- </mapper>
|