Search in sources :

Example 6 with TbSysProg

use of com.netsteadfast.greenstep.po.hbm.TbSysProg in project bamboobsc by billchen198318.

the class MenuSupportUtils method loadSysProg.

public static TbSysProg loadSysProg(String progId) throws ServiceException, Exception {
    TbSysProg tbSysProg = new TbSysProg();
    tbSysProg.setProgId(progId);
    tbSysProg = sysProgService.findByEntityUK(tbSysProg);
    if (null == tbSysProg) {
        throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.DATA_ERRORS));
    }
    return tbSysProg;
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) TbSysProg(com.netsteadfast.greenstep.po.hbm.TbSysProg)

Example 7 with TbSysProg

use of com.netsteadfast.greenstep.po.hbm.TbSysProg in project bamboobsc by billchen198318.

the class MenuSupportUtils method loadSysProgData.

protected static List<TbSysProg> loadSysProgData(String system) throws ServiceException, Exception {
    List<TbSysProg> progList = null;
    TbSys sys = new TbSys();
    sys.setSysId(system);
    if (sysService.countByEntityUK(sys) != 1) {
        // 必需要有 TB_SYS 資料
        throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.DATA_ERRORS));
    }
    Map<String, Object> params = new HashMap<String, Object>();
    Map<String, String> oderParams = new HashMap<String, String>();
    params.put("progSystem", system);
    oderParams.put("name", "asc");
    progList = sysProgService.findListByParams(params, null, oderParams);
    if (progList == null) {
        progList = new ArrayList<TbSysProg>();
    }
    return progList;
}
Also used : TbSys(com.netsteadfast.greenstep.po.hbm.TbSys) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) HashMap(java.util.HashMap) TbSysProg(com.netsteadfast.greenstep.po.hbm.TbSysProg)

Aggregations

TbSysProg (com.netsteadfast.greenstep.po.hbm.TbSysProg)7 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)5 HashMap (java.util.HashMap)3 TbSys (com.netsteadfast.greenstep.po.hbm.TbSys)2 SysMenuVO (com.netsteadfast.greenstep.vo.SysMenuVO)1