zhaowenxuan
2025-05-13 2b2763c83e352f8ffd2ac0b5c46b60c49ee78439
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.ltkj.hosp.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.poi.ss.formula.functions.T;
 
@Mapper
public interface OrderNumberMapper extends BaseMapper<T> {
    @Select("SELECT max(last_id) FROM order_number WHERE date_key = #{dateKey} and fl=#{fl}")
    Integer getLastId(@Param("dateKey") String dateKey,@Param("fl") String fl);
 
    @Insert("INSERT INTO order_number(date_key, last_id,fl) VALUES(#{dateKey}, #{lastId},#{fl}) ON DUPLICATE KEY UPDATE last_id = #{lastId}")
    void updateLastId(@Param("dateKey") String dateKey, @Param("lastId") int lastId,@Param("fl") String fl);
}