| | |
| | | type1 = OperationLogEnum.TYPE_1_SERVICE.getType(); |
| | | if(methodName.startsWith("set")){ |
| | | if(methodName.contains("Pl")){ |
| | | type2 = OperationLogEnum.TYPE_3_ACTM_SETPARAMPL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_3_ACTM_SETPARAMPL.getName(); |
| | | type2 = OperationLogEnum.TYPE_2_ACTM_SETPARAMPL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_2_ACTM_SETPARAMPL.getName(); |
| | | }else{ |
| | | type2 = OperationLogEnum.TYPE_3_ACTM_SETPARAM.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_3_ACTM_SETPARAM.getName(); |
| | | type2 = OperationLogEnum.TYPE_2_ACTM_SETPARAM.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_2_ACTM_SETPARAM.getName(); |
| | | } |
| | | } |
| | | if(methodName.startsWith("controll")){ |
| | | if(methodName.contains("Pl")){ |
| | | type2 = OperationLogEnum.TYPE_3_ACTM_CONTROLLPL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_3_ACTM_CONTROLLPL.getName(); |
| | | type2 = OperationLogEnum.TYPE_2_ACTM_CONTROLLPL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_2_ACTM_CONTROLLPL.getName(); |
| | | }else{ |
| | | type2 = OperationLogEnum.TYPE_3_ACTM_CONTROLL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_3_ACTM_CONTROLL.getName(); |
| | | type2 = OperationLogEnum.TYPE_2_ACTM_CONTROLL.getType(); |
| | | operationTypeName = OperationLogEnum.TYPE_2_ACTM_CONTROLL.getName(); |
| | | } |
| | | } |
| | | } |
| | |
| | | TYPE_2_A200_STOP(205,"停止A200"), |
| | | TYPE_2_A200_STOPPL(206,"批量停止A200"), |
| | | |
| | | TYPE_3_ACTM_SETPARAM(301,"ACTM参数设置"), |
| | | TYPE_3_ACTM_SETPARAMPL(302,"批量ACTM参数设置"), |
| | | TYPE_3_ACTM_CONTROLL(303,"控制ACTM均衡仪"), |
| | | TYPE_3_ACTM_CONTROLLPL(304,"批量控制ACTM"), |
| | | TYPE_2_ACTM_SETPARAM(207,"ACTM参数设置"), |
| | | TYPE_2_ACTM_SETPARAMPL(208,"批量ACTM参数设置"), |
| | | TYPE_2_ACTM_CONTROLL(209,"控制ACTM均衡仪"), |
| | | TYPE_2_ACTM_CONTROLLPL(210,"批量控制ACTM"), |
| | | |
| | | |
| | | ; |
| | |
| | | |
| | | |
| | | public Response getEnumTypes() { |
| | | Map<OperationLog, List<OperationLog>> map = new HashMap<>(); |
| | | Map<Integer, List<OperationLog>> map = new HashMap<>(); |
| | | OperationLogEnum[] instances = OperationLogEnum.values(); |
| | | for (OperationLogEnum instance : instances) { |
| | | Set<OperationLog> type1Logs = map.keySet(); |
| | | Set<Integer> type1Logs = map.keySet(); |
| | | //两位数为一级,非两位数为二级 |
| | | Integer type = instance.getType(); |
| | | String name = instance.getName(); |
| | | if(type.toString().length() == 2){ //一级 |
| | | OperationLog log = new OperationLog(); |
| | | log.setType1(type); |
| | | log.setType1Name(name); |
| | | map.put(log,new LinkedList<>()); |
| | | map.put(type,new LinkedList<>()); |
| | | }else{ //二级 |
| | | for (OperationLog type1Log : type1Logs) { |
| | | if(type.toString().startsWith(type1Log.getType1().toString())){ |
| | | for (Integer type1Log : type1Logs) { |
| | | if(type.toString().startsWith(type1Log.toString())){ |
| | | List<OperationLog> type2Logs = map.get(type1Log); |
| | | OperationLog type2Log = new OperationLog(); |
| | | type2Log.setType2(type); |