Commit 882786cc by Jbb

经纬度必传 其他字段随意

parent cc2f3402
......@@ -123,7 +123,7 @@ public class TbStLayerDataController {
dateStr = row.getCell(3).getStringCellValue();
System.out.println(jd + "====" + wd + "====" + titleStr + "====" + dateStr);
}*/
if (row.getCell(0) != null && row.getCell(1) != null && row.getCell(2) != null && row.getCell(0) != null) {
if (row.getCell(0) != null && row.getCell(1) != null) {
row.getCell(0).setCellType(Cell.CELL_TYPE_STRING);
row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);
row.getCell(2).setCellType(Cell.CELL_TYPE_STRING);
......@@ -147,8 +147,11 @@ public class TbStLayerDataController {
}
if (j == 3) {
String dateTimeStr = row.getCell(3).getStringCellValue();
Date dateTime = df.parse(dateTimeStr);
point.setTime(dateTime);
if(dateTimeStr != ""){
Date dateTime = df.parse(dateTimeStr);
point.setTime(dateTime);
}
point.setTime(new Date());
}
}
accidentPointService.save(point);
......@@ -183,8 +186,11 @@ public class TbStLayerDataController {
}
if (j == 3) {
String dateTimeStr = row.getCell(3).getStringCellValue();
Date dateTime = df.parse(dateTimeStr);
point.setTime(dateTime);
if(dateTimeStr != ""){
Date dateTime = df.parse(dateTimeStr);
point.setTime(dateTime);
}
point.setTime(new Date());
}
}
accidentPointService.save(point);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment