123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- <?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.InpGuidanceMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidance" >
- <id column="IG_ID" property="igId" jdbcType="INTEGER" />
- <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
- <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="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
- <result column="IG_Guidance_Code" property="igGuidanceCode" jdbcType="VARCHAR" />
- <result column="IG_Guidance_Name" property="igGuidanceName" jdbcType="VARCHAR" />
- <result column="IG_Recordor" property="igRecordor" jdbcType="VARCHAR" />
- <result column="IG_Record_Time" property="igRecordTime" jdbcType="TIMESTAMP" />
- <result column="IG_Del_Reason" property="igDelReason" jdbcType="VARCHAR" />
- <result column="IG_Guiding_Time" property="igGuidingTime" jdbcType="TIMESTAMP" />
- <result column="IG_Guiding_Obiect" property="igGuidingObiect" jdbcType="VARCHAR" />
- <result column="IG_Guiding_Response" property="igGuidingResponse" jdbcType="VARCHAR" />
- <result column="IG_Operation_Time" property="igOperationTime" jdbcType="TIMESTAMP" />
- <result column="IG_Operator" property="igOperator" jdbcType="VARCHAR" />
- <result column="IG_Nurse_Record" property="igNurseRecord" jdbcType="VARCHAR" />
- <result column="IG_IsRecord" property="igIsrecord" jdbcType="INTEGER" />
- <result column="IG_IsDel" property="igIsdel" jdbcType="INTEGER" />
- <result column="IG_Iscomplete" property="igIscomplete" jdbcType="INTEGER" />
- <result column="IG_Original" property="igOriginal" jdbcType="VARCHAR" />
- <result column="IG_Original_ID" property="igOriginalId" jdbcType="INTEGER" />
- <result column="IG_FormerID" property="igFormerId" jdbcType="INTEGER" />
- <result column="IG_Remark" property="igRemark" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IG_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IG_Guidance_Code, IG_Guidance_Name,
- IG_Recordor, IG_Record_Time, IG_Del_Reason, IG_Guiding_Time, IG_Guiding_Obiect, IG_Guiding_Response,
- IG_Operation_Time, IG_Operator, IG_Nurse_Record, IG_IsRecord, IG_IsDel, IG_Iscomplete,IG_Original,
- IG_Original_ID,IG_FormerID,IG_Remark
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0 AND IG_ID = #{igId,jdbcType=INTEGER}
- </select>
- <select id="selectAllIds" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0 AND IG_ID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0 AND PatientNo = #{PatientNo,jdbcType=VARCHAR}
- Order By IG_Guiding_Time DESC
- </select>
- <select id="selectIsEndGuidance" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0 AND IG_Iscomplete = 0 AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- Order By IG_Guiding_Time DESC
- </select>
- <select id="selectPrintAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0 AND PatientNo = #{PatientNo,jdbcType=VARCHAR}
- Order By IG_Guiding_Time ASC
- </select>
- <select id="selectAllList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance
- where IG_IsDel = 0
- Order By IG_Record_Time DESC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_guidance
- where IG_ID = #{igId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidance" >
- insert into inp_guidance (IG_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IG_Guidance_Code, IG_Guidance_Name, IG_Recordor,
- IG_Record_Time, IG_Del_Reason, IG_Guiding_Time,
- IG_Guiding_Obiect, IG_Guiding_Response, IG_Operation_Time,
- IG_Operator, IG_Nurse_Record, IG_IsRecord,
- IG_IsDel,IG_Iscomplete,IG_Original,IG_Original_ID,IG_FormerID,IG_Remark)
- values (#{igId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{igGuidanceCode,jdbcType=VARCHAR}, #{igGuidanceName,jdbcType=VARCHAR}, #{igRecordor,jdbcType=VARCHAR},
- #{igRecordTime,jdbcType=TIMESTAMP}, #{igDelReason,jdbcType=VARCHAR}, #{igGuidingTime,jdbcType=TIMESTAMP},
- #{igGuidingObiect,jdbcType=VARCHAR}, #{igGuidingResponse,jdbcType=VARCHAR}, #{igOperationTime,jdbcType=TIMESTAMP},
- #{igOperator,jdbcType=VARCHAR}, #{igNurseRecord,jdbcType=VARCHAR}, #{igIsrecord,jdbcType=INTEGER},
- #{igIsdel,jdbcType=INTEGER},#{igIscomplete,jdbcType=INTEGER},#{igOriginal,jdbcType=VARCHAR},#{igOriginalId,jdbcType=INTEGER},
- #{igFormerId,jdbcType=INTEGER},#{igRemark,jdbcType=VARCHAR})
- </insert>
- <insert id="batchInsert" parameterType="List" useGeneratedKeys="true" keyProperty="igId" keyColumn="IG_ID">
- insert into inp_guidance (PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IG_Guidance_Code, IG_Guidance_Name, IG_Recordor,
- IG_Record_Time, IG_Del_Reason, IG_Guiding_Time,
- IG_Guiding_Obiect, IG_Guiding_Response, IG_Operation_Time,
- IG_Operator,IG_Original,IG_Original_ID,IG_FormerID,IG_Remark)
- values
- <foreach collection ="list" item="item" index="index" separator =",">
- (#{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER},
- #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR},
- #{item.igGuidanceCode,jdbcType=VARCHAR}, #{item.igGuidanceName,jdbcType=VARCHAR}, #{item.igRecordor,jdbcType=VARCHAR},
- #{item.igRecordTime,jdbcType=TIMESTAMP}, #{item.igDelReason,jdbcType=VARCHAR}, #{item.igGuidingTime,jdbcType=TIMESTAMP},
- #{item.igGuidingObiect,jdbcType=VARCHAR}, #{item.igGuidingResponse,jdbcType=VARCHAR}, now(),
- #{item.igOperator,jdbcType=VARCHAR},#{item.igOriginal,jdbcType=VARCHAR},#{item.igOriginalId,jdbcType=INTEGER},
- #{item.igFormerId,jdbcType=INTEGER},#{item.igRemark,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <insert id="insertSelective" useGeneratedKeys="true" keyProperty="igId" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidance" >
- insert into inp_guidance
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="igId != null" >
- IG_ID,
- </if>
- <if test="patientno != null" >
- PatientNo,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dbBedno != null" >
- DB_BedNo,
- </if>
- <if test="igGuidanceCode != null" >
- IG_Guidance_Code,
- </if>
- <if test="igGuidanceName != null" >
- IG_Guidance_Name,
- </if>
- <if test="igRecordor != null" >
- IG_Recordor,
- </if>
- IG_Record_Time,
- <if test="igDelReason != null" >
- IG_Del_Reason,
- </if>
- <if test="igGuidingTime != null" >
- IG_Guiding_Time,
- </if>
- <if test="igGuidingObiect != null" >
- IG_Guiding_Obiect,
- </if>
- <if test="igGuidingResponse != null" >
- IG_Guiding_Response,
- </if>
- IG_Operation_Time,
- <if test="igOperator != null" >
- IG_Operator,
- </if>
- <if test="igNurseRecord != null" >
- IG_Nurse_Record,
- </if>
- IG_IsRecord,
- <if test="igIsdel != null" >
- IG_IsDel,
- </if>
- <if test="igIscomplete != null" >
- IG_Iscomplete,
- </if>
- <if test="igOriginal != null" >
- IG_Original,
- </if>
- <if test="igOriginalId != null" >
- IG_Original_ID,
- </if>
- <if test="igFormerId != null" >
- IG_FormerID,
- </if>
- <if test="igRemark != null" >
- IG_Remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="igId != null" >
- #{igId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null" >
- #{patientno,jdbcType=VARCHAR},
- </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="dbBedno != null" >
- #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="igGuidanceCode != null" >
- #{igGuidanceCode,jdbcType=VARCHAR},
- </if>
- <if test="igGuidanceName != null" >
- #{igGuidanceName,jdbcType=VARCHAR},
- </if>
- <if test="igRecordor != null" >
- #{igRecordor,jdbcType=VARCHAR},
- </if>
- now(),
- <if test="igDelReason != null" >
- #{igDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igGuidingTime != null" >
- #{igGuidingTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igGuidingObiect != null" >
- #{igGuidingObiect,jdbcType=VARCHAR},
- </if>
- <if test="igGuidingResponse != null" >
- #{igGuidingResponse,jdbcType=VARCHAR},
- </if>
- now(),
- <if test="igOperator != null" >
- #{igOperator,jdbcType=VARCHAR},
- </if>
- <if test="igNurseRecord != null" >
- #{igNurseRecord,jdbcType=VARCHAR},
- </if>
- 0,
- <if test="igIsdel != null" >
- #{igIsdel,jdbcType=INTEGER},
- </if>
- <if test="igIscomplete != null" >
- #{igIscomplete,jdbcType=INTEGER},
- </if>
- <if test="igOriginal != null" >
- #{igOriginal,jdbcType=VARCHAR},
- </if>
- <if test="igOriginalId != null" >
- #{igOriginalId,jdbcType=INTEGER},
- </if>
- <if test="igFormerId != null" >
- #{igFormerId,jdbcType=INTEGER},
- </if>
- <if test="igRemark != null" >
- #{igRemark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidance" >
- update inp_guidance
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=VARCHAR},
- </if>
- <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="dbBedno != null" >
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="igGuidanceCode != null" >
- IG_Guidance_Code = #{igGuidanceCode,jdbcType=VARCHAR},
- </if>
- <if test="igGuidanceName != null" >
- IG_Guidance_Name = #{igGuidanceName,jdbcType=VARCHAR},
- </if>
- <if test="igRecordor != null" >
- IG_Recordor = #{igRecordor,jdbcType=VARCHAR},
- </if>
- <if test="igRecordTime != null" >
- IG_Record_Time = #{igRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igDelReason != null" >
- IG_Del_Reason = #{igDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igGuidingTime != null" >
- IG_Guiding_Time = #{igGuidingTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igGuidingObiect != null" >
- IG_Guiding_Obiect = #{igGuidingObiect,jdbcType=VARCHAR},
- </if>
- <if test="igGuidingResponse != null" >
- IG_Guiding_Response = #{igGuidingResponse,jdbcType=VARCHAR},
- </if>
- <if test="igOperationTime != null" >
- IG_Operation_Time = #{igOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igOperator != null" >
- IG_Operator = #{igOperator,jdbcType=VARCHAR},
- </if>
- <if test="igNurseRecord != null" >
- IG_Nurse_Record = #{igNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="igIsrecord != null" >
- IG_IsRecord = #{igIsrecord,jdbcType=INTEGER},
- </if>
- <if test="igIsdel != null" >
- IG_IsDel = #{igIsdel,jdbcType=INTEGER},
- </if>
- <if test="igIscomplete != null" >
- IG_Iscomplete = #{igIscomplete,jdbcType=INTEGER},
- </if>
- <if test="igFormerId != null" >
- IG_FormerID = #{igFormerId,jdbcType=INTEGER},
- </if>
- <if test="igRemark != null" >
- IG_Remark = #{igRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where IG_ID = #{igId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidance" >
- update inp_guidance
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- IG_Guidance_Code = #{igGuidanceCode,jdbcType=VARCHAR},
- IG_Guidance_Name = #{igGuidanceName,jdbcType=VARCHAR},
- IG_Recordor = #{igRecordor,jdbcType=VARCHAR},
- IG_Record_Time = #{igRecordTime,jdbcType=TIMESTAMP},
- IG_Del_Reason = #{igDelReason,jdbcType=VARCHAR},
- IG_Guiding_Time = #{igGuidingTime,jdbcType=TIMESTAMP},
- IG_Guiding_Obiect = #{igGuidingObiect,jdbcType=VARCHAR},
- IG_Guiding_Response = #{igGuidingResponse,jdbcType=VARCHAR},
- IG_Operation_Time = #{igOperationTime,jdbcType=TIMESTAMP},
- IG_Operator = #{igOperator,jdbcType=VARCHAR},
- IG_Nurse_Record = #{igNurseRecord,jdbcType=VARCHAR},
- IG_IsRecord = #{igIsrecord,jdbcType=INTEGER},
- IG_IsDel = #{igIsdel,jdbcType=INTEGER},
- IG_Iscomplete = #{igIscomplete,jdbcType=INTEGER},
- IG_Remark = #{igRemark,jdbcType=VARCHAR}
- where IG_ID = #{igId,jdbcType=INTEGER}
- </update>
- <update id="batchUpdate" parameterType="java.util.List" >
- update inp_guidance
- set IG_IsDel = -1
- where IG_ID IN
- <foreach collection="list" item="item" separator="," open="(" close=")" index="index">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateBatchResoan" >
- update inp_guidance
- set
- IG_Del_Reason = #{reason,jdbcType=VARCHAR},
- IG_Iscomplete = 1,
- IG_Operation_Time = now(),
- IG_Operator = #{uiCode,jdbcType=VARCHAR}
- where IG_ID IN
- <foreach collection="list" item="item" separator="," open="(" close=")" index="index">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateIsComplete" parameterType="java.lang.Integer" >
- update inp_guidance
- set IG_Iscomplete = 1
- where IG_ID = #{igId,jdbcType=INTEGER}
- </update>
- <update id="updateIsNotComplete" parameterType="java.lang.Integer" >
- update inp_guidance
- set IG_Iscomplete = 0
- where IG_ID = #{igId,jdbcType=INTEGER}
- </update>
- <select id="selectByIgId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
- select
- <include refid="Base_Column_List"/>
- from inp_guidance
- where IG_IsDel = -1 AND IG_ID = #{igId,jdbcType=INTEGER}
- </select>
- </mapper>
|