123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- <?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.pubservice.sqlservermapper.BedMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.sqlservermodel.Bed" >
- <id column="BedNo" property="bedno" jdbcType="VARCHAR" />
- <result column="RoomBed" property="roombed" jdbcType="VARCHAR" />
- <result column="Ward" property="ward" jdbcType="VARCHAR" />
- <result column="Zone" property="zone" jdbcType="VARCHAR" />
- <result column="DepartNo" property="departno" jdbcType="VARCHAR" />
- <result column="StockLoc" property="stockloc" jdbcType="VARCHAR" />
- <result column="OwnDivNo" property="owndivno" jdbcType="VARCHAR" />
- <result column="BedLevel" property="bedlevel" jdbcType="SMALLINT" />
- <result column="BedType" property="bedtype" jdbcType="CHAR" />
- <result column="LocArea" property="locarea" jdbcType="VARCHAR" />
- <result column="SexCtrl" property="sexctrl" jdbcType="VARCHAR" />
- <result column="IsQuery" property="isquery" jdbcType="BIT" />
- <result column="IsTaint" property="istaint" jdbcType="BIT" />
- <result column="IsICU" property="isicu" jdbcType="BIT" />
- <result column="ChartNo" property="chartno" jdbcType="VARCHAR" />
- <result column="PtName" property="ptname" jdbcType="VARCHAR" />
- <result column="VisitNo" property="visitno" jdbcType="VARCHAR" />
- <result column="UDDTime" property="uddtime" jdbcType="TIMESTAMP" />
- <result column="ExpandStatus" property="expandstatus" jdbcType="VARCHAR" />
- <result column="ReserveNo" property="reserveno" jdbcType="VARCHAR" />
- <result column="BedStatue" property="bedstatue" jdbcType="VARCHAR" />
- <result column="Printer1" property="printer1" jdbcType="VARCHAR" />
- <result column="Printer2" property="printer2" jdbcType="VARCHAR" />
- <result column="BedItemCode" property="beditemcode" jdbcType="VARCHAR" />
- <result column="AddItemCode" property="additemcode" jdbcType="VARCHAR" />
- <result column="InpItemCode" property="inpitemcode" jdbcType="VARCHAR" />
- <result column="NurseItemCode" property="nurseitemcode" jdbcType="VARCHAR" />
- <result column="DrugItemCode" property="drugitemcode" jdbcType="VARCHAR" />
- <result column="IsDelete" property="isdelete" jdbcType="BIT" />
- <result column="UpdateUser" property="updateuser" jdbcType="VARCHAR" />
- <result column="UpdateTime" property="updatetime" jdbcType="TIMESTAMP" />
- <result column="PatientType" property="patienttype" jdbcType="INTEGER" />
- <result column="RoomNo" property="roomno" jdbcType="VARCHAR" />
- <result column="BedUseStatus" property="bedusestatus" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- BedNo, RoomBed, Ward, Zone, DepartNo, StockLoc, OwnDivNo, BedLevel, BedType, LocArea,
- SexCtrl, IsQuery, IsTaint, IsICU, ChartNo, PtName, VisitNo, UDDTime, ExpandStatus,
- ReserveNo, BedStatue, Printer1, Printer2, BedItemCode, AddItemCode, InpItemCode,
- NurseItemCode, DrugItemCode, IsDelete, UpdateUser, UpdateTime, PatientType, RoomNo,
- BedUseStatus
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from Bed
- where BedNo = #{bedno,jdbcType=VARCHAR}
- </select>
- <select id="selectByDepartNo" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from Bed
- where DepartNo = #{departNo,jdbcType=VARCHAR} and isdelete = 0 and bedusestatus = 0
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from Bed
- where BedNo = #{bedno,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.pubservice.sqlservermodel.Bed" >
- insert into Bed (BedNo, RoomBed, Ward,
- Zone, DepartNo, StockLoc,
- OwnDivNo, BedLevel, BedType,
- LocArea, SexCtrl, IsQuery,
- IsTaint, IsICU, ChartNo, PtName,
- VisitNo, UDDTime, ExpandStatus,
- ReserveNo, BedStatue, Printer1,
- Printer2, BedItemCode, AddItemCode,
- InpItemCode, NurseItemCode, DrugItemCode,
- IsDelete, UpdateUser, UpdateTime,
- PatientType, RoomNo, BedUseStatus
- )
- values (#{bedno,jdbcType=VARCHAR}, #{roombed,jdbcType=VARCHAR}, #{ward,jdbcType=VARCHAR},
- #{zone,jdbcType=VARCHAR}, #{departno,jdbcType=VARCHAR}, #{stockloc,jdbcType=VARCHAR},
- #{owndivno,jdbcType=VARCHAR}, #{bedlevel,jdbcType=SMALLINT}, #{bedtype,jdbcType=CHAR},
- #{locarea,jdbcType=VARCHAR}, #{sexctrl,jdbcType=VARCHAR}, #{isquery,jdbcType=BIT},
- #{istaint,jdbcType=BIT}, #{isicu,jdbcType=BIT}, #{chartno,jdbcType=VARCHAR}, #{ptname,jdbcType=VARCHAR},
- #{visitno,jdbcType=VARCHAR}, #{uddtime,jdbcType=TIMESTAMP}, #{expandstatus,jdbcType=VARCHAR},
- #{reserveno,jdbcType=VARCHAR}, #{bedstatue,jdbcType=VARCHAR}, #{printer1,jdbcType=VARCHAR},
- #{printer2,jdbcType=VARCHAR}, #{beditemcode,jdbcType=VARCHAR}, #{additemcode,jdbcType=VARCHAR},
- #{inpitemcode,jdbcType=VARCHAR}, #{nurseitemcode,jdbcType=VARCHAR}, #{drugitemcode,jdbcType=VARCHAR},
- #{isdelete,jdbcType=BIT}, #{updateuser,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
- #{patienttype,jdbcType=INTEGER}, #{roomno,jdbcType=VARCHAR}, #{bedusestatus,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.sqlservermodel.Bed" >
- insert into Bed
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="bedno != null" >
- BedNo,
- </if>
- <if test="roombed != null" >
- RoomBed,
- </if>
- <if test="ward != null" >
- Ward,
- </if>
- <if test="zone != null" >
- Zone,
- </if>
- <if test="departno != null" >
- DepartNo,
- </if>
- <if test="stockloc != null" >
- StockLoc,
- </if>
- <if test="owndivno != null" >
- OwnDivNo,
- </if>
- <if test="bedlevel != null" >
- BedLevel,
- </if>
- <if test="bedtype != null" >
- BedType,
- </if>
- <if test="locarea != null" >
- LocArea,
- </if>
- <if test="sexctrl != null" >
- SexCtrl,
- </if>
- <if test="isquery != null" >
- IsQuery,
- </if>
- <if test="istaint != null" >
- IsTaint,
- </if>
- <if test="isicu != null" >
- IsICU,
- </if>
- <if test="chartno != null" >
- ChartNo,
- </if>
- <if test="ptname != null" >
- PtName,
- </if>
- <if test="visitno != null" >
- VisitNo,
- </if>
- <if test="uddtime != null" >
- UDDTime,
- </if>
- <if test="expandstatus != null" >
- ExpandStatus,
- </if>
- <if test="reserveno != null" >
- ReserveNo,
- </if>
- <if test="bedstatue != null" >
- BedStatue,
- </if>
- <if test="printer1 != null" >
- Printer1,
- </if>
- <if test="printer2 != null" >
- Printer2,
- </if>
- <if test="beditemcode != null" >
- BedItemCode,
- </if>
- <if test="additemcode != null" >
- AddItemCode,
- </if>
- <if test="inpitemcode != null" >
- InpItemCode,
- </if>
- <if test="nurseitemcode != null" >
- NurseItemCode,
- </if>
- <if test="drugitemcode != null" >
- DrugItemCode,
- </if>
- <if test="isdelete != null" >
- IsDelete,
- </if>
- <if test="updateuser != null" >
- UpdateUser,
- </if>
- <if test="updatetime != null" >
- UpdateTime,
- </if>
- <if test="patienttype != null" >
- PatientType,
- </if>
- <if test="roomno != null" >
- RoomNo,
- </if>
- <if test="bedusestatus != null" >
- BedUseStatus,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="bedno != null" >
- #{bedno,jdbcType=VARCHAR},
- </if>
- <if test="roombed != null" >
- #{roombed,jdbcType=VARCHAR},
- </if>
- <if test="ward != null" >
- #{ward,jdbcType=VARCHAR},
- </if>
- <if test="zone != null" >
- #{zone,jdbcType=VARCHAR},
- </if>
- <if test="departno != null" >
- #{departno,jdbcType=VARCHAR},
- </if>
- <if test="stockloc != null" >
- #{stockloc,jdbcType=VARCHAR},
- </if>
- <if test="owndivno != null" >
- #{owndivno,jdbcType=VARCHAR},
- </if>
- <if test="bedlevel != null" >
- #{bedlevel,jdbcType=SMALLINT},
- </if>
- <if test="bedtype != null" >
- #{bedtype,jdbcType=CHAR},
- </if>
- <if test="locarea != null" >
- #{locarea,jdbcType=VARCHAR},
- </if>
- <if test="sexctrl != null" >
- #{sexctrl,jdbcType=VARCHAR},
- </if>
- <if test="isquery != null" >
- #{isquery,jdbcType=BIT},
- </if>
- <if test="istaint != null" >
- #{istaint,jdbcType=BIT},
- </if>
- <if test="isicu != null" >
- #{isicu,jdbcType=BIT},
- </if>
- <if test="chartno != null" >
- #{chartno,jdbcType=VARCHAR},
- </if>
- <if test="ptname != null" >
- #{ptname,jdbcType=VARCHAR},
- </if>
- <if test="visitno != null" >
- #{visitno,jdbcType=VARCHAR},
- </if>
- <if test="uddtime != null" >
- #{uddtime,jdbcType=TIMESTAMP},
- </if>
- <if test="expandstatus != null" >
- #{expandstatus,jdbcType=VARCHAR},
- </if>
- <if test="reserveno != null" >
- #{reserveno,jdbcType=VARCHAR},
- </if>
- <if test="bedstatue != null" >
- #{bedstatue,jdbcType=VARCHAR},
- </if>
- <if test="printer1 != null" >
- #{printer1,jdbcType=VARCHAR},
- </if>
- <if test="printer2 != null" >
- #{printer2,jdbcType=VARCHAR},
- </if>
- <if test="beditemcode != null" >
- #{beditemcode,jdbcType=VARCHAR},
- </if>
- <if test="additemcode != null" >
- #{additemcode,jdbcType=VARCHAR},
- </if>
- <if test="inpitemcode != null" >
- #{inpitemcode,jdbcType=VARCHAR},
- </if>
- <if test="nurseitemcode != null" >
- #{nurseitemcode,jdbcType=VARCHAR},
- </if>
- <if test="drugitemcode != null" >
- #{drugitemcode,jdbcType=VARCHAR},
- </if>
- <if test="isdelete != null" >
- #{isdelete,jdbcType=BIT},
- </if>
- <if test="updateuser != null" >
- #{updateuser,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="patienttype != null" >
- #{patienttype,jdbcType=INTEGER},
- </if>
- <if test="roomno != null" >
- #{roomno,jdbcType=VARCHAR},
- </if>
- <if test="bedusestatus != null" >
- #{bedusestatus,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.sqlservermodel.Bed" >
- update Bed
- <set >
- <if test="roombed != null" >
- RoomBed = #{roombed,jdbcType=VARCHAR},
- </if>
- <if test="ward != null" >
- Ward = #{ward,jdbcType=VARCHAR},
- </if>
- <if test="zone != null" >
- Zone = #{zone,jdbcType=VARCHAR},
- </if>
- <if test="departno != null" >
- DepartNo = #{departno,jdbcType=VARCHAR},
- </if>
- <if test="stockloc != null" >
- StockLoc = #{stockloc,jdbcType=VARCHAR},
- </if>
- <if test="owndivno != null" >
- OwnDivNo = #{owndivno,jdbcType=VARCHAR},
- </if>
- <if test="bedlevel != null" >
- BedLevel = #{bedlevel,jdbcType=SMALLINT},
- </if>
- <if test="bedtype != null" >
- BedType = #{bedtype,jdbcType=CHAR},
- </if>
- <if test="locarea != null" >
- LocArea = #{locarea,jdbcType=VARCHAR},
- </if>
- <if test="sexctrl != null" >
- SexCtrl = #{sexctrl,jdbcType=VARCHAR},
- </if>
- <if test="isquery != null" >
- IsQuery = #{isquery,jdbcType=BIT},
- </if>
- <if test="istaint != null" >
- IsTaint = #{istaint,jdbcType=BIT},
- </if>
- <if test="isicu != null" >
- IsICU = #{isicu,jdbcType=BIT},
- </if>
- <if test="chartno != null" >
- ChartNo = #{chartno,jdbcType=VARCHAR},
- </if>
- <if test="ptname != null" >
- PtName = #{ptname,jdbcType=VARCHAR},
- </if>
- <if test="visitno != null" >
- VisitNo = #{visitno,jdbcType=VARCHAR},
- </if>
- <if test="uddtime != null" >
- UDDTime = #{uddtime,jdbcType=TIMESTAMP},
- </if>
- <if test="expandstatus != null" >
- ExpandStatus = #{expandstatus,jdbcType=VARCHAR},
- </if>
- <if test="reserveno != null" >
- ReserveNo = #{reserveno,jdbcType=VARCHAR},
- </if>
- <if test="bedstatue != null" >
- BedStatue = #{bedstatue,jdbcType=VARCHAR},
- </if>
- <if test="printer1 != null" >
- Printer1 = #{printer1,jdbcType=VARCHAR},
- </if>
- <if test="printer2 != null" >
- Printer2 = #{printer2,jdbcType=VARCHAR},
- </if>
- <if test="beditemcode != null" >
- BedItemCode = #{beditemcode,jdbcType=VARCHAR},
- </if>
- <if test="additemcode != null" >
- AddItemCode = #{additemcode,jdbcType=VARCHAR},
- </if>
- <if test="inpitemcode != null" >
- InpItemCode = #{inpitemcode,jdbcType=VARCHAR},
- </if>
- <if test="nurseitemcode != null" >
- NurseItemCode = #{nurseitemcode,jdbcType=VARCHAR},
- </if>
- <if test="drugitemcode != null" >
- DrugItemCode = #{drugitemcode,jdbcType=VARCHAR},
- </if>
- <if test="isdelete != null" >
- IsDelete = #{isdelete,jdbcType=BIT},
- </if>
- <if test="updateuser != null" >
- UpdateUser = #{updateuser,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="patienttype != null" >
- PatientType = #{patienttype,jdbcType=INTEGER},
- </if>
- <if test="roomno != null" >
- RoomNo = #{roomno,jdbcType=VARCHAR},
- </if>
- <if test="bedusestatus != null" >
- BedUseStatus = #{bedusestatus,jdbcType=INTEGER},
- </if>
- </set>
- where BedNo = #{bedno,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.sqlservermodel.Bed" >
- update Bed
- set RoomBed = #{roombed,jdbcType=VARCHAR},
- Ward = #{ward,jdbcType=VARCHAR},
- Zone = #{zone,jdbcType=VARCHAR},
- DepartNo = #{departno,jdbcType=VARCHAR},
- StockLoc = #{stockloc,jdbcType=VARCHAR},
- OwnDivNo = #{owndivno,jdbcType=VARCHAR},
- BedLevel = #{bedlevel,jdbcType=SMALLINT},
- BedType = #{bedtype,jdbcType=CHAR},
- LocArea = #{locarea,jdbcType=VARCHAR},
- SexCtrl = #{sexctrl,jdbcType=VARCHAR},
- IsQuery = #{isquery,jdbcType=BIT},
- IsTaint = #{istaint,jdbcType=BIT},
- IsICU = #{isicu,jdbcType=BIT},
- ChartNo = #{chartno,jdbcType=VARCHAR},
- PtName = #{ptname,jdbcType=VARCHAR},
- VisitNo = #{visitno,jdbcType=VARCHAR},
- UDDTime = #{uddtime,jdbcType=TIMESTAMP},
- ExpandStatus = #{expandstatus,jdbcType=VARCHAR},
- ReserveNo = #{reserveno,jdbcType=VARCHAR},
- BedStatue = #{bedstatue,jdbcType=VARCHAR},
- Printer1 = #{printer1,jdbcType=VARCHAR},
- Printer2 = #{printer2,jdbcType=VARCHAR},
- BedItemCode = #{beditemcode,jdbcType=VARCHAR},
- AddItemCode = #{additemcode,jdbcType=VARCHAR},
- InpItemCode = #{inpitemcode,jdbcType=VARCHAR},
- NurseItemCode = #{nurseitemcode,jdbcType=VARCHAR},
- DrugItemCode = #{drugitemcode,jdbcType=VARCHAR},
- IsDelete = #{isdelete,jdbcType=BIT},
- UpdateUser = #{updateuser,jdbcType=VARCHAR},
- UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
- PatientType = #{patienttype,jdbcType=INTEGER},
- RoomNo = #{roomno,jdbcType=VARCHAR},
- BedUseStatus = #{bedusestatus,jdbcType=INTEGER}
- where BedNo = #{bedno,jdbcType=VARCHAR}
- </update>
- </mapper>
|