76 门诊预约挂号
This commit is contained in:
@@ -0,0 +1,270 @@
|
||||
<?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.clinical.mapper.OrderMapper">
|
||||
|
||||
<resultMap type="com.openhis.clinical.domain.Order" id="OrderResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="patientName" column="patient_name"/>
|
||||
<result property="medicalCard" column="medical_card"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="gender" column="gender"/>
|
||||
<result property="scheduleId" column="schedule_id"/>
|
||||
<result property="slotId" column="slot_id"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="departmentName" column="department_name"/>
|
||||
<result property="doctorId" column="doctor_id"/>
|
||||
<result property="doctorName" column="doctor_name"/>
|
||||
<result property="regType" column="reg_type"/>
|
||||
<result property="fee" column="fee"/>
|
||||
<result property="appointmentDate" column="appointment_date"/>
|
||||
<result property="appointmentTime" column="appointment_time"/>
|
||||
<result property="cancelTime" column="cancel_time"/>
|
||||
<result property="cancelReason" column="cancel_reason"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="payStatus" column="pay_status"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectOrderList" resultMap="OrderResult">
|
||||
select * from order_main
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="patientId != null">
|
||||
and patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name like #{patientName}
|
||||
</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">
|
||||
and medical_card = #{medicalCard}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="scheduleId != null">
|
||||
and schedule_id = #{scheduleId}
|
||||
</if>
|
||||
<if test="slotId != null">
|
||||
and slot_id = #{slotId}
|
||||
</if>
|
||||
<if test="departmentId != null">
|
||||
and department_id = #{departmentId}
|
||||
</if>
|
||||
<if test="doctorId != null">
|
||||
and doctor_id = #{doctorId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
and pay_status = #{payStatus}
|
||||
</if>
|
||||
<if test="appointmentDate != null">
|
||||
and appointment_date = #{appointmentDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderPage" resultMap="OrderResult">
|
||||
select * from order_main
|
||||
<where>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no = #{order.orderNo}
|
||||
</if>
|
||||
<if test="order.patientId != null">
|
||||
and patient_id = #{order.patientId}
|
||||
</if>
|
||||
<if test="order.patientName != null and order.patientName != ''">
|
||||
and patient_name like #{order.patientName}
|
||||
</if>
|
||||
<if test="order.medicalCard != null and order.medicalCard != ''">
|
||||
and medical_card = #{order.medicalCard}
|
||||
</if>
|
||||
<if test="order.phone != null and order.phone != ''">
|
||||
and phone = #{order.phone}
|
||||
</if>
|
||||
<if test="order.scheduleId != null">
|
||||
and schedule_id = #{order.scheduleId}
|
||||
</if>
|
||||
<if test="order.slotId != null">
|
||||
and slot_id = #{order.slotId}
|
||||
</if>
|
||||
<if test="order.departmentId != null">
|
||||
and department_id = #{order.departmentId}
|
||||
</if>
|
||||
<if test="order.doctorId != null">
|
||||
and doctor_id = #{order.doctorId}
|
||||
</if>
|
||||
<if test="order.status != null">
|
||||
and status = #{order.status}
|
||||
</if>
|
||||
<if test="order.payStatus != null">
|
||||
and pay_status = #{order.payStatus}
|
||||
</if>
|
||||
<if test="order.appointmentDate != null">
|
||||
and appointment_date = #{order.appointmentDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderById" resultMap="OrderResult">
|
||||
select * from order_main where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectOrderBySlotId" resultMap="OrderResult">
|
||||
select * from order_main where slot_id = #{slotId} and status = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertOrder" parameterType="com.openhis.clinical.domain.Order">
|
||||
insert into order_main
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">order_no,</if>
|
||||
<if test="patientId != null">patient_id,</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name,</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">medical_card,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="scheduleId != null">schedule_id,</if>
|
||||
<if test="slotId != null">slot_id,</if>
|
||||
<if test="departmentId != null">department_id,</if>
|
||||
<if test="departmentName != null and departmentName != ''">department_name,</if>
|
||||
<if test="doctorId != null">doctor_id,</if>
|
||||
<if test="doctorName != null and doctorName != ''">doctor_name,</if>
|
||||
<if test="regType != null and regType != ''">reg_type,</if>
|
||||
<if test="fee != null">fee,</if>
|
||||
<if test="appointmentDate != null">appointment_date,</if>
|
||||
<if test="appointmentTime != null">appointment_time,</if>
|
||||
<if test="cancelTime != null">cancel_time,</if>
|
||||
<if test="cancelReason != null and cancelReason != ''">cancel_reason,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="payStatus != null">pay_status,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
||||
<if test="patientId != null">#{patientId},</if>
|
||||
<if test="patientName != null and patientName != ''">#{patientName},</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">#{medicalCard},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="scheduleId != null">#{scheduleId},</if>
|
||||
<if test="slotId != null">#{slotId},</if>
|
||||
<if test="departmentId != null">#{departmentId},</if>
|
||||
<if test="departmentName != null and departmentName != ''">#{departmentName},</if>
|
||||
<if test="doctorId != null">#{doctorId},</if>
|
||||
<if test="doctorName != null and doctorName != ''">#{doctorName},</if>
|
||||
<if test="regType != null and regType != ''">#{regType},</if>
|
||||
<if test="fee != null">#{fee},</if>
|
||||
<if test="appointmentDate != null">#{appointmentDate},</if>
|
||||
<if test="appointmentTime != null">#{appointmentTime},</if>
|
||||
<if test="cancelTime != null">#{cancelTime},</if>
|
||||
<if test="cancelReason != null and cancelReason != ''">#{cancelReason},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="payStatus != null">#{payStatus},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrder" parameterType="com.openhis.clinical.domain.Order">
|
||||
update order_main
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
|
||||
<if test="patientId != null">patient_id = #{patientId},</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name = #{patientName},</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">medical_card = #{medicalCard},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="scheduleId != null">schedule_id = #{scheduleId},</if>
|
||||
<if test="slotId != null">slot_id = #{slotId},</if>
|
||||
<if test="departmentId != null">department_id = #{departmentId},</if>
|
||||
<if test="departmentName != null and departmentName != ''">department_name = #{departmentName},</if>
|
||||
<if test="doctorId != null">doctor_id = #{doctorId},</if>
|
||||
<if test="doctorName != null and doctorName != ''">doctor_name = #{doctorName},</if>
|
||||
<if test="regType != null and regType != ''">reg_type = #{regType},</if>
|
||||
<if test="fee != null">fee = #{fee},</if>
|
||||
<if test="appointmentDate != null">appointment_date = #{appointmentDate},</if>
|
||||
<if test="appointmentTime != null">appointment_time = #{appointmentTime},</if>
|
||||
<if test="cancelTime != null">cancel_time = #{cancelTime},</if>
|
||||
<if test="cancelReason != null and cancelReason != ''">cancel_reason = #{cancelReason},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="payStatus != null">pay_status = #{payStatus},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateOrderStatusById">
|
||||
update order_main set status = #{status} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateOrderCancelInfoById">
|
||||
update order_main set status = 3, cancel_time = #{cancelTime}, cancel_reason = #{cancelReason} where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderById">
|
||||
delete from order_main where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderByIds">
|
||||
delete from order_main where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countOrders" resultType="int">
|
||||
select count(*) from order_main
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="patientId != null">
|
||||
and patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="scheduleId != null">
|
||||
and schedule_id = #{scheduleId}
|
||||
</if>
|
||||
<if test="slotId != null">
|
||||
and slot_id = #{slotId}
|
||||
</if>
|
||||
<if test="departmentId != null">
|
||||
and department_id = #{departmentId}
|
||||
</if>
|
||||
<if test="doctorId != null">
|
||||
and doctor_id = #{doctorId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
and pay_status = #{payStatus}
|
||||
</if>
|
||||
<if test="appointmentDate != null">
|
||||
and appointment_date = #{appointmentDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,245 @@
|
||||
<?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.clinical.mapper.TicketMapper">
|
||||
|
||||
<resultMap type="com.openhis.clinical.domain.Ticket" id="TicketResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="busNo" column="bus_no"/>
|
||||
<result property="department" column="department"/>
|
||||
<result property="doctor" column="doctor"/>
|
||||
<result property="ticketType" column="ticket_type"/>
|
||||
<result property="time" column="time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="fee" column="fee"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="patientName" column="patient_name"/>
|
||||
<result property="medicalCard" column="medical_card"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="appointmentDate" column="appointment_date"/>
|
||||
<result property="appointmentTime" column="appointment_time"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="doctorId" column="doctor_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectTicketList" parameterType="com.openhis.clinical.domain.Ticket" resultMap="TicketResult">
|
||||
select * from clinical_ticket
|
||||
<where>
|
||||
<!-- 逻辑删除条件 -->
|
||||
and delete_flag = '0'
|
||||
<!-- 其他查询条件 -->
|
||||
<if test="ticketType != null and ticketType != ''">
|
||||
and ticket_type = #{ticketType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="appointmentDate != null">
|
||||
and appointment_date = cast(#{appointmentDate} as date)
|
||||
</if>
|
||||
<if test="doctorId != null">
|
||||
and doctor_id = #{doctorId}
|
||||
</if>
|
||||
<if test="departmentId != null">
|
||||
and department_id = #{departmentId}
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
and time like #{time}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name = #{patientName}
|
||||
</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">
|
||||
and medical_card = #{medicalCard}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTicketPage" resultMap="TicketResult">
|
||||
select * from clinical_ticket
|
||||
<where>
|
||||
<!-- 逻辑删除条件 -->
|
||||
and delete_flag = '0'
|
||||
<!-- 其他查询条件 -->
|
||||
<if test="ticket.ticketType != null and ticket.ticketType != ''">
|
||||
and ticket_type = #{ticket.ticketType}
|
||||
</if>
|
||||
<if test="ticket.status != null and ticket.status != ''">
|
||||
and status = #{ticket.status}
|
||||
</if>
|
||||
<if test="ticket.appointmentDate != null">
|
||||
and appointment_date = cast(#{ticket.appointmentDate} as date)
|
||||
</if>
|
||||
<if test="ticket.doctorId != null">
|
||||
and doctor_id = #{ticket.doctorId}
|
||||
</if>
|
||||
<if test="ticket.departmentId != null">
|
||||
and department_id = #{ticket.departmentId}
|
||||
</if>
|
||||
<if test="ticket.time != null and ticket.time != ''">
|
||||
and time like #{ticket.time}
|
||||
</if>
|
||||
<if test="ticket.patientName != null and ticket.patientName != ''">
|
||||
and patient_name = #{ticket.patientName}
|
||||
</if>
|
||||
<if test="ticket.medicalCard != null and ticket.medicalCard != ''">
|
||||
and medical_card = #{ticket.medicalCard}
|
||||
</if>
|
||||
<if test="ticket.phone != null and ticket.phone != ''">
|
||||
and phone = #{ticket.phone}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 自定义COUNT查询,解决MyBatis-Plus自动生成的COUNT查询结果不正确的问题 -->
|
||||
<select id="selectTicketPage_mpCount" resultType="java.lang.Long">
|
||||
select count(*) from clinical_ticket
|
||||
<where>
|
||||
<!-- 逻辑删除条件 -->
|
||||
and delete_flag = '0'
|
||||
<!-- 其他查询条件 -->
|
||||
<if test="ticket.ticketType != null and ticket.ticketType != ''">
|
||||
and ticket_type = #{ticket.ticketType}
|
||||
</if>
|
||||
<if test="ticket.status != null and ticket.status != ''">
|
||||
and status = #{ticket.status}
|
||||
</if>
|
||||
<if test="ticket.appointmentDate != null">
|
||||
and appointment_date = #{ticket.appointmentDate}
|
||||
</if>
|
||||
<if test="ticket.doctorId != null">
|
||||
and doctor_id = #{ticket.doctorId}
|
||||
</if>
|
||||
<if test="ticket.departmentId != null">
|
||||
and department_id = #{ticket.departmentId}
|
||||
</if>
|
||||
<if test="ticket.time != null and ticket.time != ''">
|
||||
and time like #{ticket.time}
|
||||
</if>
|
||||
<if test="ticket.patientName != null and ticket.patientName != ''">
|
||||
and patient_name = #{ticket.patientName}
|
||||
</if>
|
||||
<if test="ticket.medicalCard != null and ticket.medicalCard != ''">
|
||||
and medical_card = #{ticket.medicalCard}
|
||||
</if>
|
||||
<if test="ticket.phone != null and ticket.phone != ''">
|
||||
and phone = #{ticket.phone}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTicketById" resultMap="TicketResult">
|
||||
select * from clinical_ticket where id = #{id} and delete_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertTicket" parameterType="com.openhis.clinical.domain.Ticket">
|
||||
insert into clinical_ticket
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="busNo != null and busNo != ''">bus_no,</if>
|
||||
<if test="department != null and department != ''">department,</if>
|
||||
<if test="doctor != null and doctor != ''">doctor,</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type,</if>
|
||||
<if test="time != null and time != ''">time,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="fee != null and fee != ''">fee,</if>
|
||||
<if test="patientId != null">patient_id,</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name,</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">medical_card,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="appointmentDate != null">appointment_date,</if>
|
||||
<if test="appointmentTime != null">appointment_time,</if>
|
||||
<if test="departmentId != null">department_id,</if>
|
||||
<if test="doctorId != null">doctor_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="busNo != null and busNo != ''">#{busNo},</if>
|
||||
<if test="department != null and department != ''">#{department},</if>
|
||||
<if test="doctor != null and doctor != ''">#{doctor},</if>
|
||||
<if test="ticketType != null and ticketType != ''">#{ticketType},</if>
|
||||
<if test="time != null and time != ''">#{time},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="fee != null and fee != ''">#{fee},</if>
|
||||
<if test="patientId != null">#{patientId},</if>
|
||||
<if test="patientName != null and patientName != ''">#{patientName},</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">#{medicalCard},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="appointmentDate != null">#{appointmentDate},</if>
|
||||
<if test="appointmentTime != null">#{appointmentTime},</if>
|
||||
<if test="departmentId != null">#{departmentId},</if>
|
||||
<if test="doctorId != null">#{doctorId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTicket" parameterType="com.openhis.clinical.domain.Ticket">
|
||||
update clinical_ticket
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="busNo != null and busNo != ''">bus_no = #{busNo},</if>
|
||||
<if test="department != null and department != ''">department = #{department},</if>
|
||||
<if test="doctor != null and doctor != ''">doctor = #{doctor},</if>
|
||||
<if test="ticketType != null and ticketType != ''">ticket_type = #{ticketType},</if>
|
||||
<if test="time != null and time != ''">time = #{time},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="fee != null and fee != ''">fee = #{fee},</if>
|
||||
<if test="patientId != null">patient_id = #{patientId},</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name = #{patientName},</if>
|
||||
<if test="medicalCard != null and medicalCard != ''">medical_card = #{medicalCard},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="appointmentDate != null">appointment_date = #{appointmentDate},</if>
|
||||
<if test="appointmentTime != null">appointment_time = #{appointmentTime},</if>
|
||||
<if test="departmentId != null">department_id = #{departmentId},</if>
|
||||
<if test="doctorId != null">doctor_id = #{doctorId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTicketById">
|
||||
delete from clinical_ticket where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTicketByIds">
|
||||
delete from clinical_ticket where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countTickets" resultType="int">
|
||||
select count(*) from clinical_ticket
|
||||
<where>
|
||||
<if test="ticketType != null and ticketType != ''">
|
||||
and ticket_type = #{ticketType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="appointmentDate != null">
|
||||
and appointment_date = cast(#{appointmentDate} as date)
|
||||
</if>
|
||||
<if test="doctorId != null">
|
||||
and doctor_id = #{doctorId}
|
||||
</if>
|
||||
<if test="departmentId != null">
|
||||
and department_id = #{departmentId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user