123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- <?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.InpPlanObjectiveMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanObjective" >
- <id column="IPO_ID" property="ipoId" 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="IPO_Code" property="ipoCode" jdbcType="VARCHAR" />
- <result column="IPO_Name" property="ipoName" jdbcType="VARCHAR" />
- <result column="IPO_Status" property="ipoStatus" jdbcType="INTEGER" />
- <result column="IPO_Recordor" property="ipoRecordor" jdbcType="VARCHAR" />
- <result column="IPO_Record_Time" property="ipoRecordTime" jdbcType="TIMESTAMP" />
- <result column="IPO_Nurse_Record" property="ipoNurseRecord" jdbcType="VARCHAR" />
- <result column="IPO_IsRecord" property="ipoIsrecord" jdbcType="INTEGER" />
- <result column="IPO_Operation_Time" property="ipoOperationTime" jdbcType="TIMESTAMP" />
- <result column="IPO_Operator" property="ipoOperator" jdbcType="VARCHAR" />
- <result column="IPO_IsDel" property="ipoIsdel" jdbcType="INTEGER" />
- <result column="IPO_IsDirection" property="ipoIsdirection" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IPO_ID, IPD_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IPO_Code, IPO_Name,
- IPO_Status, IPO_Recordor, IPO_Record_Time, IPO_Nurse_Record, IPO_IsRecord, IPO_Operation_Time,
- IPO_Operator, IPO_IsDel, IPO_IsDirection
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_IsDel = 0 AND IPO_ID = #{ipoId,jdbcType=INTEGER}
- </select>
- <select id="selectAll" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpPlanSearchInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_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 IPO_ID DESC
- </select>
- <select id="selectByIpdId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_IsDel = 0 AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- ORDER BY IPO_ID DESC
- </select>
- <select id="selectByIpdIdStatus" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpPlanSearchInfoRequest" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_IsDel = 0 AND IPO_Status = 0
- AND IPD_ID = #{ipdID,jdbcType=INTEGER}
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- ORDER BY IPO_ID DESC
- </select>
- <select id="selectByIpoId" resultMap="BaseResultMap" parameterType="java.util.List" >
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_IsDel = 0 AND IPO_ID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- ORDER BY IPO_ID DESC
- </select>
- <select id="selectByIpdIds" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_plan_objective
- where IPO_IsDel = 0 AND IPD_ID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- ORDER BY IPO_ID DESC
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_plan_objective
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanObjective" >
- insert into inp_plan_objective (IPO_ID, IPD_ID, PatientNo,
- HI_ID, DD_DepDm, DW_WardDm,
- DB_BedNo, IPO_Code, IPO_Name,
- IPO_Status, IPO_Recordor, IPO_Record_Time,
- IPO_Nurse_Record, IPO_IsRecord, IPO_Operation_Time,
- IPO_Operator, IPO_IsDel, IPO_IsDirection
- )
- values (#{ipoId,jdbcType=INTEGER}, #{ipdId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR},
- #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR},
- #{dbBedno,jdbcType=VARCHAR}, #{ipoCode,jdbcType=VARCHAR}, #{ipoName,jdbcType=VARCHAR},
- #{ipoStatus,jdbcType=INTEGER}, #{ipoRecordor,jdbcType=VARCHAR}, #{ipoRecordTime,jdbcType=TIMESTAMP},
- #{ipoNurseRecord,jdbcType=VARCHAR}, #{ipoIsrecord,jdbcType=INTEGER}, #{ipoOperationTime,jdbcType=TIMESTAMP},
- #{ipoOperator,jdbcType=VARCHAR}, #{ipoIsdel,jdbcType=INTEGER}, #{ipoIsdirection,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" useGeneratedKeys="true" keyProperty="ipoId" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanObjective" >
- insert into inp_plan_objective
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ipoId != null" >
- IPO_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="ipoCode != null" >
- IPO_Code,
- </if>
- <if test="ipoName != null" >
- IPO_Name,
- </if>
- <if test="ipoStatus != null" >
- IPO_Status,
- </if>
- <if test="ipoRecordor != null" >
- IPO_Recordor,
- </if>
- <if test="ipoRecordTime != null" >
- IPO_Record_Time,
- </if>
- <if test="ipoNurseRecord != null" >
- IPO_Nurse_Record,
- </if>
- <if test="ipoIsrecord != null" >
- IPO_IsRecord,
- </if>
- <if test="ipoOperationTime != null" >
- IPO_Operation_Time,
- </if>
- <if test="ipoOperator != null" >
- IPO_Operator,
- </if>
- <if test="ipoIsdel != null" >
- IPO_IsDel,
- </if>
- <if test="ipoIsdirection != null" >
- IPO_IsDirection,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ipoId != null" >
- #{ipoId,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="ipoCode != null" >
- #{ipoCode,jdbcType=VARCHAR},
- </if>
- <if test="ipoName != null" >
- #{ipoName,jdbcType=VARCHAR},
- </if>
- <if test="ipoStatus != null" >
- #{ipoStatus,jdbcType=INTEGER},
- </if>
- <if test="ipoRecordor != null" >
- #{ipoRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipoRecordTime != null" >
- #{ipoRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipoNurseRecord != null" >
- #{ipoNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipoIsrecord != null" >
- #{ipoIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipoOperationTime != null" >
- #{ipoOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipoOperator != null" >
- #{ipoOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipoIsdel != null" >
- #{ipoIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipoIsdirection != null" >
- #{ipoIsdirection,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanObjective" >
- update inp_plan_objective
- <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="ipoCode != null" >
- IPO_Code = #{ipoCode,jdbcType=VARCHAR},
- </if>
- <if test="ipoName != null" >
- IPO_Name = #{ipoName,jdbcType=VARCHAR},
- </if>
- <if test="ipoStatus != null" >
- IPO_Status = #{ipoStatus,jdbcType=INTEGER},
- </if>
- <if test="ipoRecordor != null" >
- IPO_Recordor = #{ipoRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipoRecordTime != null" >
- IPO_Record_Time = #{ipoRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipoNurseRecord != null" >
- IPO_Nurse_Record = #{ipoNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="ipoIsrecord != null" >
- IPO_IsRecord = #{ipoIsrecord,jdbcType=INTEGER},
- </if>
- <if test="ipoOperationTime != null" >
- IPO_Operation_Time = #{ipoOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipoOperator != null" >
- IPO_Operator = #{ipoOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipoIsdel != null" >
- IPO_IsDel = #{ipoIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipoIsdirection != null" >
- IPO_IsDirection = #{ipoIsdirection,jdbcType=INTEGER},
- </if>
- </set>
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpPlanObjective" >
- update inp_plan_objective
- 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},
- IPO_Code = #{ipoCode,jdbcType=VARCHAR},
- IPO_Name = #{ipoName,jdbcType=VARCHAR},
- IPO_Status = #{ipoStatus,jdbcType=INTEGER},
- IPO_Recordor = #{ipoRecordor,jdbcType=VARCHAR},
- IPO_Record_Time = #{ipoRecordTime,jdbcType=TIMESTAMP},
- IPO_Nurse_Record = #{ipoNurseRecord,jdbcType=VARCHAR},
- IPO_IsRecord = #{ipoIsrecord,jdbcType=INTEGER},
- IPO_Operation_Time = #{ipoOperationTime,jdbcType=TIMESTAMP},
- IPO_Operator = #{ipoOperator,jdbcType=VARCHAR},
- IPO_IsDel = #{ipoIsdel,jdbcType=INTEGER},
- IPO_IsDirection = #{ipoIsdirection,jdbcType=INTEGER}
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </update>
- <update id="updateStatus" parameterType="java.lang.Integer" >
- update inp_plan_objective
- set IPO_IsDel = -1
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </update>
- <update id="updateStatusIpdId" parameterType="java.lang.Integer" >
- update inp_plan_objective
- set IPO_IsDel = -1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- <update id="updateObjectStatus" parameterType="java.lang.Integer" >
- update inp_plan_objective
- set IPO_Status = 1
- where IPO_ID = #{ipoId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatus" parameterType="java.lang.Integer" >
- update inp_plan_objective
- set IPO_Status = 1
- where IPD_ID = #{ipdId,jdbcType=INTEGER}
- </update>
- <update id="updateByStatusIpdIds">
- update inp_plan_objective
- set IPO_Status = 1
- where IPD_ID in
- <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|