package com.prolog.rdc.tms.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.prolog.framework.dao.mapper.BaseMapper;
import com.prolog.rdc.tms.model.entity.SysCodeengineModel;

/**
 * 号码规则 Mapper
 * <p>
 * Copyright: Copyright (C) 2020 prolog-int, Inc. All rights reserved.
 * <p>
 * Company: 湖北普罗格科技股份有限公司
 *
 *
 * @author xiongt
 * @since 2020-04-02 23:27
 */
@Mapper
public interface SysCodeengineMapper extends BaseMapper<SysCodeengineModel> {

	/**
	 * 查询编码表
	 * 
	 * @param condition
	 * @return
	 */
	List<SysCodeengineModel> getCodeengine(@Param("condition") String condition);

	String getSeedCode(@Param("segcodesql") String segcodesql);

	/**
	 * 号码代号统计数量
	 * 
	 * @param li_groupid 号码代号
	 * @return
	 */
	Integer countGroup(@Param("li_groupid") String li_groupid);

	/**
	 * 号码代号查询单条信息
	 * 
	 * @param li_codeid
	 * @return
	 */
	SysCodeengineModel getSysCodeengineById(@Param("li_codeid") String li_codeid);

	/**
	 * 根据号码代号，更新最大编号、上次修改时间
	 * 
	 * @param ls_maxflowno
	 * @param todayDate
	 * @param codeid
	 * @return
	 */
	int updateMaxNo(@Param("ls_maxflowno") String ls_maxflowno, @Param("todaydate") String todayDate, @Param("codeid") String codeid);
}
