package com.sunrise.psmis.sequence; import java.util.List; import javax.annotation.Resource; import org.springframework.jdbc.core.JdbcTemplate; import com.sunrise.psmis.util.StringUtil; import com.xueruan.app.core.frame.BaseDAO; import com.xueruan.app.core.frame.CommonVo; /** * * <pre> * Copyright (C): 2012 * * Description: * 枚举,在此进行业务的扩展 * * Revision History: * 2012-10-23 initial version. * * </pre> */ public enum SequenceEnum { EXP{ public long Init(){ return new SequenceJdbcTemplateDAO().getMAX_EX_WORKSHEET(); } public String PrefixSequence(){ return "EXP"; } }, WGROUP{ public long Init(){ return new SequenceJdbcTemplateDAO().getMAX_WFGROUP(); } public String PrefixSequence(){ return "WF"; } }, MR_GROUP{ @Override public long Init() { // TODO Auto-generated method stub return new SequenceJdbcTemplateDAO().getMAX_MRGROUP(); } @Override public String PrefixSequence() { // TODO Auto-generated method stub return null; } }; /** * 设置原子的开始值,这里是取数据的最大值 * @return */ public abstract long Init(); /** * 序列的前缀 * @return */ public abstract String PrefixSequence(); }
最近下载更多