JiangChongBo пре 2 година
родитељ
комит
d707347a23
1 измењених фајлова са 16 додато и 10 уклоњено
  1. 16 10
      src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

+ 16 - 10
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -680,17 +680,23 @@ public class AuthServiceImpl implements AuthService {
                 }
                 // 校验经纬度
                 cell = authPartyRow.getCell(3);
-                cell.setCellType(CellType.STRING);
-                String lngAndLat = cell.getStringCellValue();
-                if (StringUtils.isBlank(lngAndLat)) {
-                    return ResponseJson.error("第" + i + 1 + "行经纬度不能为空");
-                }
-                String[] split = lngAndLat.split(",");
-                if (2 != split.length) {
-                    return ResponseJson.error("第" + i + 1 + "行经纬度格式错误");
+                String lngAndLat = null;
+                BigDecimal lng = null;
+                BigDecimal lat = null;
+                if(null != cell){
+                    cell.setCellType(CellType.STRING);
+                    lngAndLat = cell.getStringCellValue();
+//                    String[] split = lngAndLat.split(",");
+//                    lng = new BigDecimal(split[0]);
+//                    lat = new BigDecimal(split[1]);
                 }
-                BigDecimal lng = new BigDecimal(split[0]);
-                BigDecimal lat = new BigDecimal(split[1]);
+//                if (StringUtils.isBlank(lngAndLat)) {
+//                    return ResponseJson.error("第" + i + 1 + "行经纬度不能为空");
+//                }
+//                if (2 != split.length) {
+//                    return ResponseJson.error("第" + i + 1 + "行经纬度格式错误");
+//                }
+
                 // 校验联系电话
                 cell = authPartyRow.getCell(4);
                 cell.setCellType(CellType.STRING);