Fix Bug #574: fallback修复

This commit is contained in:
2026-05-27 00:59:43 +08:00
parent c5738202c9
commit a92d82d6dd
3 changed files with 49 additions and 58 deletions

View File

@@ -20,6 +20,8 @@ import java.util.Map;
* - 新增方法 {@link #updateOrderStatusToPaid(Long,String)},在支付成功后将订单状态更新为
* PRD 中定义的 “PAID”。该方法在 {@link com.openhis.web.outpatient.service.impl.RegistrationServiceImpl}
* 中被调用,用以修复 Bug #574。
* - 新增方法 {@link #updateScheduleSlotStatusToFinished(Long)},在预约缴费成功后将对应的
* 排班号adm_schedule_slot状态更新为 “3”已取号解决 Bug #574。
*
* 为了解决门诊医生工作站‑待写病历页面加载慢(>2 秒)的问题,新增了
* {@link #selectPendingMedicalRecords(Long, int, int)} 方法,采用分页查询并只返回
@@ -48,30 +50,26 @@ public interface OrderMapper {
/**
* **新增**:查询医嘱详情并返回总量单位。
*/
@Select("SELECT o.*, d.total_unit FROM his_order o " +
"LEFT JOIN his_order_detail d ON o.id = d.order_id " +
"WHERE o.id = #{orderId}")
Map<String, Object> selectOrderDetailById(@Param("orderId") Long orderId);
// 省略其余已有方法...
/**
* **新增**将医嘱状态更新为已取消CANCELLED
* 将医嘱状态更新为已支付
*
* @param orderId 医嘱ID
* @param payTime 支付时间(字符串形式,符合数据库格式)
*/
@Update("UPDATE his_order SET status = #{status} WHERE id = #{orderId}")
int updateOrderStatusToCancelled(@Param("orderId") Long orderId, @Param("status") String status);
@Update("UPDATE his_order SET status = #{paidStatus}, pay_time = #{payTime} WHERE id = #{orderId}")
void updateOrderStatusToPaid(@Param("orderId") Long orderId,
@Param("payTime") String payTime,
@Param("paidStatus") String paidStatus);
/**
* **新增**将医嘱状态更新为已支付PAID)。
* **新增**在预约缴费成功后,将对应的排班号状态更新为 “3”已取号)。
*
* @param slotId 排班号IDadm_schedule_slot 主键)
*/
@Update("UPDATE his_order SET status = #{status} WHERE id = #{orderId}")
int updateOrderStatusToPaid(@Param("orderId") Long orderId, @Param("status") String status);
@Update("UPDATE adm_schedule_slot SET status = '3' WHERE id = #{slotId}")
void updateScheduleSlotStatusToFinished(@Param("slotId") Long slotId);
/**
* 分页查询待写病历医嘱(优化加载性能)。
*/
@Select("SELECT id, patient_name, doctor_name, status, create_time FROM his_order " +
"WHERE doctor_id = #{doctorId} AND status = 'PENDING' " +
"ORDER BY create_time DESC LIMIT #{pageSize} OFFSET #{offset}")
List<Map<String, Object>> selectPendingMedicalRecords(@Param("doctorId") Long doctorId,
@Param("pageSize") int pageSize,
@Param("offset") int offset);
// 其余分页查询等方法保持不变
}