123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- <?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.InpPlanMeasureMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanMeasure" >
- <id column="IPM_ID" property="ipmId" jdbcType="INTEGER" />
- <result column="IPD_ID" property="ipdId" jdbcType="INTEGER" />
- <result column="IPO_ID" property="ipoId" 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="IPM_Code" property="ipmCode" jdbcType="VARCHAR" />
- <result column="IPM_Name" property="ipmName" jdbcType="VARCHAR" />
- <result column="IPM_Type" property="ipmType" jdbcType="INTEGER" />
- <result column="IPM_Status" property="ipmStatus" jdbcType="INTEGER" />
- <result column="IPM_Recordor" property="ipmRecordor" jdbcType="VARCHAR" />
- <result column="IPM_Record_Time" property="ipmRecordTime" jdbcType="TIMESTAMP" />
- <result column="IPM_Nurse_Record" property="ipmNurseRecord" jdbcType="VARCHAR" />
- <result column="IPM_IsRecord" property="ipmIsrecord" jdbcType="INTEGER" />
- <result column="IPM_Operation_Time" property="ipmOperationTime" jdbcType="TIMESTAMP" />
- <result column="IPM_Operator" property="ipmOperator" jdbcType="VARCHAR" />
- <result column="IPM_IsDel" property="ipmIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IPM_ID, IPD_ID, IPO_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IPM_Code,
- IPM_Name, IPM_Type, IPM_Status, IPM_Recordor, IPM_Record_Time, IPM_Nurse_Record,
- IPM_IsRecord, IPM_Operation_Time, IPM_Operator, IPM_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_measure
- where IPM_IsDel = 0 AND IPM_ID = #{ipmId,jdbcType=INTEGER}
- </select>
- <select id="selectByIds" resultMap="BaseResultMap" parameterType="java.util.List" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_measure
- where IPM_IsDel = 0
- AND IPM_ID IN
- <foreach collection="list" item="item" index="index" open='(' separator=',' close=')'>
- #{item,jdbcType=INTEGER}
- </foreach>
- </select>
- <select id="selectAll" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpPlanMeasureInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_measure
- where IPM_IsDel = 0
- <if test="ipdID != null" >
- AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- </if>
- <if test="ipoID != null" >
- AND IPO_ID = #{ipoID,jdbcType=INTEGER}
- </if>
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="list != null" >
- AND IPD_ID in <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </if>
- ORDER BY IPM_ID DESC
- </select>
- <select id="selectAllList" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpPlanSearchInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_measure
- where IPM_IsDel = 0
- <if test="ipdID != null" >
- AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- </if>
- <if test="patientNo != null" >
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="ids != null" >
- AND IPD_ID in <foreach collection="ids" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </if>
- ORDER BY IPM_ID DESC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_plan_measure
- where IPM_ID = #{ipmId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanMeasure" >
- insert into inp_plan_measure (IPM_ID, IPD_ID, IPO_ID,
- PatientNo, HI_ID, DD_DepDm,
- DW_WardDm, DB_BedNo, IPM_Code,
- IPM_Name, IPM_Type, IPM_Status,
- IPM_Recordor, IPM_Record_Time, IPM_Nurse_Record,
- IPM_IsRecord, IPM_Operation_Time, IPM_Operator,
- IPM_IsDel)
- values (#{ipmId,jdbcType=INTEGER}, #{ipdId,jdbcType=INTEGER}, #{ipoId,jdbcType=INTEGER},
- #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR},
- #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR}, #{ipmCode,jdbcType=VARCHAR},
- #{ipmName,jdbcType=VARCHAR}, #{ipmType,jdbcType=INTEGER}, #{ipmStatus,jdbcType=INTEGER},
- #{ipmRecordor,jdbcType=VARCHAR}, #{ipmRecordTime,jdbcType=TIMESTAMP}, #{ipmNurseRecord,jdbcType=VARCHAR},
- #{ipmIsrecord,jdbcType=INTEGER}, #{ipmOperationTime,jdbcType=TIMESTAMP}, #{ipmOperator,jdbcType=VARCHAR},
- #{ipmIsdel,jdbcType=INTEGER})
- </insert>
- <insert id="insertByBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="ipmId" keyColumn="IPM_ID">
- insert into inp_plan_measure (IPD_ID, IPO_ID,
- PatientNo, HI_ID, DD_DepDm,
- DW_WardDm, DB_BedNo, IPM_Code,
- IPM_Name, IPM_Recordor, IPM_Record_Time, IPM_Operation_Time, IPM_Operator)
- values
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.ipdId,jdbcType=INTEGER}, #{item.ipoId,jdbcType=INTEGER},
- #{item.patientno,jdbcType=INTEGER}, #{item.hiId,jdbcType=INTEGER}, #{item.ddDepdm,jdbcType=VARCHAR},
- #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR}, #{item.ipmCode,jdbcType=VARCHAR},
- #{item.ipmName,jdbcType=VARCHAR}, #{item.ipmRecordor,jdbcType=VARCHAR}, #{item.ipmRecordTime,jdbcType=TIMESTAMP}, now(), #{item.ipmOperator,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanMeasure" >
- insert into inp_plan_measure
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ipmId != null" >
- IPM_ID,
- </if>
- <if test="ipdId != null" >
- IPD_ID,
- </if>
- <if test="ipoId != null" >
- IPO_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="ipmCode != null" >
- IPM_Code,
- </if>
- <if test="ipmName != null" >
- IPM_Name,
- </if>
- <if test="ipmType != null" >
- IPM_Type,
- </if>
- <if test="ipmStatus != null" >
- IPM_Status,
- </if>
- <if test="ipmRecordor != null" >
- IPM_Recordor,
- </if>
- <if test="ipmRecordTime != null" >
- IPM_Record_Time,
- </if>
- <if test="ipmNurseRecord != null" >
- IPM_Nurse_Record,
- </if>
- <if test="ipmIsrecord != null" >
- IPM_IsRecord,
- </if>
- <if test="ipmOperationTime != null" >
- IPM_Operation_Time,
- </if>
- <if test="ipmOperator != null" >
- IPM_Operator,
- </if>
- <if test="ipmIsdel != null" >
- IPM_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ipmId != null" >
- #{ipmId,jdbcType=INTEGER},
- </if>
- <if test="ipdId != null" >
- #{ipdId,jdbcType=INTEGER},
- </if>
- <if test="ipoId != null" >
- #{ipoId,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="ipmCode != null" >
- #{ipmCode,jdbcType=VARCHAR},
- </if>
- <if test="ipmName != null" >
- #{ipmName,jdbcType=VARCHAR},
- </if>
- <if test="ipmType != null" >
- #{ipmType,jdbcType=INTEGER},
- </if>
- <if test="ipmStatus != null" >
- #{ipmStatus,jdbcType=INTEGER},
- </if>
- <if test="ipmRecordor != null" >
- #{ipmRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipmRecordTime != null" >
- #{ipmRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipmNurseRecord != null" >
- #{ipmNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipmIsrecord != null" >
- #{ipmIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipmOperationTime != null" >
- #{ipmOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipmOperator != null" >
- #{ipmOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipmIsdel != null" >
- #{ipmIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanMeasure" >
- update inp_plan_measure
- <set >
- <if test="ipdId != null" >
- IPD_ID = #{ipdId,jdbcType=INTEGER},
- </if>
- <if test="ipoId != null" >
- IPO_ID = #{ipoId,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="ipmCode != null" >
- IPM_Code = #{ipmCode,jdbcType=VARCHAR},
- </if>
- <if test="ipmName != null" >
- IPM_Name = #{ipmName,jdbcType=VARCHAR},
- </if>
- <if test="ipmType != null" >
- IPM_Type = #{ipmType,jdbcType=INTEGER},
- </if>
- <if test="ipmStatus != null" >
- IPM_Status = #{ipmStatus,jdbcType=INTEGER},
- </if>
- <if test="ipmRecordor != null" >
- IPM_Recordor = #{ipmRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipmRecordTime != null" >
- IPM_Record_Time = #{ipmRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipmNurseRecord != null" >
- IPM_Nurse_Record = #{ipmNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipmIsrecord != null" >
- IPM_IsRecord = #{ipmIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipmOperationTime != null" >
- IPM_Operation_Time = #{ipmOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipmOperator != null" >
- IPM_Operator = #{ipmOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipmIsdel != null" >
- IPM_IsDel = #{ipmIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where IPM_ID = #{ipmId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanMeasure" >
- update inp_plan_measure
- set IPD_ID = #{ipdId,jdbcType=INTEGER},
- IPO_ID = #{ipoId,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},
- IPM_Code = #{ipmCode,jdbcType=VARCHAR},
- IPM_Name = #{ipmName,jdbcType=VARCHAR},
- IPM_Type = #{ipmType,jdbcType=INTEGER},
- IPM_Status = #{ipmStatus,jdbcType=INTEGER},
- IPM_Recordor = #{ipmRecordor,jdbcType=VARCHAR},
- IPM_Record_Time = #{ipmRecordTime,jdbcType=TIMESTAMP},
- IPM_Nurse_Record = #{ipmNurseRecord,jdbcType=VARCHAR},
- IPM_IsRecord = #{ipmIsrecord,jdbcType=INTEGER},
- IPM_Operation_Time = #{ipmOperationTime,jdbcType=TIMESTAMP},
- IPM_Operator = #{ipmOperator,jdbcType=VARCHAR},
- IPM_IsDel = #{ipmIsdel,jdbcType=INTEGER}
- where IPM_ID = #{ipmId,jdbcType=INTEGER}
- </update>
- <update id="updateStatusList" parameterType="java.util.List" >
- update inp_plan_measure
- set IPM_Status = 1
- where IPM_ID IN
- <foreach collection="list" item="item" separator="," open="(" close=")" index="index">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateBatchStatus" parameterType="java.util.List" >
- update inp_plan_measure
- set IPM_IsDel = -1
- where IPM_ID in
- <foreach collection="list" item="item" separator="," open="(" close=")" index="index">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateStatusIpdId" parameterType="java.lang.Integer" >
- update inp_plan_measure
- set IPM_IsDel = -1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- <update id="updateStatusIpoId" parameterType="java.lang.Integer" >
- update inp_plan_measure
- set IPM_IsDel = -1
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </update>
- <update id="updateIpmStatus" parameterType="java.lang.Integer" >
- update inp_plan_measure
- set IPM_Status = 1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- </mapper>
|