| | |
| | | private static final String MONITORPOINT_ID= "monitorpointId";
|
| | | //设备静态数据,不常改动。
|
| | | private static String getStaticEquKey(String mac) {
|
| | | mac = mac==null?"":mac.toLowerCase();
|
| | | return "static_equ_"+mac;
|
| | | }
|
| | | public void setStaticEqu(String mac,Map<String,Object> equMap) {
|
| | |
| | | */
|
| | | public Map<String,Float> getAdjustsByMac(String mac){
|
| | | Map<String,Object> equMap = getStaticEqu(mac);
|
| | | Object adjusts = equMap.get(ADJUSTS);
|
| | | Map<String,Float> adjustMap = null;
|
| | | if(adjusts!=null&&adjusts instanceof JSONObject) {
|
| | | adjustMap = ((JSONObject)adjusts).toJavaObject(new TypeReference<Map<String,Float>>(){});
|
| | | }
|
| | | if(equMap != null) {
|
| | | Object adjusts = equMap.get(ADJUSTS);
|
| | | if(adjusts!=null&&adjusts instanceof JSONObject) {
|
| | | adjustMap = ((JSONObject)adjusts).toJavaObject(new TypeReference<Map<String,Float>>(){});
|
| | | }
|
| | | }
|
| | | return adjustMap;
|
| | | }
|
| | | //格式:state_组织ID_地区ID_监控点ID_mac
|
| | |
| | | String orgId = equMap.get(ORG_ID)==null?"$":equMap.get(ORG_ID).toString();
|
| | | String areaCode = equMap.get(AREA_CODE)==null?"$":equMap.get(AREA_CODE).toString();
|
| | | String mpointId = equMap.get(MONITORPOINT_ID)==null?"$":equMap.get(MONITORPOINT_ID).toString();
|
| | | mac = mac==null?"":mac.toLowerCase();
|
| | | return "state_"+orgId+"_"+areaCode+"_"+mpointId+"_"+mac;
|
| | | }
|
| | | else {
|