eas之关于编码规则

//是否存在编码规则
protected booleana isCodeRuleEnable(IObjectValue objValue)throws EASBizException,BOSException{
String companyId=OrgInnerUtils.getCurCompany();
ICodingRuledManager coldRuleMgr=null;
codeRuleMgr=CodingRuleManagerFactory.getRemoteInstance();
return codeRuleMgr.isExist(objValue.companyId);
}
//得到自动编码
protected String getAutoCode(IObjectValue objValue)throws EASBizException,BOSException{
String companyId=OrgInnerUtils.getCurCompany();
ICodingRuleManager codeRuleMgr=null;

codeRuleMgr=CodingRuleManagerFactory.getRemotInstance();
if(codeRuleMgr.isUseIntermitNumber(objValue,companyId)){
return codeRuleMgr.readNumber(objValue,companyId);
}else{
return codeRuleMgr.getNumber(objValue,companyId);
}
}

猜你喜欢

转载自www.cnblogs.com/luojiabao/p/11091685.html
EAS