Search in sources :

Example 1 with IFormulaService

use of com.netsteadfast.greenstep.bsc.service.IFormulaService in project bamboobsc by billchen198318.

the class BscFormulaUtils method getFormulaById.

@SuppressWarnings("unchecked")
public static FormulaVO getFormulaById(String forId) throws ServiceException, Exception {
    IFormulaService<FormulaVO, BbFormula, String> formulaService = (IFormulaService<FormulaVO, BbFormula, String>) AppContext.getBean("bsc.service.FormulaService");
    FormulaVO formula = new FormulaVO();
    formula.setForId(forId);
    DefaultResult<FormulaVO> forResult = formulaService.findByUK(formula);
    if (forResult.getValue() == null) {
        throw new ServiceException(forResult.getSystemMessage().getValue());
    }
    formula = forResult.getValue();
    return formula;
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) IFormulaService(com.netsteadfast.greenstep.bsc.service.IFormulaService) BbFormula(com.netsteadfast.greenstep.po.hbm.BbFormula) FormulaVO(com.netsteadfast.greenstep.vo.FormulaVO)

Aggregations

ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)1 IFormulaService (com.netsteadfast.greenstep.bsc.service.IFormulaService)1 BbFormula (com.netsteadfast.greenstep.po.hbm.BbFormula)1 FormulaVO (com.netsteadfast.greenstep.vo.FormulaVO)1