Bug修复,导入问题修复

This commit is contained in:
马三炮 2025-05-07 15:09:31 +08:00
parent 163344c469
commit 0be73d96bf
1 changed files with 8 additions and 3 deletions

View File

@ -202,6 +202,7 @@ public class TbTowerServiceImpl implements TbTowerService {
if (!checkParam(tbTower,tbTowerVo.getUploadType())){
log.error("第{}条数据导入失败,数据为空",num);
error.append(","+num);
num++;
continue;
}
tbTowerVoList.get(i).setProId(tbTowerVo.getProId());
@ -216,8 +217,12 @@ public class TbTowerServiceImpl implements TbTowerService {
}catch (Exception e){
log.error("第{}条数据导入失败,错误信息为:{}",num,error);
}
if (error.length()>0){
String msg =error.substring(1);
return "导入成功,第"+msg+"条数据有问题";
}else {
return "导入成功";
}
}else {
return "数据不能为空";
}
@ -229,7 +234,7 @@ public class TbTowerServiceImpl implements TbTowerService {
if (tbTower.getLat().isEmpty() || tbTower.getLat().isEmpty() || tbTower.getTowerName().isEmpty() || tbTower.getSort()==null){
return false;
}
} else if (uploadType.equals("1")) {
} else if (uploadType.equals("2")) {
if (tbTower.getLat().isEmpty() || tbTower.getLat().isEmpty() || tbTower.getTowerName().isEmpty() || tbTower.getSort()==null || tbTower.getCentralMeridian().isEmpty()){
return false;
}