123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <?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.pubservice.mysqlmapper.InpPatientAuthorizeMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- <id column="IPA_ID" property="ipaId" jdbcType="INTEGER" />
- <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="IPA_Recordor" property="ipaRecordor" jdbcType="VARCHAR" />
- <result column="IPA_Record_Time" property="ipaRecordTime" jdbcType="TIMESTAMP" />
- <result column="IPA_Type" property="ipaType" jdbcType="INTEGER" />
- <result column="IPA_Status" property="ipaStatus" jdbcType="INTEGER" />
- <result column="IPA_Remark" property="ipaRemark" jdbcType="VARCHAR" />
- <result column="IPA_EndTime" property="ipaEndtime" jdbcType="TIMESTAMP" />
- <result column="IPA_StarTime" property="ipaStartime" jdbcType="TIMESTAMP" />
- <result column="IPA_From_WardDm" property="ipaFromWarddm" jdbcType="VARCHAR" />
- <result column="IPA_To_WardDm" property="ipaToWarddm" jdbcType="VARCHAR" />
- <result column="IPA_To_User" property="ipaToUser" jdbcType="VARCHAR" />
- <result column="IPA_Operation_Time" property="ipaOperationTime" jdbcType="TIMESTAMP" />
- <result column="IPA_Operator" property="ipaOperator" jdbcType="VARCHAR" />
- <result column="IPA_IsDel" property="ipaIsdel" jdbcType="INTEGER" />
- <result column="IPA_Function" property="ipaFunction" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IPA_ID, PatientNo, HI_ID, IPA_Recordor, IPA_Record_Time, IPA_Type, IPA_Status, IPA_Remark,
- IPA_EndTime, IPA_StarTime, IPA_From_WardDm, IPA_To_WardDm, IPA_To_User, IPA_Operation_Time,
- IPA_Operator, IPA_IsDel, IPA_Function
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_patien_authorize
- where IPA_IsDel =0 and IPA_ID = #{ipaId,jdbcType=INTEGER}
- </select>
- <select id="selectTimeAll" resultMap="BaseResultMap" parameterType="com.xinxin.topro.pubservice.request.InpSignatureRequest">
- select
- <include refid="Base_Column_List" />
- from inp_patien_authorize
- where IPA_IsDel = 0
- <if test="beginTime != null" >
- and IPA_StarTime <![CDATA[>=]]> #{beginTime}
- </if>
- <if test="endTime != null" >
- and IPA_StarTime <![CDATA[<=]]>#{endTime}
- </if>
- order by IPA_StarTime desc
- </select>
- <select id="selectPatient" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_patien_authorize
- where IPA_IsDel = 0
- and PatientNo = #{patientNo,jdbcType=VARCHAR}
- and HI_ID = #{hiId,jdbcType=INTEGER}
- order by IPA_StarTime desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_patien_authorize
- where IPA_ID = #{ipaId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- insert into inp_patien_authorize (IPA_ID, PatientNo, HI_ID,
- IPA_Recordor, IPA_Record_Time, IPA_Type,
- IPA_Status, IPA_Remark, IPA_EndTime,
- IPA_StarTime, IPA_From_WardDm, IPA_To_WardDm,
- IPA_To_User, IPA_Operation_Time, IPA_Operator,
- IPA_IsDel, IPA_Function)
- values (#{ipaId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ipaRecordor,jdbcType=VARCHAR}, #{ipaRecordTime,jdbcType=TIMESTAMP}, #{ipaType,jdbcType=INTEGER},
- #{ipaStatus,jdbcType=INTEGER}, #{ipaRemark,jdbcType=VARCHAR}, #{ipaEndtime,jdbcType=TIMESTAMP},
- #{ipaStartime,jdbcType=TIMESTAMP}, #{ipaFromWarddm,jdbcType=VARCHAR}, #{ipaToWarddm,jdbcType=VARCHAR},
- #{ipaToUser,jdbcType=VARCHAR}, #{ipaOperationTime,jdbcType=TIMESTAMP}, #{ipaOperator,jdbcType=VARCHAR},
- #{ipaIsdel,jdbcType=INTEGER}, #{ipaFunction,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- insert into inp_patien_authorize
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ipaId != null" >
- IPA_ID,
- </if>
- <if test="patientno != null" >
- PatientNo,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ipaRecordor != null" >
- IPA_Recordor,
- </if>
- <if test="ipaRecordTime != null" >
- IPA_Record_Time,
- </if>
- <if test="ipaType != null" >
- IPA_Type,
- </if>
- <if test="ipaStatus != null" >
- IPA_Status,
- </if>
- <if test="ipaRemark != null" >
- IPA_Remark,
- </if>
- <if test="ipaEndtime != null" >
- IPA_EndTime,
- </if>
- <if test="ipaStartime != null" >
- IPA_StarTime,
- </if>
- <if test="ipaFromWarddm != null" >
- IPA_From_WardDm,
- </if>
- <if test="ipaToWarddm != null" >
- IPA_To_WardDm,
- </if>
- <if test="ipaToUser != null" >
- IPA_To_User,
- </if>
- <if test="ipaOperationTime != null" >
- IPA_Operation_Time,
- </if>
- <if test="ipaOperator != null" >
- IPA_Operator,
- </if>
- <if test="ipaIsdel != null" >
- IPA_IsDel,
- </if>
- <if test="ipaFunction != null" >
- IPA_Function,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ipaId != null" >
- #{ipaId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null" >
- #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ipaRecordor != null" >
- #{ipaRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipaRecordTime != null" >
- #{ipaRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaType != null" >
- #{ipaType,jdbcType=INTEGER},
- </if>
- <if test="ipaStatus != null" >
- #{ipaStatus,jdbcType=INTEGER},
- </if>
- <if test="ipaRemark != null" >
- #{ipaRemark,jdbcType=VARCHAR},
- </if>
- <if test="ipaEndtime != null" >
- #{ipaEndtime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaStartime != null" >
- #{ipaStartime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaFromWarddm != null" >
- #{ipaFromWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ipaToWarddm != null" >
- #{ipaToWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ipaToUser != null" >
- #{ipaToUser,jdbcType=VARCHAR},
- </if>
- <if test="ipaOperationTime != null" >
- #{ipaOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaOperator != null" >
- #{ipaOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipaIsdel != null" >
- #{ipaIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipaFunction != null" >
- #{ipaFunction,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- update inp_patien_authorize
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=VARCHAR},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ipaRecordor != null" >
- IPA_Recordor = #{ipaRecordor,jdbcType=VARCHAR},
- </if>
- <if test="ipaRecordTime != null" >
- IPA_Record_Time = #{ipaRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaType != null" >
- IPA_Type = #{ipaType,jdbcType=INTEGER},
- </if>
- <if test="ipaStatus != null" >
- IPA_Status = #{ipaStatus,jdbcType=INTEGER},
- </if>
- <if test="ipaRemark != null" >
- IPA_Remark = #{ipaRemark,jdbcType=VARCHAR},
- </if>
- <if test="ipaEndtime != null" >
- IPA_EndTime = #{ipaEndtime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaStartime != null" >
- IPA_StarTime = #{ipaStartime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaFromWarddm != null" >
- IPA_From_WardDm = #{ipaFromWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ipaToWarddm != null" >
- IPA_To_WardDm = #{ipaToWarddm,jdbcType=VARCHAR},
- </if>
- <if test="ipaToUser != null" >
- IPA_To_User = #{ipaToUser,jdbcType=VARCHAR},
- </if>
- <if test="ipaOperationTime != null" >
- IPA_Operation_Time = #{ipaOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ipaOperator != null" >
- IPA_Operator = #{ipaOperator,jdbcType=VARCHAR},
- </if>
- <if test="ipaIsdel != null" >
- IPA_IsDel = #{ipaIsdel,jdbcType=INTEGER},
- </if>
- <if test="ipaFunction != null" >
- IPA_Function = #{ipaFunction,jdbcType=VARCHAR},
- </if>
- </set>
- where IPA_ID = #{ipaId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- update inp_patien_authorize
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- IPA_Recordor = #{ipaRecordor,jdbcType=VARCHAR},
- IPA_Record_Time = #{ipaRecordTime,jdbcType=TIMESTAMP},
- IPA_Type = #{ipaType,jdbcType=INTEGER},
- IPA_Status = #{ipaStatus,jdbcType=INTEGER},
- IPA_Remark = #{ipaRemark,jdbcType=VARCHAR},
- IPA_EndTime = #{ipaEndtime,jdbcType=TIMESTAMP},
- IPA_StarTime = #{ipaStartime,jdbcType=TIMESTAMP},
- IPA_From_WardDm = #{ipaFromWarddm,jdbcType=VARCHAR},
- IPA_To_WardDm = #{ipaToWarddm,jdbcType=VARCHAR},
- IPA_To_User = #{ipaToUser,jdbcType=VARCHAR},
- IPA_Operation_Time = #{ipaOperationTime,jdbcType=TIMESTAMP},
- IPA_Operator = #{ipaOperator,jdbcType=VARCHAR},
- IPA_IsDel = #{ipaIsdel,jdbcType=INTEGER},
- IPA_Function = #{ipaFunction,jdbcType=VARCHAR}
- where IPA_ID = #{ipaId,jdbcType=INTEGER}
- </update>
- <update id="updateIpaStatus" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- update inp_patien_authorize
- set IPA_Status = 1,
- IPA_Operation_Time = #{time,jdbcType=TIMESTAMP},
- IPA_Operator = #{uiCode,jdbcType=VARCHAR}
- where IPA_ID = #{ipaId,jdbcType=INTEGER}
- </update>
- <update id="updateIsDel" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpPatientAuthorize" >
- update inp_patien_authorize
- set IPA_Status = 2,
- IPA_Operation_Time = #{time,jdbcType=TIMESTAMP},
- IPA_Operator = #{uiCode,jdbcType=VARCHAR}
- where IPA_ID = #{ipaId,jdbcType=INTEGER}
- </update>
- </mapper>
|