123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653 |
- <?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.InpScheduleMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule" >
- <id column="IS_ID" property="isId" 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="IS_Code" property="isCode" jdbcType="VARCHAR" />
- <result column="IS_Name" property="isName" jdbcType="VARCHAR" />
- <result column="IS_Review_Reason" property="isReviewReason" jdbcType="VARCHAR" />
- <result column="IS_Review_Time" property="isReviewTime" jdbcType="TIMESTAMP" />
- <result column="IS_Remark" property="isRemark" jdbcType="VARCHAR" />
- <result column="IS_Time_Point" property="isTimePoint" jdbcType="VARCHAR" />
- <result column="IS_Recorder" property="isRecorder" jdbcType="VARCHAR" />
- <result column="IS_Record_Time" property="isRecordTime" jdbcType="TIMESTAMP" />
- <result column="IS_IsReview" property="isIsreview" jdbcType="INTEGER" />
- <result column="IS_Operator" property="isOperator" jdbcType="VARCHAR" />
- <result column="IS_Operat_Time" property="isOperatTime" jdbcType="TIMESTAMP" />
- <result column="IS_Review_ID" property="isReviewId" jdbcType="VARCHAR" />
- <result column="IS_Review_Source" property="isReviewSource" jdbcType="VARCHAR" />
- <result column="IS_Degree" property="isDegree" jdbcType="VARCHAR" />
- <result column="IS_IsDel" property="isIsdel" jdbcType="INTEGER" />
- <result column="IS_Start_Time" property="isStartTime" jdbcType="TIMESTAMP"/>
- <result column="IS_End_Time" property="isEndTime" jdbcType="TIMESTAMP"/>
- </resultMap>
- <sql id="Base_Column_List" >
- IS_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IS_Code, IS_Name, IS_Review_Reason,
- IS_Review_Time, IS_Remark, IS_Time_Point, IS_Recorder, IS_Record_Time, IS_IsReview,
- IS_Operator, IS_Operat_Time, IS_Review_ID, IS_Review_Source, IS_Degree, IS_IsDel,IS_Start_Time,IS_End_Time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_schedule
- where IS_ID = #{isId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_schedule
- where IS_ID = #{isId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule" >
- insert into inp_schedule (IS_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IS_Code, IS_Name, IS_Review_Reason,
- IS_Review_Time, IS_Remark, IS_Time_Point,
- IS_Recorder, IS_Record_Time, IS_IsReview,
- IS_Operator, IS_Operat_Time, IS_Review_ID,
- IS_Review_Source, IS_Degree, IS_IsDel,IS_Start_Time,IS_End_Time
- )
- values (#{isId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{isCode,jdbcType=VARCHAR}, #{isName,jdbcType=VARCHAR}, #{isReviewReason,jdbcType=VARCHAR},
- #{isReviewTime,jdbcType=TIMESTAMP}, #{isRemark,jdbcType=VARCHAR}, #{isTimePoint,jdbcType=VARCHAR},
- #{isRecorder,jdbcType=VARCHAR}, #{isRecordTime,jdbcType=TIMESTAMP}, #{isIsreview,jdbcType=INTEGER},
- #{isOperator,jdbcType=VARCHAR}, #{isOperatTime,jdbcType=TIMESTAMP}, #{isReviewId,jdbcType=VARCHAR},
- #{isReviewSource,jdbcType=VARCHAR}, #{isDegree,jdbcType=VARCHAR}, #{isIsdel,jdbcType=INTEGER},
- #{isStartTime,jdbcType=TIMESTAMP},#{isEndTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule" >
- insert into inp_schedule
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="isId != null" >
- IS_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="isCode != null" >
- IS_Code,
- </if>
- <if test="isName != null" >
- IS_Name,
- </if>
- <if test="isReviewReason != null" >
- IS_Review_Reason,
- </if>
- <if test="isReviewTime != null" >
- IS_Review_Time,
- </if>
- <if test="isRemark != null" >
- IS_Remark,
- </if>
- <if test="isTimePoint != null" >
- IS_Time_Point,
- </if>
- <if test="isRecorder != null" >
- IS_Recorder,
- </if>
- <if test="isRecordTime != null" >
- IS_Record_Time,
- </if>
- <if test="isIsreview != null" >
- IS_IsReview,
- </if>
- <if test="isOperator != null" >
- IS_Operator,
- </if>
- <if test="isOperatTime != null" >
- IS_Operat_Time,
- </if>
- <if test="isReviewId != null" >
- IS_Review_ID,
- </if>
- <if test="isReviewSource != null" >
- IS_Review_Source,
- </if>
- <if test="isDegree != null" >
- IS_Degree,
- </if>
- <if test="isIsdel != null" >
- IS_IsDel,
- </if>
- <if test="isStartTime != null">
- IS_Start_Time,
- </if>
- <if test="isEndTime != null">
- IS_End_Time
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="isId != null" >
- #{isId,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="isCode != null" >
- #{isCode,jdbcType=VARCHAR},
- </if>
- <if test="isName != null" >
- #{isName,jdbcType=VARCHAR},
- </if>
- <if test="isReviewReason != null" >
- #{isReviewReason,jdbcType=VARCHAR},
- </if>
- <if test="isReviewTime != null" >
- #{isReviewTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isRemark != null" >
- #{isRemark,jdbcType=VARCHAR},
- </if>
- <if test="isTimePoint != null" >
- #{isTimePoint,jdbcType=VARCHAR},
- </if>
- <if test="isRecorder != null" >
- #{isRecorder,jdbcType=VARCHAR},
- </if>
- <if test="isRecordTime != null" >
- #{isRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isIsreview != null" >
- #{isIsreview,jdbcType=INTEGER},
- </if>
- <if test="isOperator != null" >
- #{isOperator,jdbcType=VARCHAR},
- </if>
- <if test="isOperatTime != null" >
- #{isOperatTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isReviewId != null" >
- #{isReviewId,jdbcType=VARCHAR},
- </if>
- <if test="isReviewSource != null" >
- #{isReviewSource,jdbcType=VARCHAR},
- </if>
- <if test="isDegree != null" >
- #{isDegree,jdbcType=VARCHAR},
- </if>
- <if test="isIsdel != null" >
- #{isIsdel,jdbcType=INTEGER},
- </if>
- <if test="isStartTime != null">
- #{isStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isEndTime != null">
- #{isEndTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule" >
- update inp_schedule
- <set >
- <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="isCode != null" >
- IS_Code = #{isCode,jdbcType=VARCHAR},
- </if>
- <if test="isName != null" >
- IS_Name = #{isName,jdbcType=VARCHAR},
- </if>
- <if test="isReviewReason != null" >
- IS_Review_Reason = #{isReviewReason,jdbcType=VARCHAR},
- </if>
- <if test="isReviewTime != null" >
- IS_Review_Time = #{isReviewTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isRemark != null" >
- IS_Remark = #{isRemark,jdbcType=VARCHAR},
- </if>
- <if test="isTimePoint != null" >
- IS_Time_Point = #{isTimePoint,jdbcType=VARCHAR},
- </if>
- <if test="isRecorder != null" >
- IS_Recorder = #{isRecorder,jdbcType=VARCHAR},
- </if>
- <if test="isRecordTime != null" >
- IS_Record_Time = #{isRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isIsreview != null" >
- IS_IsReview = #{isIsreview,jdbcType=INTEGER},
- </if>
- <if test="isOperator != null" >
- IS_Operator = #{isOperator,jdbcType=VARCHAR},
- </if>
- <if test="isOperatTime != null" >
- IS_Operat_Time = #{isOperatTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isReviewId != null" >
- IS_Review_ID = #{isReviewId,jdbcType=VARCHAR},
- </if>
- <if test="isReviewSource != null" >
- IS_Review_Source = #{isReviewSource,jdbcType=VARCHAR},
- </if>
- <if test="isDegree != null" >
- IS_Degree = #{isDegree,jdbcType=VARCHAR},
- </if>
- <if test="isIsdel != null" >
- IS_IsDel = #{isIsdel,jdbcType=INTEGER},
- </if>
- <if test="isStartTime != null">
- IS_Start_Time = #{isStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isEndTime != null">
- IS_End_Time = #{isEndTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where IS_ID = #{isId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule" >
- update inp_schedule
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- IS_Code = #{isCode,jdbcType=VARCHAR},
- IS_Name = #{isName,jdbcType=VARCHAR},
- IS_Review_Reason = #{isReviewReason,jdbcType=VARCHAR},
- IS_Review_Time = #{isReviewTime,jdbcType=TIMESTAMP},
- IS_Remark = #{isRemark,jdbcType=VARCHAR},
- IS_Time_Point = #{isTimePoint,jdbcType=VARCHAR},
- IS_Recorder = #{isRecorder,jdbcType=VARCHAR},
- IS_Record_Time = #{isRecordTime,jdbcType=TIMESTAMP},
- IS_IsReview = #{isIsreview,jdbcType=INTEGER},
- IS_Operator = #{isOperator,jdbcType=VARCHAR},
- IS_Operat_Time = #{isOperatTime,jdbcType=TIMESTAMP},
- IS_Review_ID = #{isReviewId,jdbcType=VARCHAR},
- IS_Review_Source = #{isReviewSource,jdbcType=VARCHAR},
- IS_Degree = #{isDegree,jdbcType=VARCHAR},
- IS_IsDel = #{isIsdel,jdbcType=INTEGER},
- IS_Start_Time = #{isStartTime,jdbcType=TIMESTAMP},
- IS_End_Time = #{isEndTime,jdbcType=TIMESTAMP}
- where IS_ID = #{isId,jdbcType=INTEGER}
- </update>
- <select id="selectByIsCode" resultMap="BaseResultMap"
- parameterType="com.xinxin.topro.inpnurseservice.vo.InpscheduleSearchForCodeVo">
- select IS_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IS_Code, IS_Name, IS_Review_Reason,
- IS_Review_Time, IS_Remark, IS_Time_Point, IS_Recorder, IS_Record_Time, IS_IsReview,
- IS_Operator, IS_Operat_Time, IS_Review_ID, IS_Review_Source, IS_Degree, IS_IsDel,IS_Start_Time,IS_End_Time
- from inp_schedule
- where IS_IsDel= 0 and IS_IsReview = 0
- <if test="hiId != null">
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="dwWarddm != null">
- and DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
- </if>
- <if test="isCode != null">
- and IS_Code = #{isCode,jdbcType=VARCHAR}
- </if>
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate!= null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="isTimePoint != null">
- and IS_Time_Point =#{isTimePoint,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectByWardIdNoPoint" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule"
- parameterType="com.xinxin.topro.inpnurseservice.vo.InpScheduleInfoVo">
- select IS_ID isId, PatientNo patientno, HI_ID hiId, DD_DepDm ddDepdm, DW_WardDm dwWarddm, DB_BedNo dbBedno,
- IS_Code isCode, IS_Name isName, IS_Review_Reason isReviewReason,IS_Review_Time isReviewTime, IS_Remark isRemark,
- IS_Time_Point isTimePoint, IS_Recorder isRecorder, IS_Record_Time isRecordTime, IS_IsReview isIsreview,
- IS_Operator isOperator, IS_Operat_Time isOperatTime, IS_Review_ID isReviewId, IS_Review_Source isReviewSource,
- IS_Degree isDegree, IS_IsDel isIsdel,IS_Start_Time isStartTime,IS_End_Time isEndTime
- from inp_schedule
- where IS_IsDel = 0
- and DW_WardDm = #{wardId,jdbcType=VARCHAR}
- and IS_Review_Time between #{beginDate,jdbcType=TIMESTAMP} and #{endDate,jdbcType=TIMESTAMP}
- </select>
- <select id="selectByWardId" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule"
- parameterType="com.xinxin.topro.inpnurseservice.vo.InpScheduleInfoVo">
- select IS_ID isId, PatientNo patientno, HI_ID hiId, DD_DepDm ddDepdm, DW_WardDm dwWarddm, DB_BedNo dbBedno,
- IS_Code isCode, IS_Name isName, IS_Review_Reason isReviewReason,IS_Review_Time isReviewTime, IS_Remark isRemark,
- IS_Time_Point isTimePoint, IS_Recorder isRecorder, IS_Record_Time isRecordTime, IS_IsReview isIsreview,
- IS_Operator isOperator, IS_Operat_Time isOperatTime, IS_Review_ID isReviewId, IS_Review_Source isReviewSource,
- IS_Degree isDegree, IS_IsDel isIsdel,IS_Start_Time isStartTime,IS_End_Time isEndTime
- from inp_schedule
- where IS_IsDel = 0
- and DW_WardDm = #{wardId,jdbcType=VARCHAR}
- and IS_Review_Time between #{beginDate,jdbcType=TIMESTAMP} and #{endDate,jdbcType=TIMESTAMP}
- and IS_Time_Point= #{timePoint,jdbcType=VARCHAR}
- </select>
- <update id="updateIsReviewByFinish" >
- UPDATE inp_schedule
- SET IS_IsReview= 1,
- IS_Review_ID=#{ivId,jdbcType=INTEGER}
- WHERE IS_IsReview = 0
- <if test="patientNo != null">
- and PatientNo=#{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="timePoint != null">
- and IS_Time_Point= #{timePoint,jdbcType=VARCHAR}
- </if>
- <if test="isCode != null">
- and IS_Code=#{isCode,jdbcType=VARCHAR}
- </if>
- </update>
- <select id="selectFinishByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
- select
- <include refid="Base_Column_List"/>
- from inp_schedule
- where IS_IsReview= 1 and IS_ID = #{isId,jdbcType=INTEGER}
- </select>
- <select id="selectByPatientNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_schedule
- where IS_IsReview= 0
- <if test="patientNo != null">
- and PatientNo=#{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="hiId != null">
- and HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- order by IS_Review_Time ASC
- </select>
- <update id="updateIsDelByIsReviewId" >
- update inp_schedule
- set IS_IsDel=-1
- where IS_IsReview=0
- <if test="isReviewSource != null">
- and IS_Review_Source=#{isReviewSource,jdbcType=VARCHAR}
- </if>
- <if test="list != null">
- and IS_Review_ID in
- <foreach collection="list" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- </update>
- <update id="bulkUpdateIsReviewByFinish" >
- UPDATE inp_schedule
- SET IS_IsReview= 1,
- IS_Review_ID=#{ivId,jdbcType=INTEGER}
- WHERE IS_IsReview = 0
- <if test="patientNo != null">
- and PatientNo= #{patientNo,jdbcType=VARCHAR}
- </if>
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="timePoint != null">
- and IS_Time_Point= #{timePoint,jdbcType=VARCHAR}
- </if>
- <if test="list != null">
- and IS_Code in
- <foreach collection="list" item="item" separator="," index="index" close=")" open="(">
- #{item}
- </foreach>
- </if>
- </update>
- <update id="batchUpdateIsReviewByFinish" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" separator=";">
- UPDATE inp_schedule
- SET IS_IsReview= 1,
- IS_Review_ID=#{item.reviewId,jdbcType=INTEGER}
- WHERE IS_IsReview = 0
- and PatientNo= #{item.patientNo,jdbcType=VARCHAR}
- AND IS_Review_Time <![CDATA[>=]]> #{item.beginDate,jdbcType=TIMESTAMP}
- AND IS_Review_Time <![CDATA[<=]]> #{item.endDate,jdbcType=TIMESTAMP}
- and IS_Time_Point= #{item.timePoint,jdbcType=VARCHAR}
- and IS_Code = #{item.code,jdbcType=VARCHAR}
- </foreach>
- </update>
- <insert id="bulkInsert" useGeneratedKeys="true" keyProperty = "isId">
- insert into inp_schedule (IS_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- IS_Code, IS_Name, IS_Review_Reason,
- IS_Review_Time, IS_Remark, IS_Time_Point,
- IS_Recorder, IS_Record_Time, IS_IsReview,
- IS_Operator, IS_Operat_Time, IS_Review_ID,
- IS_Review_Source, IS_Degree, IS_IsDel,IS_Start_Time,IS_End_Time
- )
- values <foreach collection="list" item="item" separator=",">
- (#{item.isId,jdbcType=INTEGER}, #{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER},
- #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR},
- #{item.isCode,jdbcType=VARCHAR}, #{item.isName,jdbcType=VARCHAR}, #{item.isReviewReason,jdbcType=VARCHAR},
- #{item.isReviewTime,jdbcType=TIMESTAMP}, #{item.isRemark,jdbcType=VARCHAR}, #{item.isTimePoint,jdbcType=VARCHAR},
- #{item.isRecorder,jdbcType=VARCHAR}, #{item.isRecordTime,jdbcType=TIMESTAMP}, #{item.isIsreview,jdbcType=INTEGER},
- #{item.isOperator,jdbcType=VARCHAR}, #{item.isOperatTime,jdbcType=TIMESTAMP}, #{item.isReviewId,jdbcType=VARCHAR},
- #{item.isReviewSource,jdbcType=VARCHAR}, #{item.isDegree,jdbcType=VARCHAR}, #{item.isIsdel,jdbcType=INTEGER},
- #{item.isStartTime,jdbcType=TIMESTAMP},#{item.isEndTime,jdbcType=TIMESTAMP}
- )
- </foreach>
- </insert>
- <update id="bulkUpdateIsReviewByList" >
- <if test="list != null">
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- UPDATE inp_schedule
- SET IS_IsReview= 1,
- IS_Review_ID=#{item.ivId,jdbcType=INTEGER}
- WHERE IS_IsReview = 0
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- and PatientNo = #{item.patientNo,jdbcType=VARCHAR}
- and IS_Time_Point= #{item.timePoint,jdbcType=VARCHAR}
- and IS_Code = #{item.code,jdbcType=VARCHAR}
- </foreach>
- </if>
- </update>
- <update id="updateByTimeAndPatientNo">
- UPDATE inp_schedule
- SET IS_IsReview= 1,
- IS_Review_ID=#{iaId,jdbcType=INTEGER},
- IS_Operator = #{isOperator,jdbcType=VARCHAR},
- IS_Operat_Time = #{isOperatTime,jdbcType=TIMESTAMP},
- IS_Review_Source = #{isReviewSource,jdbcType=VARCHAR}
- WHERE IS_IsReview = 0
- AND IS_Start_Time <![CDATA[<=]]> #{recordTime,jdbcType=TIMESTAMP}
- AND IS_End_Time <![CDATA[>=]]> #{recordTime,jdbcType=TIMESTAMP}
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- AND IS_Code = #{isCode,jdbcType=VARCHAR}
- AND DW_WardDm = #{dwWardDm,jdbcType=VARCHAR}
- AND IS_IsDel = 0
- </update>
- <select id="selectByDateRangeAndPatientList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_schedule
- where IS_IsReview = 0
- and IS_IsDel=0
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="list!=null">
- and PatientNo in
- <foreach collection="list" item="item" separator="," open="(" close=")" index="index">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectByISCodes" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_schedule
- where IS_IsReview = 0
- and IS_IsDel=0
- <if test="hiId != null">
- and HI_ID = #{hiId}
- </if>
- <if test="dwWardDm != null">
- and DW_WardDm = #{dwWardDm}
- </if>
- <if test="patientNo != null">
- and patientNo = #{patientNo}
- </if>
- <if test="list != null and list.size > 0">
- and is_code in
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- limit 1
- </select>
- <update id="deleteInpScheduleByCode">
- UPDATE inp_schedule
- SET IS_IsDel = -1
- WHERE IS_IsReview = 0
- AND PatientNo = #{patientNo,jdbcType=VARCHAR}
- AND IS_Code = #{isCode,jdbcType=VARCHAR}
- AND DW_WardDm = #{dwWardDm,jdbcType=VARCHAR}
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- AND IS_IsDel = 0
- </update>
- <update id="updateBySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSchedule">
- UPDATE inp_schedule
- SET
- IS_IsReview= 1
- WHERE
- IS_IsDel = 0
- <if test="patientno != null" >
- AND PatientNo = #{patientno,jdbcType=VARCHAR}
- </if>
- <if test="hiId != null" >
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="dwWarddm != null" >
- AND DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
- </if>
- <if test="isReviewId != null" >
- AND IS_Review_ID = #{isReviewId,jdbcType=VARCHAR}
- </if>
- <if test="isReviewSource != null" >
- AND IS_Review_Source = #{isReviewSource,jdbcType=VARCHAR}
- </if>
- </update>
- <select id="selectIsReviewByList" resultType="java.lang.Integer">
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- select is_id from inp_schedule
- WHERE IS_IsReview = 0
- and IS_IsDel = 0
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="timePoint !=null">
- and is_time_point =#{timePoint,jdbcType=VARCHAR}
- </if>
- and PatientNo = #{item.patientNo,jdbcType=VARCHAR}
- and IS_Code = #{item.code,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="selectScheduleByCode" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from inp_schedule
- WHERE IS_IsReview = 0
- and IS_IsDel = 0
- <if test="beginDate != null">
- AND IS_Review_Time <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- AND IS_Review_Time <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="timePoint !=null">
- and is_time_point =#{timePoint,jdbcType=VARCHAR}
- </if>
- <if test="isCode !=null">
- and IS_Code = #{isCode,jdbcType=VARCHAR}
- </if>
- and PatientNo in
- <foreach collection="list" separator="," open="(" close=")" index="index" item="item">
- #{item,jdbcType=VARCHAR}
- </foreach>
- </select>
- <select id="selectByCodeAndIsIsreview" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- inp_schedule
- WHERE
- IS_Code = #{isCode,jdbcType=VARCHAR}
- AND IS_IsReview = #{isIsreview,jdbcType=INTEGER}
- AND IS_IsDel = 0
- </select>
- </mapper>
|