Search in sources :

Example 6 with TbSysCode

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

the class BscKpiCode method loadMapData.

private static void loadMapData() {
    managementMap.clear();
    compareTypeMap.clear();
    calMap.clear();
    dataTypeMap.clear();
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("type", CODE_TYPE);
    Map<String, String> orderParams = new HashMap<String, String>();
    orderParams.put("code", "ASC");
    try {
        List<TbSysCode> codes = sysCodeService.findListByParams(params, null, orderParams);
        for (TbSysCode code : codes) {
            fillDataMap(code);
        }
    } catch (ServiceException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
    checkDataMap();
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) TbSysCode(com.netsteadfast.greenstep.po.hbm.TbSysCode) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException)

Example 7 with TbSysCode

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

the class BscReportPropertyUtils method getParameterValue.

private static String getParameterValue(String code) {
    List<TbSysCode> sysCodeList = sysCodeThreadLocal.get();
    if (sysCodeList == null) {
        return code;
    }
    String value = "";
    for (TbSysCode sysCode : sysCodeList) {
        if (sysCode.getCode().equals(code)) {
            value = StringUtils.defaultString(sysCode.getParam1());
        }
    }
    if (StringUtils.isBlank(value)) {
        return code;
    }
    return value;
}
Also used : TbSysCode(com.netsteadfast.greenstep.po.hbm.TbSysCode)

Aggregations

TbSysCode (com.netsteadfast.greenstep.po.hbm.TbSysCode)7 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)5 HashMap (java.util.HashMap)4 LinkedHashMap (java.util.LinkedHashMap)4 EmptyResultDataAccessException (org.springframework.dao.EmptyResultDataAccessException)1