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);
}
}

posted @ 2019-06-26 18:07  一条有梦想的海洋咸鱼  阅读(595)  评论(0编辑  收藏  举报