Browse Source

REPORT-50016 填报属性设置-智能添加单元格组-出现重复单元格

final/10.0
hades 3 years ago
parent
commit
56df61ca0a
  1. 9
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

9
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -431,7 +431,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (oriCellSelection != null && isSameStartPoint(cellselection, oriCellSelection)) { if (oriCellSelection != null && isSameStartPoint(cellselection, oriCellSelection)) {
dealDragSelection(add, cellselection, newValue); dealDragSelection(add, cellselection, newValue);
} else if (cellselection.getSelectedType() == CellSelection.CHOOSE_ROW || cellselection.getSelectedType() == CellSelection.CHOOSE_COLUMN) { } else if (cellselection.getSelectedType() == CellSelection.CHOOSE_ROW || cellselection.getSelectedType() == CellSelection.CHOOSE_COLUMN) {
dealSelectColRow(add, cellselection); dealSelectColRow(add, cellselection, newValue);
} else { } else {
ColumnRow columnRow = ColumnRow.valueOf(cellselection.getColumn(), cellselection.getRow()); ColumnRow columnRow = ColumnRow.valueOf(cellselection.getColumn(), cellselection.getRow());
String allColumnRow = newValue.toString(); String allColumnRow = newValue.toString();
@ -503,12 +503,15 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return cs1.getColumn() == cs2.getColumn() && cs1.getRow() == cs2.getRow(); return cs1.getColumn() == cs2.getColumn() && cs1.getRow() == cs2.getRow();
} }
private void dealSelectColRow(ColumnRowGroup add, CellSelection se) { private void dealSelectColRow(ColumnRowGroup add, CellSelection se, ColumnRowGroup newValue) {
int c = se.getColumn(), cs = se.getColumnSpan(), int c = se.getColumn(), cs = se.getColumnSpan(),
r = se.getRow(), rs = se.getRowSpan(); r = se.getRow(), rs = se.getRowSpan();
for (int i = 0; i < cs; i++) { for (int i = 0; i < cs; i++) {
for (int j = 0; j < rs; j++) { for (int j = 0; j < rs; j++) {
add.addColumnRow(ColumnRow.valueOf(c + i, r + j)); ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j);
if (!newValue.contains(columnRow)) {
add.addColumnRow(columnRow);
}
} }
} }
} }

Loading…
Cancel
Save