//获取单据编码规则
/**
* @Title: getNumber
* @Description: TODO(获取单据编码规则)
* <p>
* @date 2010-11-12
* @param dataBaseInfo model.put("number", JCBillUtil.getNumber(model, null));
* @return
*/
public static String getNumber(IObjectValue objectValue, String companyId)
{
// 设置编码规则
if(null == companyId)
{
companyId = getCurCompanyOrgUnit().getId().toString();
}
try
{
ICodingRuleManager rule = CodingRuleManagerFactory.getRemoteInstance();
if(rule.isExist(objectValue, companyId))
{
return rule.getNumber(objectValue, companyId);
}
}catch(Exception e)
{
e.printStackTrace();
return null;
}
return null;
}