Files
his/openhis-server-new/openhis-application/src/main/resources/mapper/appointmentmanage/DoctorScheduleMapper.xml
2026-01-22 15:09:52 +08:00

75 lines
3.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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.openhis.appointmentmanage.mapper.DoctorScheduleMapper">
<!-- 自定义插入方法明确排除id字段数据库GENERATED ALWAYS -->
<insert id="insertWithoutId" parameterType="com.openhis.appointmentmanage.domain.DoctorSchedule" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
INSERT INTO adm_doctor_schedule (
weekday,
time_period,
doctor,
clinic,
start_time,
end_time,
limit_number,
call_sign_record,
register_item,
register_fee,
diagnosis_item,
diagnosis_fee,
is_online,
is_stopped,
stop_reason,
dept_id
<if test="createTime != null">, create_time</if>
<if test="updateTime != null">, update_time</if>
) VALUES (
#{weekday},
#{timePeriod},
#{doctor},
#{clinic},
#{startTime},
#{endTime},
#{limitNumber},
#{callSignRecord},
#{registerItem},
#{registerFee},
#{diagnosisItem},
#{diagnosisFee},
#{isOnline},
#{isStopped},
#{stopReason},
#{deptId}
<if test="createTime != null">, #{createTime}</if>
<if test="updateTime != null">, #{updateTime}</if>
)
</insert>
<!--自定义更新方法-->
<update id="updateDoctorSchedule" parameterType="com.openhis.appointmentmanage.domain.DoctorSchedule">
UPDATE adm_doctor_schedule
<set>
<if test="weekday != null">weekday = #{weekday},</if>
<if test="timePeriod != null">time_period = #{timePeriod},</if>
<if test="doctor != null">doctor = #{doctor},</if>
<if test="clinic != null">clinic = #{clinic},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="limitNumber != null">limit_number = #{limitNumber},</if>
<if test="callSignRecord != null">call_sign_record = #{callSignRecord},</if>
<if test="registerItem != null">register_item = #{registerItem},</if>
<if test="registerFee != null">register_fee = #{registerFee},</if>
<if test="diagnosisItem != null">diagnosis_item = #{diagnosisItem},</if>
<if test="diagnosisFee != null">diagnosis_fee = #{diagnosisFee},</if>
<if test="isOnline != null">is_online = #{isOnline},</if>
<if test="isStopped != null">is_stopped = #{isStopped},</if>
<if test="stopReason != null">stop_reason = #{stopReason},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="updateTime != null">update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
</mapper>