123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <?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.InpGuidanceProjectMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceProject" >
- <id column="IGP_ID" property="igpId" jdbcType="INTEGER" />
- <result column="IG_ID" property="igId" jdbcType="INTEGER" />
- <result column="IGP_Project_Code" property="igpProjectCode" jdbcType="INTEGER" />
- <result column="IGP_Project_Name" property="igpProjectName" jdbcType="VARCHAR" />
- <result column="IGP_Recordor" property="igpRecordor" jdbcType="VARCHAR" />
- <result column="IGP_Record_Time" property="igpRecordTime" jdbcType="TIMESTAMP" />
- <result column="IGP_Del_Reason" property="igpDelReason" jdbcType="VARCHAR" />
- <result column="IGP_Operation_Time" property="igpOperationTime" jdbcType="TIMESTAMP" />
- <result column="IGP_Operator" property="igpOperator" jdbcType="VARCHAR" />
- <result column="IGP_Nurse_Record" property="igpNurseRecord" jdbcType="VARCHAR" />
- <result column="IGP_IsRecord" property="igpIsrecord" jdbcType="INTEGER" />
- <result column="IGP_IsDel" property="igpIsdel" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- IGP_ID, IG_ID, IGP_Project_Code, IGP_Project_Name, IGP_Recordor, IGP_Record_Time,
- IGP_Del_Reason, IGP_Operation_Time, IGP_Operator, IGP_Nurse_Record, IGP_IsRecord,
- IGP_IsDel
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance_project
- where IGP_IsDel = 0 AND IGP_ID = #{igpId,jdbcType=INTEGER}
- </select>
- <select id="selectByIgId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance_project
- where IGP_IsDel = 0 AND IG_ID = #{igId,jdbcType=INTEGER}
- </select>
- <select id="selectByIgIdList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance_project
- where IGP_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">
- select
- <include refid="Base_Column_List" />
- from inp_guidance_project
- where IGP_IsDel = 0
- </select>
- <select id="selectIsComplete" resultMap="BaseResultMap">
- select
- igp.*
- from inp_guidance_project igp
- inner join inp_guidance ig on igp.IG_ID = ig.IG_ID
- where igp.IGP_IsDel = 0 AND ig.IG_IsDel = 0 AND ig.PatientNo = #{patientNo,jdbcType=VARCHAR}
- AND ig.IG_Iscomplete = #{status,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_guidance_project
- where IGP_ID = #{igpId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceProject" >
- insert into inp_guidance_project (IGP_ID, IG_ID, IGP_Project_Code,
- IGP_Project_Name, IGP_Recordor, IGP_Record_Time,
- IGP_Del_Reason, IGP_Operation_Time, IGP_Operator,
- IGP_Nurse_Record, IGP_IsRecord, IGP_IsDel
- )
- values (#{igpId,jdbcType=INTEGER}, #{igId,jdbcType=INTEGER}, #{igpProjectCode,jdbcType=INTEGER},
- #{igpProjectName,jdbcType=VARCHAR}, #{igpRecordor,jdbcType=VARCHAR}, #{igpRecordTime,jdbcType=TIMESTAMP},
- #{igpDelReason,jdbcType=VARCHAR}, #{igpOperationTime,jdbcType=TIMESTAMP}, #{igpOperator,jdbcType=VARCHAR},
- #{igpNurseRecord,jdbcType=VARCHAR}, #{igpIsrecord,jdbcType=INTEGER}, #{igpIsdel,jdbcType=INTEGER}
- )
- </insert>
- <insert id="batchInsert" parameterType="java.util.List" >
- insert into inp_guidance_project (IG_ID, IGP_Project_Code,
- IGP_Project_Name, IGP_Recordor, IGP_Record_Time,
- IGP_Operation_Time, IGP_Operator,
- IGP_Nurse_Record, IGP_IsRecord
- )
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.igId,jdbcType=INTEGER}, #{item.igpProjectCode,jdbcType=INTEGER},
- #{item.igpProjectName,jdbcType=VARCHAR}, #{item.igpRecordor,jdbcType=VARCHAR}, #{item.igpRecordTime,jdbcType=TIMESTAMP},
- now(), #{item.igpOperator,jdbcType=VARCHAR},
- #{item.igpNurseRecord,jdbcType=VARCHAR}, 0)
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceProject" >
- insert into inp_guidance_project
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="igpId != null" >
- IGP_ID,
- </if>
- <if test="igId != null" >
- IG_ID,
- </if>
- <if test="igpProjectCode != null" >
- IGP_Project_Code,
- </if>
- <if test="igpProjectName != null" >
- IGP_Project_Name,
- </if>
- <if test="igpRecordor != null" >
- IGP_Recordor,
- </if>
- <if test="igpRecordTime != null" >
- IGP_Record_Time,
- </if>
- <if test="igpDelReason != null" >
- IGP_Del_Reason,
- </if>
- <if test="igpOperationTime != null" >
- IGP_Operation_Time,
- </if>
- <if test="igpOperator != null" >
- IGP_Operator,
- </if>
- <if test="igpNurseRecord != null" >
- IGP_Nurse_Record,
- </if>
- <if test="igpIsrecord != null" >
- IGP_IsRecord,
- </if>
- <if test="igpIsdel != null" >
- IGP_IsDel,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="igpId != null" >
- #{igpId,jdbcType=INTEGER},
- </if>
- <if test="igId != null" >
- #{igId,jdbcType=INTEGER},
- </if>
- <if test="igpProjectCode != null" >
- #{igpProjectCode,jdbcType=INTEGER},
- </if>
- <if test="igpProjectName != null" >
- #{igpProjectName,jdbcType=VARCHAR},
- </if>
- <if test="igpRecordor != null" >
- #{igpRecordor,jdbcType=VARCHAR},
- </if>
- <if test="igpRecordTime != null" >
- #{igpRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igpDelReason != null" >
- #{igpDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igpOperationTime != null" >
- #{igpOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igpOperator != null" >
- #{igpOperator,jdbcType=VARCHAR},
- </if>
- <if test="igpNurseRecord != null" >
- #{igpNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="igpIsrecord != null" >
- #{igpIsrecord,jdbcType=INTEGER},
- </if>
- <if test="igpIsdel != null" >
- #{igpIsdel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceProject" >
- update inp_guidance_project
- <set >
- <if test="igId != null" >
- IG_ID = #{igId,jdbcType=INTEGER},
- </if>
- <if test="igpProjectCode != null" >
- IGP_Project_Code = #{igpProjectCode,jdbcType=INTEGER},
- </if>
- <if test="igpProjectName != null" >
- IGP_Project_Name = #{igpProjectName,jdbcType=VARCHAR},
- </if>
- <if test="igpRecordor != null" >
- IGP_Recordor = #{igpRecordor,jdbcType=VARCHAR},
- </if>
- <if test="igpRecordTime != null" >
- IGP_Record_Time = #{igpRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igpDelReason != null" >
- IGP_Del_Reason = #{igpDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igpOperationTime != null" >
- IGP_Operation_Time = #{igpOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igpOperator != null" >
- IGP_Operator = #{igpOperator,jdbcType=VARCHAR},
- </if>
- <if test="igpNurseRecord != null" >
- IGP_Nurse_Record = #{igpNurseRecord,jdbcType=VARCHAR},
- </if>
- <if test="igpIsrecord != null" >
- IGP_IsRecord = #{igpIsrecord,jdbcType=INTEGER},
- </if>
- <if test="igpIsdel != null" >
- IGP_IsDel = #{igpIsdel,jdbcType=INTEGER},
- </if>
- </set>
- where IGP_ID = #{igpId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceProject" >
- update inp_guidance_project
- set IG_ID = #{igId,jdbcType=INTEGER},
- IGP_Project_Code = #{igpProjectCode,jdbcType=INTEGER},
- IGP_Project_Name = #{igpProjectName,jdbcType=VARCHAR},
- IGP_Recordor = #{igpRecordor,jdbcType=VARCHAR},
- IGP_Record_Time = #{igpRecordTime,jdbcType=TIMESTAMP},
- IGP_Del_Reason = #{igpDelReason,jdbcType=VARCHAR},
- IGP_Operation_Time = #{igpOperationTime,jdbcType=TIMESTAMP},
- IGP_Operator = #{igpOperator,jdbcType=VARCHAR},
- IGP_Nurse_Record = #{igpNurseRecord,jdbcType=VARCHAR},
- IGP_IsRecord = #{igpIsrecord,jdbcType=INTEGER},
- IGP_IsDel = #{igpIsdel,jdbcType=INTEGER}
- where IGP_ID = #{igpId,jdbcType=INTEGER}
- </update>
- <update id="updateStatus" parameterType="java.lang.Integer" >
- update inp_guidance_project
- set
- IGP_IsDel = -1
- where IG_ID = #{igId,jdbcType=INTEGER}
- </update>
- </mapper>
|