2018-05-31 10:09:29 +08:00
|
|
|
|
package com.nis.util;
|
|
|
|
|
|
|
2018-05-31 17:07:16 +08:00
|
|
|
|
import java.util.ArrayList;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
import java.util.HashMap;
|
2018-07-17 09:47:12 +08:00
|
|
|
|
import java.util.HashSet;
|
2018-05-31 17:07:16 +08:00
|
|
|
|
import java.util.List;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
import java.util.Map;
|
2018-07-17 09:47:12 +08:00
|
|
|
|
import java.util.Set;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
|
2018-06-04 17:52:03 +08:00
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
|
|
|
|
|
import com.nis.domain.MaatXmlExpr;
|
2018-08-03 18:08:46 +08:00
|
|
|
|
import com.nis.restful.RestBusinessCode;
|
|
|
|
|
|
import com.nis.restful.ServiceRuntimeException;
|
2018-06-04 17:52:03 +08:00
|
|
|
|
|
2018-05-31 10:09:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
*
|
|
|
|
|
|
* <p>Title: ServiceAndRDBIndexReal</p>
|
|
|
|
|
|
* <p>Description: 业务类型与各个表名的对应关系,业务类型与redisDBIndex的对应关系</p>
|
|
|
|
|
|
* <p>Company: IIE</p>
|
|
|
|
|
|
* @author rkg
|
|
|
|
|
|
* @date 2018年5月30日
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class ServiceAndRDBIndexReal {
|
2018-06-04 17:52:03 +08:00
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(ServiceAndRDBIndexReal.class);
|
2018-05-31 10:09:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 第一个key是业务类型,第二个key是type(编译配置,分组配置,域配置)value是表名
|
|
|
|
|
|
*/
|
2018-06-11 14:47:03 +08:00
|
|
|
|
private static Map<Integer, Map<Integer, List<String>>> sercieNameMap = new HashMap<Integer, Map<Integer, List<String>>>();
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 非maat结构业务类型与表名对应关系,key是业务类型,value是表名
|
|
|
|
|
|
*/
|
|
|
|
|
|
private static Map<Integer, String> unMaatSercieNameMap = new HashMap<Integer, String>();
|
|
|
|
|
|
|
2018-05-31 10:09:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* key是业务类型,value是业务类型对应的redisdbIndex
|
|
|
|
|
|
*/
|
2018-05-31 17:07:16 +08:00
|
|
|
|
private static Map<Integer, List<Integer>> serviceDBIndexmap = new HashMap<Integer, List<Integer>>();
|
2018-06-04 15:14:52 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* key是业务类型,value是业务类型对应的动作(action)
|
|
|
|
|
|
*/
|
|
|
|
|
|
private static Map<Integer, Integer> serviceActionMap = new HashMap<Integer, Integer>();
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 保存maat分发到阀门需要添加到域的属性:maat2Valve
|
|
|
|
|
|
* Map<service,Map<regionType,fields>>
|
|
|
|
|
|
*/
|
2018-07-17 09:47:12 +08:00
|
|
|
|
private static Map<Integer, Map<String, String[]>> maatToValveMap = new HashMap<Integer, Map<String, String[]>>();
|
|
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 阀门保存的redis数据库Index,在seriveTable.properties中定义
|
|
|
|
|
|
*/
|
|
|
|
|
|
private static Integer valveDBIndex = 7;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
static {
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
|
|
|
|
|
String unMaatService = Configurations.getStringProperty("unMaatService", "");
|
|
|
|
|
|
if (unMaatService != null && !unMaatService.trim().equals("")) {
|
|
|
|
|
|
String[] split = unMaatService.split(";");
|
|
|
|
|
|
for (String str : split) {
|
|
|
|
|
|
String[] serviceAction = str.split(":");
|
|
|
|
|
|
serviceActionMap.put(Integer.valueOf(serviceAction[0]), Integer.valueOf(serviceAction[1]));
|
2018-06-04 17:52:03 +08:00
|
|
|
|
|
2018-06-04 16:25:20 +08:00
|
|
|
|
String serviceType = Configurations.getStringProperty(serviceAction[0], "");
|
|
|
|
|
|
if (serviceType != null && !serviceType.trim().equals("")) {
|
|
|
|
|
|
String[] typeArrs = serviceType.split(";");
|
|
|
|
|
|
for (String typeStr : typeArrs) {
|
|
|
|
|
|
String[] typeArr = typeStr.split(":");
|
|
|
|
|
|
String tableNameArr[] = typeArr[1].split(",");
|
|
|
|
|
|
for (String tableName : tableNameArr) {
|
|
|
|
|
|
unMaatSercieNameMap.put(Integer.parseInt(serviceAction[0]), tableName.toUpperCase());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-05-31 10:09:29 +08:00
|
|
|
|
String service = Configurations.getStringProperty("service", "");
|
|
|
|
|
|
if (service != null && !service.trim().equals("")) {
|
|
|
|
|
|
String[] split = service.split(";");
|
|
|
|
|
|
for (String str : split) {
|
2018-06-04 15:14:52 +08:00
|
|
|
|
String[] serviceAction = str.split(":");
|
|
|
|
|
|
serviceActionMap.put(Integer.valueOf(serviceAction[0]), Integer.valueOf(serviceAction[1]));
|
|
|
|
|
|
String type = Configurations.getStringProperty(serviceAction[0], "");
|
2018-05-31 10:09:29 +08:00
|
|
|
|
if (type != null && !type.trim().equals("")) {
|
2018-06-11 14:47:03 +08:00
|
|
|
|
Map<Integer, List<String>> typeMap = new HashMap<Integer, List<String>>();
|
2018-05-31 10:09:29 +08:00
|
|
|
|
String[] typeArrs = type.split(";");
|
|
|
|
|
|
for (String typeStr : typeArrs) {
|
|
|
|
|
|
String[] typeArr = typeStr.split(":");
|
2018-06-11 14:47:03 +08:00
|
|
|
|
int tableType = Integer.parseInt(typeArr[0]);
|
2018-05-31 10:09:29 +08:00
|
|
|
|
String tableNameArr[] = typeArr[1].split(",");
|
|
|
|
|
|
for (String tableName : tableNameArr) {
|
2018-06-11 14:47:03 +08:00
|
|
|
|
if (typeMap.containsKey(tableType)) {
|
|
|
|
|
|
typeMap.get(tableType).add(tableName.toUpperCase());
|
|
|
|
|
|
} else {
|
|
|
|
|
|
List<String> list = new ArrayList<String>();
|
|
|
|
|
|
list.add(tableName.toUpperCase());
|
|
|
|
|
|
typeMap.put(tableType, list);
|
|
|
|
|
|
}
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-06-04 15:14:52 +08:00
|
|
|
|
sercieNameMap.put(Integer.parseInt(serviceAction[0]), typeMap);
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
String serviceDBIndexs = Configurations.getStringProperty("serviceDBIndex", "");
|
|
|
|
|
|
if (serviceDBIndexs != null && !serviceDBIndexs.trim().equals("")) {
|
|
|
|
|
|
String[] serviceDBIndexArr = serviceDBIndexs.split(";");
|
|
|
|
|
|
for (String serviceDBIndexStr : serviceDBIndexArr) {
|
|
|
|
|
|
String[] serviceDBIndex = serviceDBIndexStr.split(":");
|
2018-05-31 17:07:16 +08:00
|
|
|
|
List<Integer> redisDbList = new ArrayList<Integer>();
|
2018-05-31 10:09:29 +08:00
|
|
|
|
String[] redisDbArr = serviceDBIndex[1].split(",");
|
2018-05-31 17:07:16 +08:00
|
|
|
|
for (String redisDbStr : redisDbArr) {
|
|
|
|
|
|
redisDbList.add(Integer.valueOf(redisDbStr));
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
2018-05-31 17:07:16 +08:00
|
|
|
|
serviceDBIndexmap.put(Integer.parseInt(serviceDBIndex[0]), redisDbList);
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
String maat2Valve = Configurations.getStringProperty("maat2Valve", "");
|
2018-07-17 09:47:12 +08:00
|
|
|
|
if (maat2Valve != null && !maat2Valve.trim().equals("")) {
|
|
|
|
|
|
String[] maat2ValveAry = maat2Valve.split(";");
|
2018-06-28 18:52:23 +08:00
|
|
|
|
for (String maat2ValveStr : maat2ValveAry) {
|
2018-07-17 09:47:12 +08:00
|
|
|
|
String[] serviceAndRegion = maat2ValveStr.split(":");
|
|
|
|
|
|
if (serviceAndRegion != null && serviceAndRegion.length == 2) {
|
|
|
|
|
|
String[] regionAndFields = serviceAndRegion[1].split("@");
|
|
|
|
|
|
Map<String, String[]> fieldMap = new HashMap<String, String[]>();
|
|
|
|
|
|
String[] fields = regionAndFields[1].split("&");
|
|
|
|
|
|
// 同一service有不同的域类型,多个之间用“|”分隔
|
2018-06-28 18:52:23 +08:00
|
|
|
|
if (regionAndFields[0].contains("|")) {
|
2018-07-17 09:47:12 +08:00
|
|
|
|
String[] regionTypeAry = regionAndFields[0].split("\\|");
|
2018-06-28 18:52:23 +08:00
|
|
|
|
for (String regionType : regionTypeAry) {
|
|
|
|
|
|
fieldMap.put(regionType, fields);
|
|
|
|
|
|
}
|
2018-07-17 09:47:12 +08:00
|
|
|
|
} else {
|
2018-06-28 18:52:23 +08:00
|
|
|
|
fieldMap.put(regionAndFields[0], fields);
|
|
|
|
|
|
}
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
maatToValveMap.put(Integer.parseInt(serviceAndRegion[0]), fieldMap);
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
2018-07-17 09:47:12 +08:00
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
getUnMaatTable();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void getUnMaatTable() {
|
|
|
|
|
|
Map<Integer, String> typeTable = new HashMap<Integer, String>();
|
|
|
|
|
|
|
|
|
|
|
|
String unMaatService = Configurations.getStringProperty("unMaatService", "");
|
|
|
|
|
|
if (unMaatService != null && !unMaatService.trim().equals("")) {
|
|
|
|
|
|
String[] split = unMaatService.split(";");
|
|
|
|
|
|
for (String str : split) {
|
|
|
|
|
|
String[] serviceAction = str.split(":");
|
|
|
|
|
|
String serviceType = Configurations.getStringProperty(serviceAction[0], "");
|
|
|
|
|
|
if (serviceType != null && !serviceType.trim().equals("")) {
|
|
|
|
|
|
String[] typeArrs = serviceType.split(";");
|
|
|
|
|
|
for (String typeStr : typeArrs) {
|
|
|
|
|
|
String[] typeArr = typeStr.split(":");
|
|
|
|
|
|
String tableNameArr[] = typeArr[1].split(",");
|
|
|
|
|
|
for (String tableName : tableNameArr) {
|
|
|
|
|
|
if (!typeTable.containsKey(Integer.parseInt(serviceAction[0]))) {
|
|
|
|
|
|
typeTable.put(Integer.parseInt(serviceAction[0]), tableName.toUpperCase());
|
|
|
|
|
|
} else {
|
|
|
|
|
|
System.out.println();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unMaatSercieNameMap.put(Integer.parseInt(serviceAction[0]), tableName.toUpperCase());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
for (Integer service : typeTable.keySet()) {
|
|
|
|
|
|
List<MaatXmlExpr> expressionList = ReadMaatXmlUtil.getMaatConfigByService(service).getExpressionList();
|
|
|
|
|
|
for (MaatXmlExpr maatXmlExpr : expressionList) {
|
|
|
|
|
|
if (maatXmlExpr.getValueExpression() != null) {
|
|
|
|
|
|
String[] valSplit = maatXmlExpr.getValueExpression().split(";");
|
2018-08-14 14:25:09 +08:00
|
|
|
|
int a = 1;
|
2018-07-17 09:47:12 +08:00
|
|
|
|
for (int i = 0; i < valSplit.length; i++) {
|
|
|
|
|
|
if (valSplit[i].toLowerCase().contains("is_valid")) {// xml中是字符串的\t这里判断的时候需要转义为\\t,但是添加的时候需要添加\t不是\\t
|
2018-08-14 14:25:09 +08:00
|
|
|
|
System.out.println(service + "--" + typeTable.get(service) + "---" + a);
|
|
|
|
|
|
} else if (valSplit[i].toLowerCase().contains("[")) {
|
2018-07-17 09:47:12 +08:00
|
|
|
|
a++;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void getMaatTable() {
|
|
|
|
|
|
Map<Integer, Set<String>> typeMap = new HashMap<Integer, Set<String>>();
|
|
|
|
|
|
String service = Configurations.getStringProperty("service", "");
|
|
|
|
|
|
if (service != null && !service.trim().equals("")) {
|
|
|
|
|
|
String[] split = service.split(";");
|
|
|
|
|
|
for (String str : split) {
|
|
|
|
|
|
String[] serviceAction = str.split(":");
|
|
|
|
|
|
serviceActionMap.put(Integer.valueOf(serviceAction[0]), Integer.valueOf(serviceAction[1]));
|
|
|
|
|
|
String type = Configurations.getStringProperty(serviceAction[0], "");
|
|
|
|
|
|
if (type != null && !type.trim().equals("")) {
|
|
|
|
|
|
|
|
|
|
|
|
String[] typeArrs = type.split(";");
|
|
|
|
|
|
for (String typeStr : typeArrs) {
|
|
|
|
|
|
String[] typeArr = typeStr.split(":");
|
|
|
|
|
|
int tableType = Integer.parseInt(typeArr[0]);
|
|
|
|
|
|
String tableNameArr[] = typeArr[1].split(",");
|
|
|
|
|
|
for (String tableName : tableNameArr) {
|
|
|
|
|
|
if (typeMap.containsKey(tableType)) {
|
|
|
|
|
|
typeMap.get(tableType).add(tableName.toUpperCase());
|
|
|
|
|
|
} else {
|
|
|
|
|
|
Set<String> list = new HashSet<String>();
|
|
|
|
|
|
list.add(tableName.toUpperCase());
|
|
|
|
|
|
typeMap.put(tableType, list);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
for (Integer type : typeMap.keySet()) {
|
|
|
|
|
|
System.out.println(type + "----" + typeMap.get(type));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-06-04 16:25:20 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 根据业务类型获取这个
|
|
|
|
|
|
* @param service
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2018-05-31 17:07:16 +08:00
|
|
|
|
public static List<Integer> getRedisDBByService(Integer service) {
|
|
|
|
|
|
List<Integer> redisIndexList = serviceDBIndexmap.get(service);
|
|
|
|
|
|
if (redisIndexList == null) {
|
|
|
|
|
|
return null;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
2018-05-31 17:07:16 +08:00
|
|
|
|
return redisIndexList;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2018-06-04 17:52:03 +08:00
|
|
|
|
* 根据业务类型和具体的type获取maat类型对应的表名
|
2018-05-31 10:09:29 +08:00
|
|
|
|
* @param service 业务类型
|
|
|
|
|
|
* @param type 10代表是编译配置,11代表是分组配置,12代表是ip类域配置,13代表是数值类配置,14代表是字符串类域配置,15代表是增强字符串类域配置
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2018-06-04 17:52:03 +08:00
|
|
|
|
public static String getMaatTableName(int service, int type, String tableName) {
|
2018-06-11 14:47:03 +08:00
|
|
|
|
Map<Integer, List<String>> typeMap = sercieNameMap.get(service);
|
2018-05-31 10:09:29 +08:00
|
|
|
|
if (typeMap != null && typeMap.size() > 0) {
|
2018-06-11 14:47:03 +08:00
|
|
|
|
List<String> tableList = typeMap.get(type);
|
2018-08-14 14:25:09 +08:00
|
|
|
|
if (tableList != null && tableList.size() > 0) {
|
|
|
|
|
|
if (tableName == null || tableName.trim().equals("")) {
|
|
|
|
|
|
if (tableList.size() > 1) {
|
|
|
|
|
|
logger.error("未从业务类型和表对应关系中,找到业务类型:{},配置类型:{}表名:{}对应的真实表名", service, type, tableName);
|
|
|
|
|
|
throw new ServiceRuntimeException("在applicationConfig-rule.properties配置文件中,业务类型:" + service
|
|
|
|
|
|
+ ",配置类型:" + type + "对应多个表,请输入具体的表名", RestBusinessCode.NotFoundTableName.getValue());
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return tableList.get(0);
|
2018-07-17 09:47:12 +08:00
|
|
|
|
}
|
2018-06-28 18:52:23 +08:00
|
|
|
|
} else {
|
2018-08-14 14:25:09 +08:00
|
|
|
|
// 保存tableName在表名列表中的序号
|
|
|
|
|
|
int index = -1;
|
|
|
|
|
|
for (int i = 0; i < tableList.size(); i++) {
|
|
|
|
|
|
String str = tableList.get(i);
|
|
|
|
|
|
if (str.toLowerCase().contains(tableName.toLowerCase())) {
|
|
|
|
|
|
index = i;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (index != -1 && tableList != null) {
|
|
|
|
|
|
return tableList.get(index);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
logger.error("未从业务类型和表对应关系中,找到业务类型:{},配置类型:{}表名:{}对应的真实表名", service, type, tableName);
|
|
|
|
|
|
throw new ServiceRuntimeException("无法从applicationConfig-rule.properties配置文件中,找到回调类配置service为"
|
|
|
|
|
|
+ service + ",配置类型:" + type + "对应的真实表名", RestBusinessCode.NotFoundTableName.getValue());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-06-04 17:52:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
2018-06-04 17:52:03 +08:00
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-05-31 10:09:29 +08:00
|
|
|
|
|
2018-06-04 17:52:03 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 根据业务类型获取unmaat配置表名
|
|
|
|
|
|
* @param service
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static String getUnMaatTableName(int service) {
|
|
|
|
|
|
if (unMaatSercieNameMap != null && unMaatSercieNameMap.size() > 0) {
|
|
|
|
|
|
return unMaatSercieNameMap.get(service);
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
2018-06-04 15:14:52 +08:00
|
|
|
|
public static Integer getActionByService(Integer service) {
|
|
|
|
|
|
return serviceActionMap.get(service);
|
|
|
|
|
|
}
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
2018-06-11 14:47:03 +08:00
|
|
|
|
public static Map<Integer, Map<Integer, List<String>>> getSercieNameMap() {
|
2018-06-02 14:55:42 +08:00
|
|
|
|
return sercieNameMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-06-11 14:47:03 +08:00
|
|
|
|
public static void setSercieNameMap(Map<Integer, Map<Integer, List<String>>> sercieNameMap) {
|
2018-06-02 14:55:42 +08:00
|
|
|
|
ServiceAndRDBIndexReal.sercieNameMap = sercieNameMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Map<Integer, List<Integer>> getServiceDBIndexmap() {
|
|
|
|
|
|
return serviceDBIndexmap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void setServiceDBIndexmap(Map<Integer, List<Integer>> serviceDBIndexmap) {
|
|
|
|
|
|
ServiceAndRDBIndexReal.serviceDBIndexmap = serviceDBIndexmap;
|
|
|
|
|
|
}
|
2018-06-04 16:25:20 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
public static Map<Integer, Map<String, String[]>> getMaatToValveMap() {
|
|
|
|
|
|
return maatToValveMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-07-17 09:47:12 +08:00
|
|
|
|
public static void setMaatToValveMap(Map<Integer, Map<String, String[]>> maatToValveMap) {
|
2018-06-28 18:52:23 +08:00
|
|
|
|
ServiceAndRDBIndexReal.maatToValveMap = maatToValveMap;
|
|
|
|
|
|
}
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @param valveDBIndex the valveDBIndex to set
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static void setValveDBIndex(Integer valveDBIndex) {
|
|
|
|
|
|
ServiceAndRDBIndexReal.valveDBIndex = valveDBIndex;
|
|
|
|
|
|
}
|
2018-07-17 09:47:12 +08:00
|
|
|
|
|
2018-06-28 18:52:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @return the valveDBIndex
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static Integer getValveDBIndex() {
|
|
|
|
|
|
return valveDBIndex;
|
|
|
|
|
|
}
|
2018-08-16 18:43:29 +08:00
|
|
|
|
|
|
|
|
|
|
public static Map<Integer, String> getUnMaatSercieNameMap() {
|
|
|
|
|
|
return unMaatSercieNameMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void setUnMaatSercieNameMap(Map<Integer, String> unMaatSercieNameMap) {
|
|
|
|
|
|
ServiceAndRDBIndexReal.unMaatSercieNameMap = unMaatSercieNameMap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-31 10:09:29 +08:00
|
|
|
|
}
|