|
@@ -206,7 +206,7 @@ public class TrialSummaryController {
|
|
String tabPkeyId = entry.getKey().split("###")[1];
|
|
String tabPkeyId = entry.getKey().split("###")[1];
|
|
|
|
|
|
List<TrialSummaryExcelTabReflection> value = entry.getValue();
|
|
List<TrialSummaryExcelTabReflection> value = entry.getValue();
|
|
- Map<String, String> elementKeyWithHtmlKeyNameMap = value.stream().collect(Collectors.toMap(TrialSummaryExcelTabReflection::getElementKey, TrialSummaryExcelTabReflection::getHtmlKeyName));
|
|
|
|
|
|
+ Map<String, List<TrialSummaryExcelTabReflection>> elementKeyWithHtmlKeyNameMap = value.stream().collect(Collectors.groupingBy(TrialSummaryExcelTabReflection::getElementKey));
|
|
Set<String> elementKeys = elementKeyWithHtmlKeyNameMap.keySet();
|
|
Set<String> elementKeys = elementKeyWithHtmlKeyNameMap.keySet();
|
|
|
|
|
|
String sql_3 = "SELECT " + String.join(",", elementKeys) + " FROM " + tabName + " WHERE p_key_id = " + tabPkeyId + " AND group_id in(" + StringUtils.join(recordIds, ",") + ")";
|
|
String sql_3 = "SELECT " + String.join(",", elementKeys) + " FROM " + tabName + " WHERE p_key_id = " + tabPkeyId + " AND group_id in(" + StringUtils.join(recordIds, ",") + ")";
|
|
@@ -216,12 +216,12 @@ public class TrialSummaryController {
|
|
}
|
|
}
|
|
|
|
|
|
for (String elementKey : elementKeys) {
|
|
for (String elementKey : elementKeys) {
|
|
- String htmlKeyName = elementKeyWithHtmlKeyNameMap.getOrDefault(elementKey, null);
|
|
|
|
- if (ObjectUtil.isEmpty(htmlKeyName)) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
for (Map<String, Object> stringObjectMap : tabDataList) {
|
|
for (Map<String, Object> stringObjectMap : tabDataList) {
|
|
|
|
+ stringObjectMap.entrySet().removeIf(obj -> obj.getValue() == null || obj.getValue().equals(""));
|
|
Object tabData = stringObjectMap.getOrDefault(elementKey, null);
|
|
Object tabData = stringObjectMap.getOrDefault(elementKey, null);
|
|
|
|
+ if (ObjectUtil.isEmpty(tabData)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
|
|
String tabDataStr = (String) tabData;
|
|
String tabDataStr = (String) tabData;
|
|
//跨行
|
|
//跨行
|