|
@@ -850,12 +850,24 @@ public class MedRuleConvertFacade {
|
|
|
if (ListUtil.isEmpty(entry.getValue())) {
|
|
|
continue;
|
|
|
}
|
|
|
- Integer num = 0;
|
|
|
- List<String> baseIdList = Arrays.asList(entry.getKey().split("\\|"));
|
|
|
- for (Long ruleId : entry.getValue()) {
|
|
|
- retList.add(baseNestMap.get(ruleId).get(baseIdList.get(num++)));
|
|
|
- if (num == baseIdList.size()) {
|
|
|
- num = 0;
|
|
|
+
|
|
|
+ List<String> baseIdList = Arrays.asList(entry.getKey().split("\\|")).stream().sorted().collect(Collectors.toList());
|
|
|
+ if (baseIdList.size() > entry.getValue().size()) {
|
|
|
+ Integer num = 0;
|
|
|
+ List<Long> ruleIds = entry.getValue().stream().collect(Collectors.toList());
|
|
|
+ for (String cond : baseIdList) {
|
|
|
+ retList.add(baseNestMap.get(ruleIds.get(num++)).get(cond));
|
|
|
+ if (num == ruleIds.size()) {
|
|
|
+ num = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Integer num = 0;
|
|
|
+ for (Long ruleId : entry.getValue()) {
|
|
|
+ retList.add(baseNestMap.get(ruleId).get(baseIdList.get(num++)));
|
|
|
+ if (num == baseIdList.size()) {
|
|
|
+ num = 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|