mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
fix 导出Excel时设置合并列,指定合并列的第一行数据为空时导致后续无法正常合并
This commit is contained in:
parent
c01ed34602
commit
58236a0d37
@ -73,7 +73,7 @@ public class CellMergeHandler {
|
|||||||
Object val = ReflectUtils.invokeGetter(rowObj, field.getName());
|
Object val = ReflectUtils.invokeGetter(rowObj, field.getName());
|
||||||
|
|
||||||
int colNum = mergeFieldsIndex.get(j);
|
int colNum = mergeFieldsIndex.get(j);
|
||||||
if (!map.containsKey(field)) {
|
if (!map.containsKey(field) || (map.get(field).value() == null && val != null)) {
|
||||||
map.put(field, new RepeatCell(val, i));
|
map.put(field, new RepeatCell(val, i));
|
||||||
} else {
|
} else {
|
||||||
RepeatCell repeatCell = map.get(field);
|
RepeatCell repeatCell = map.get(field);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user