내부 귀속 코드의 쓰기 방법

5117 단어 방법 내부 귀속
  /**
     *                  unitId KPi,               
     *        
     *
     * @param mapValue(ID、GRAPH_ID,  ID     ID)
     *
     * @return unitId、kpiId  
     */
    @SuppressWarnings({"rawtypes", "unchecked"})
    public  LinkedHashMap<String, Object> getCurrentTopoNodeConfig(Map<String, String> mapValue) {
        boolean isCountinue = true;
        LinkedList<String> paramListKbp = new LinkedList<String>();
        LinkedList<String> paramListKpi = new LinkedList<String>();
        while (isCountinue) {
            List<Map> listNodeCount = new ArrayList();
            if (mapValue.get("ITETOR_TYPE") != null) {
                String subNodeList = mapValue.get("ITETOR_TYPE");
                listNodeCount = (ArrayList) JSONUtil.fromJSON(subNodeList);
            } else {
                listNodeCount.add(mapValue);
            }
            if (listNodeCount != null && listNodeCount.size() > 0) {
                for (int j = 0; j < listNodeCount.size(); j++) {
                    mapValue = listNodeCount.get(j);
                    List resultValue = e2eDao.showMonitorTopuResNodeuResNode(mapValue);//         
                    if (resultValue != null && resultValue.size() > 0) {
                        Map<String, String> graphMap = (Map<String, String>) resultValue.get(0);
                        String customPropers = graphMap.get("CUSTOM_PROPS");
                        if (!"".equals(customPropers)) {
                            Map unitMapSub = getMonitorResUnitIdAndKpiItem(customPropers);
                            List unitListItemSub = null;
                            List kpiListItemSub = null;
                            if (unitMapSub.get("UNIT_ID_ITEM") != null) {
                                unitListItemSub = (ArrayList) unitMapSub.get("UNIT_ID_ITEM");
                            }
                            if (unitMapSub.get("KPI_ID_ITEM") != null) {
                                kpiListItemSub = (ArrayList) unitMapSub.get("KPI_ID_ITEM");
                            }
                            if (unitListItemSub != null) {// unit   
                                for (int l = 0; l < unitListItemSub.size(); l++) {
                                    paramListKbp.add(unitListItemSub.get(l) + "");
                                }
                            }
                            if (kpiListItemSub != null) {// KPI   
                                for (int l = 0; l < kpiListItemSub.size(); l++) {
                                    paramListKpi.add(kpiListItemSub.get(l) + "");
                                }
                            }
                            Map<String, String> customMap = (Map) JSONUtil.fromJSON(customPropers);
                            String subGraphId = customMap.get("subGraphId");
                            //          
                            if (!"".equals(subGraphId) && !"null".equals(subGraphId) && subGraphId != null) {
                                Map subMapValue = new HashMap();
                                subMapValue.put("GRAPH_ID", subGraphId);
                                List resultValueSub = e2eDao.showMonitorTopuResNodeuResNode(subMapValue);//             
                                if (resultValueSub != null && resultValueSub.size() > 0) {
                                    List subNodeList = new ArrayList();
                                    for (int k = 0; k < resultValueSub.size(); k++) {
                                        Map<String, String> graphMapSub = (Map<String, String>) resultValueSub.get(k);
                                         mapValue = new HashMap();
                                        mapValue.put("ID", graphMapSub.get("ID"));
                                        mapValue.put("GRAPH_ID", graphMapSub.get("GRAPH_ID"));
                                        subNodeList.add(mapValue);
                                    }
                                    mapValue.put("ITETOR_TYPE", JSONUtil.toJSON(subNodeList));
                                } else {
                                    isCountinue = false;
                                }
                            } else {
                                isCountinue = false;
                            }
                        } else {
                            isCountinue = false;
                        }
                    } else {
                        isCountinue = false;
                    }
                }
            } else {
                isCountinue = false;
            }
        }
        LinkedHashMap returnMap = new LinkedHashMap();
        returnMap.put("EXT_UNIT_ID", paramListKbp);
        returnMap.put("KPI_ID", paramListKpi);
        return returnMap;
    }

좋은 웹페이지 즐겨찾기