|
@@ -3,6 +3,7 @@ package com.lantone.qc.trans.comsis;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.pub.util.FileUtil;
|
|
|
+import com.lantone.qc.pub.util.MapUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.changx.util.CxXmlUtil;
|
|
|
import com.lantone.qc.trans.taizhou.util.TzXmlUtil;
|
|
@@ -19,6 +20,7 @@ public class OrdinaryAssistant {
|
|
|
|
|
|
public static Map<String, String> mapKeyContrast(Map<String, String> sourceMap, List<String> keyContrasts) {
|
|
|
Map<String, String> retMap = Maps.newHashMap();
|
|
|
+ Map<String, String> sourceMap_ = MapUtil.copyMap((Map) sourceMap);
|
|
|
String[] arry = null;
|
|
|
String sourceKey = null, targetKey;
|
|
|
for (String keyContrast : keyContrasts) {
|
|
@@ -29,10 +31,10 @@ public class OrdinaryAssistant {
|
|
|
} else {
|
|
|
targetKey = arry[1];
|
|
|
}
|
|
|
- retMap.put(targetKey, sourceMap.get(sourceKey));
|
|
|
- sourceMap.remove(sourceKey);
|
|
|
+ retMap.put(targetKey, sourceMap_.get(sourceKey));
|
|
|
+ sourceMap_.remove(sourceKey);
|
|
|
}
|
|
|
- retMap.putAll(sourceMap);
|
|
|
+ retMap.putAll(sourceMap_);
|
|
|
return retMap;
|
|
|
}
|
|
|
|
|
@@ -67,10 +69,10 @@ public class OrdinaryAssistant {
|
|
|
});
|
|
|
|
|
|
|
|
|
-// xmlNodeValueMap.keySet().forEach(key -> {
|
|
|
-// System.out.println("\"" + key + "=\",");
|
|
|
-//
|
|
|
-// });
|
|
|
+ // xmlNodeValueMap.keySet().forEach(key -> {
|
|
|
+ // System.out.println("\"" + key + "=\",");
|
|
|
+ //
|
|
|
+ // });
|
|
|
|
|
|
|
|
|
}
|