123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <?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.InpPlanCauseMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanCause" >
- <id column="IPC_ID" property="ipcId" jdbcType="INTEGER" />
- <result column="IPD_ID" property="ipdId" 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="IPC_Code" property="ipcCode" jdbcType="VARCHAR" />
- <result column="IPC_Name" property="ipcName" jdbcType="VARCHAR" />
- <result column="IPC_Status" property="ipcStatus" jdbcType="INTEGER" />
- <result column="IPC_Recordor" property="ipcRecordor" jdbcType="VARCHAR" />
- <result column="IPC_Record_Time" property="ipcRecordTime" jdbcType="TIMESTAMP" />
- <result column="IPC_Nurse_Record" property="ipcNurseRecord" jdbcType="VARCHAR" />
- <result column="IPC_IsRecord" property="ipcIsrecord" jdbcType="INTEGER" />
- <result column="IPC_Operation_Time" property="ipcOperationTime" jdbcType="TIMESTAMP" />
- <result column="IPC_Operator" property="ipcOperator" jdbcType="VARCHAR" />
- <result column="IPC_IsDel" property="ipcIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IPC_ID, IPD_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IPC_Code, IPC_Name,
- IPC_Status, IPC_Recordor, IPC_Record_Time, IPC_Nurse_Record, IPC_IsRecord, IPC_Operation_Time,
- IPC_Operator, IPC_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_cause
- where IPC_IsDel = 0 AND IPC_ID = #{ipcId,jdbcType=INTEGER}
- </select>
- <select id="selectAll" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpPlanSearchInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_cause
- where IPC_IsDel = 0
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="ipdID != null" >
- AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- </if>
- <if test="ids != null" >
- AND IPD_ID IN
- <foreach item='item' index='index' collection='ids' open='(' separator=',' close=')'>
- #{item}
- </foreach>
- </if>
- ORDER BY IPC_ID DESC
- </select>
- <select id="selectByIpdId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_cause
- where IPC_IsDel = 0 AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- ORDER BY IPC_ID DESC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_plan_cause
- where IPC_ID = #{ipcId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanCause" >
- insert into inp_plan_cause (IPC_ID, IPD_ID, PatientNo,
- HI_ID, DD_DepDm, DW_WardDm,
- DB_BedNo, IPC_Code, IPC_Name,
- IPC_Status, IPC_Recordor, IPC_Record_Time,
- IPC_Nurse_Record, IPC_IsRecord, IPC_Operation_Time,
- IPC_Operator, IPC_IsDel)
- values (#{ipcId,jdbcType=INTEGER}, #{ipdId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR},
- #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR},
- #{dbBedno,jdbcType=VARCHAR}, #{ipcCode,jdbcType=VARCHAR}, #{ipcName,jdbcType=VARCHAR},
- #{ipcStatus,jdbcType=INTEGER}, #{ipcRecordor,jdbcType=VARCHAR}, #{ipcRecordTime,jdbcType=TIMESTAMP},
- #{ipcNurseRecord,jdbcType=VARCHAR}, #{ipcIsrecord,jdbcType=INTEGER}, #{ipcOperationTime,jdbcType=TIMESTAMP},
- #{ipcOperator,jdbcType=VARCHAR}, #{ipcIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertByBatch" parameterType="java.util.List" >
- insert into inp_plan_cause (IPD_ID, PatientNo,
- HI_ID, DD_DepDm, DW_WardDm,
- DB_BedNo, IPC_Code, IPC_Name,
- IPC_Recordor, IPC_Record_Time,
- IPC_Operation_Time, IPC_Operator)
- values
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.ipdId,jdbcType=INTEGER}, #{item.patientno,jdbcType=INTEGER},
- #{item.hiId,jdbcType=INTEGER}, #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR},
- #{item.dbBedno,jdbcType=VARCHAR}, #{item.ipcCode,jdbcType=VARCHAR}, #{item.ipcName,jdbcType=VARCHAR},
- #{item.ipcRecordor,jdbcType=VARCHAR}, #{item.ipcRecordTime,jdbcType=TIMESTAMP},
- now(),#{item.ipcOperator,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanCause" >
- insert into inp_plan_cause
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ipcId != null" >
- IPC_ID,
- </if>
- <if test="ipdId != null" >
- IPD_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="ipcCode != null" >
- IPC_Code,
- </if>
- <if test="ipcName != null" >
- IPC_Name,
- </if>
- <if test="ipcStatus != null" >
- IPC_Status,
- </if>
- <if test="ipcRecordor != null" >
- IPC_Recordor,
- </if>
- <if test="ipcRecordTime != null" >
- IPC_Record_Time,
- </if>
- <if test="ipcNurseRecord != null" >
- IPC_Nurse_Record,
- </if>
- <if test="ipcIsrecord != null" >
- IPC_IsRecord,
- </if>
- <if test="ipcOperationTime != null" >
- IPC_Operation_Time,
- </if>
- <if test="ipcOperator != null" >
- IPC_Operator,
- </if>
- <if test="ipcIsdel != null" >
- IPC_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ipcId != null" >
- #{ipcId,jdbcType=INTEGER},
- </if>
- <if test="ipdId != null" >
- #{ipdId,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="ipcCode != null" >
- #{ipcCode,jdbcType=VARCHAR},
- </if>
- <if test="ipcName != null" >
- #{ipcName,jdbcType=VARCHAR},
- </if>
- <if test="ipcStatus != null" >
- #{ipcStatus,jdbcType=INTEGER},
- </if>
- <if test="ipcRecordor != null" >
- #{ipcRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipcRecordTime != null" >
- #{ipcRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipcNurseRecord != null" >
- #{ipcNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipcIsrecord != null" >
- #{ipcIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipcOperationTime != null" >
- #{ipcOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipcOperator != null" >
- #{ipcOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipcIsdel != null" >
- #{ipcIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanCause" >
- update inp_plan_cause
- <set >
- <if test="ipdId != null" >
- IPD_ID = #{ipdId,jdbcType=INTEGER},
- </if>
- <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="ipcCode != null" >
- IPC_Code = #{ipcCode,jdbcType=VARCHAR},
- </if>
- <if test="ipcName != null" >
- IPC_Name = #{ipcName,jdbcType=VARCHAR},
- </if>
- <if test="ipcStatus != null" >
- IPC_Status = #{ipcStatus,jdbcType=INTEGER},
- </if>
- <if test="ipcRecordor != null" >
- IPC_Recordor = #{ipcRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipcRecordTime != null" >
- IPC_Record_Time = #{ipcRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipcNurseRecord != null" >
- IPC_Nurse_Record = #{ipcNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipcIsrecord != null" >
- IPC_IsRecord = #{ipcIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipcOperationTime != null" >
- IPC_Operation_Time = #{ipcOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipcOperator != null" >
- IPC_Operator = #{ipcOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipcIsdel != null" >
- IPC_IsDel = #{ipcIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where IPC_ID = #{ipcId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanCause" >
- update inp_plan_cause
- set IPD_ID = #{ipdId,jdbcType=INTEGER},
- PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- IPC_Code = #{ipcCode,jdbcType=VARCHAR},
- IPC_Name = #{ipcName,jdbcType=VARCHAR},
- IPC_Status = #{ipcStatus,jdbcType=INTEGER},
- IPC_Recordor = #{ipcRecordor,jdbcType=VARCHAR},
- IPC_Record_Time = #{ipcRecordTime,jdbcType=TIMESTAMP},
- IPC_Nurse_Record = #{ipcNurseRecord,jdbcType=VARCHAR},
- IPC_IsRecord = #{ipcIsrecord,jdbcType=INTEGER},
- IPC_Operation_Time = #{ipcOperationTime,jdbcType=TIMESTAMP},
- IPC_Operator = #{ipcOperator,jdbcType=VARCHAR},
- IPC_IsDel = #{ipcIsdel,jdbcType=INTEGER}
- where IPC_ID = #{ipcId,jdbcType=INTEGER}
- </update>
- <update id="updateStatus" parameterType="java.lang.Integer" >
- update inp_plan_cause
- set IPC_IsDel = -1
- where IPC_ID = #{ipcId,jdbcType=INTEGER}
- </update>
- <update id="updateStatusIpdId" parameterType="java.lang.Integer" >
- update inp_plan_cause
- set IPC_IsDel = -1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- <update id="updateIpcStatus" parameterType="java.lang.Integer" >
- update inp_plan_cause
- set IPC_Status = 1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- </mapper>
|