动态 Table 功能优化

yun-zuoyi
wei.peng 7 years ago
parent 22c9a7cc20
commit adbcbb16a0

@ -15,6 +15,8 @@ import java.util.Date;
@Data
public class DynTableCell {
// 单元格名称
private String cellKey;
// 排序
private Integer cellSeq;
// 单元格名称

@ -54,23 +54,25 @@ public class DynTablePackTool {
* @return
*/
public static DynTableCell getTableCell(Integer seq,String name,Object value) {
return getTableCell(seq, name, null, value,null);
return getTableCell(seq,seq.toString(), name, null, value,null);
}
public static DynTableCell getTableCell(Integer seq,String name,Object value,Integer valueType) {
return getTableCell(seq, name, null, value,valueType);
return getTableCell(seq,seq.toString(), name, null, value,valueType);
}
/**
*
* @param seq
* @param key Key
* @param name
* @param nameEn En
* @param value
* @return
*/
public static DynTableCell getTableCell(Integer seq,String name,String nameEn,Object value,Integer valueType){
public static DynTableCell getTableCell(Integer seq,String key,String name,String nameEn,Object value,Integer valueType){
DynTableCell cell = new DynTableCell();
cell.setCellKey(key);
cell.setCellSeq(seq);
cell.setCellName(name);
cell.setCellNameEn(nameEn);

@ -27,16 +27,16 @@ public class DynTableRow {
private Integer cellSize = 0;
// 行数据
private List<DynTableCell> cellList = new ArrayList<>();
private Map<String,DynTableCell> cellMap = new HashMap<>();
public DynTableRow addList(DynTableCell cell){
this.cellList.add(cell);
public DynTableRow putCell(DynTableCell cell){
this.cellMap.put(cell.getCellKey(),cell);
return this;
}
public Integer getCellSize() {
return cellList != null ? cellList.size() : 0;
return cellMap != null ? cellMap.size() : 0;
}
/**

Loading…
Cancel
Save