|
@@ -460,34 +460,41 @@ public class AssembleAggregate {
|
|
|
Map<String, Map<String, List<String>>> subMap = configMap.get(name);
|
|
|
if (subMap.containsKey(hisDetailName)) {
|
|
|
if (type.equals(ConceptTypeEnum.Drug.getKey())) {
|
|
|
- for (Map.Entry<String, List<String>> thirdEntry : subMap.get(hisDetailName).entrySet()) {
|
|
|
- if (ListUtil.isNotEmpty(thirdEntry.getValue())) {
|
|
|
- for (String form : thirdEntry.getValue()) {
|
|
|
+ if (MapUtils.isNotEmpty(subMap.get(hisDetailName))) {
|
|
|
+ for (Map.Entry<String, List<String>> thirdEntry : subMap.get(hisDetailName).entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(thirdEntry.getValue())) {
|
|
|
+ for (String form : thirdEntry.getValue()) {
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
|
|
|
+ setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
+ Method setForm = o.getClass().getMethod("setForm", String.class);
|
|
|
+ setForm.invoke(o, form);
|
|
|
+ retList.add(o);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
|
|
|
setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
- Method setForm = o.getClass().getMethod("setForm", String.class);
|
|
|
- setForm.invoke(o, form);
|
|
|
retList.add(o);
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ retList.add(item);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
|
|
|
+ if (ListUtil.isNotEmpty(standNames)) {
|
|
|
+ for (String stdName : standNames) {
|
|
|
T o = (T) item.getClass().newInstance();
|
|
|
BeanUtil.copyProperties(item, o);
|
|
|
Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
|
|
|
- setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
+ setUniqueName.invoke(o, stdName);
|
|
|
retList.add(o);
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
|
|
|
- for (String stdName : standNames) {
|
|
|
- T o = (T) item.getClass().newInstance();
|
|
|
- BeanUtil.copyProperties(item, o);
|
|
|
- Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
|
|
|
- setUniqueName.invoke(o, stdName);
|
|
|
- retList.add(o);
|
|
|
+ } else {
|
|
|
+ retList.add(item);
|
|
|
}
|
|
|
}
|
|
|
} else {
|