eight
2024-12-12 2bc90e242eceb83d9aa80d48ea9f991c0f9b99c6
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/call/CallMapper.java
@@ -6,10 +6,8 @@
import cn.lihu.jh.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lihu.jh.framework.mybatis.core.mapper.BaseMapperX;
import cn.lihu.jh.module.ecg.dal.dataobject.call.CallDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import cn.lihu.jh.module.ecg.controller.admin.call.vo.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
 * 叫号 Mapper
@@ -39,6 +37,15 @@
    @Select("select * from lihu.call_patient where pat_id = #{patId} order by id desc limit 1")
    CallDO getLatestPatientCall(@Param("patId") String patId);
    @Select("select * from lihu.call_patient where called = 0 order by id limit 1")
    CallDO getNextCall();
    // call_type 0  大屏
    @Select("select * from lihu.call_patient where called = 0 and call_type = 0 order by id limit 1")
    CallDO getNextCall( );
    // call_type 1  诊间屏
    @Select("select * from lihu.call_patient where called = 0 and call_type = 1 and room_id = #{roomId} order by id limit 1")
    CallDO getNextInstallCall(@Param("roomId") Long roomId);
    //@Update("TRUNCATE TABLE lihu.call_patient")  保持当天数据
    @Delete("delete from lihu.call_patient where TO_DAYS(book_date) != TO_DAYS(NOW())")
    void clearCall();
}