|
@@ -2,6 +2,7 @@ package com.lantone.qc.kernel.catalogue.threelevelward;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
+import com.google.common.collect.Sets;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author HUJING
|
|
* @author HUJING
|
|
@@ -37,7 +39,7 @@ public class THR03071 extends QCCatalogue {
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
Map<String, List<String>> pacsMap = Maps.newHashMap();
|
|
Map<String, List<String>> pacsMap = Maps.newHashMap();
|
|
Map<String, Integer> pacsCount = Maps.newHashMap();
|
|
Map<String, Integer> pacsCount = Maps.newHashMap();
|
|
- Map<String, List<String>> pacsDate = Maps.newHashMap();
|
|
|
|
|
|
+ Map<String, Set<String>> pacsDate = Maps.newHashMap();
|
|
String splitRegex = "[;;]";
|
|
String splitRegex = "[;;]";
|
|
for (PacsDoc pacsDoc : pacsDocs) {
|
|
for (PacsDoc pacsDoc : pacsDocs) {
|
|
Map<String, String> structureMap = pacsDoc.getStructureMap();
|
|
Map<String, String> structureMap = pacsDoc.getStructureMap();
|
|
@@ -52,7 +54,7 @@ public class THR03071 extends QCCatalogue {
|
|
// }
|
|
// }
|
|
String[] itemDiags = itemDiag.split(splitRegex);
|
|
String[] itemDiags = itemDiag.split(splitRegex);
|
|
List<String> itemDiagList = Lists.newArrayList(itemDiags);
|
|
List<String> itemDiagList = Lists.newArrayList(itemDiags);
|
|
- List<String> itemDateList = Lists.newArrayList(itemDate);
|
|
|
|
|
|
+ Set<String> itemDateList = Sets.newHashSet(DateUtil.formatDate(StringUtil.parseDateTime(itemDate)));
|
|
if (pacsMap.containsKey(itemName)) {
|
|
if (pacsMap.containsKey(itemName)) {
|
|
pacsMap.get(itemName).addAll(itemDiagList);
|
|
pacsMap.get(itemName).addAll(itemDiagList);
|
|
pacsDate.get(itemName).addAll(itemDateList);
|
|
pacsDate.get(itemName).addAll(itemDateList);
|
|
@@ -127,13 +129,10 @@ public class THR03071 extends QCCatalogue {
|
|
* @param reptNm
|
|
* @param reptNm
|
|
* @param pacsDate
|
|
* @param pacsDate
|
|
*/
|
|
*/
|
|
- private void infoAppend(StringBuffer sb, String reptNm, Map<String, List<String>> pacsDate) {
|
|
|
|
-
|
|
|
|
- for (Map.Entry<String, List<String>> map : pacsDate.entrySet()) {
|
|
|
|
- if (reptNm.equals(map.getKey())) {
|
|
|
|
- for (String date : map.getValue()) {
|
|
|
|
- sb.append(reptNm).append("(").append(DateUtil.formatDate(StringUtil.parseDateTime(date))).append(")").append("、");
|
|
|
|
- }
|
|
|
|
|
|
+ private void infoAppend(StringBuffer sb, String reptNm, Map<String, Set<String>> pacsDate) {
|
|
|
|
+ if (pacsDate.containsKey(reptNm)) {
|
|
|
|
+ for (String date : pacsDate.get(reptNm)) {
|
|
|
|
+ sb.append(reptNm).append("(").append(DateUtil.formatDate(StringUtil.parseDateTime(date))).append(")").append("、");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|