main
黄海 2 years ago
parent df15a5029a
commit 57b0763e80

@ -605,7 +605,7 @@ public class CollectModel {
String column_name, original_name;
for (int colNum = 0; colNum < ed.getLastCellNum(); colNum++) {
if (StrKit.isBlank(ed.getCell(colNum).toString())) {
if (StrKit.isBlank(ed.getCell(colNum).toString())) {//下面没有,应该听上面的
original_name = CommonUtil.removeKuoHao(st.getCell(colNum).toString().replace("\n", ""));
column_name = ChineseCharacterUtil.getColumnNameByMemo(CommonUtil.removeKuoHao(st.getCell(colNum).toString()));
Record record = new Record();
@ -613,12 +613,19 @@ public class CollectModel {
record.set("column_name", column_name);
list.add(record);
} else {
int k = colNum;
int k = colNum;//如果最后一列有值
while (StrKit.isBlank(st.getCell(k).toString())) k--;
if (k == colNum) {
original_name = st.getCell(k).toString().replace("\n", "");
column_name = ChineseCharacterUtil.getColumnNameByMemo(CommonUtil.removeKuoHao(st.getCell(k).toString()));
} else {
original_name = st.getCell(k).toString().replace("\n", "")
+ "_" + ed.getCell(colNum).toString().replace("\n", "");
column_name = ChineseCharacterUtil.getColumnNameByMemo(CommonUtil.removeKuoHao(st.getCell(k).toString()))
+ "_" + ChineseCharacterUtil.getColumnNameByMemo(CommonUtil.removeKuoHao(ed.getCell(colNum).toString()));
}
Record record = new Record();
record.set("original_name", original_name);
record.set("column_name", column_name.toLowerCase());

Loading…
Cancel
Save