|
|
@ -402,7 +402,7 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
|
TemplateExportParams templatePath = new TemplateExportParams("excel/building_export.xlsx"); |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
map.put("maplist",icBuildingExcels); |
|
|
|
ExcelPoiUtils.exportExcel(templatePath ,map,"楼宇信息录入表",response); |
|
|
|
ExcelPoiUtils.exportExcel(templatePath ,map,"楼栋信息录入表",response); |
|
|
|
return ; |
|
|
|
} |
|
|
|
@Override |
|
|
@ -535,7 +535,7 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
|
List<IcHouseEntity> icHouseEntities = icHouseDao.selectList(new QueryWrapper<IcHouseEntity>().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId())); |
|
|
|
if(!CollectionUtils.isEmpty(icHouseEntities)){ |
|
|
|
//
|
|
|
|
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼宇单元下存在房屋,无法更新"); |
|
|
|
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼栋单元下存在房屋,无法更新"); |
|
|
|
// icHouseEntities.forEach(item->{
|
|
|
|
// item.setNeighborHoodId(formDTO.getNeighborHoodId());
|
|
|
|
// });
|
|
|
@ -564,7 +564,7 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
|
icBuildingUnitService.insertBatch(unitList); |
|
|
|
}else{ |
|
|
|
//如果小于,判断是否存在房屋,如果存在就提示不能更改
|
|
|
|
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼宇单元下存在房屋,无法更新"); |
|
|
|
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼栋单元下存在房屋,无法更新"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -581,7 +581,7 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
|
//如果存在房屋,无法删除
|
|
|
|
List<IcHouseEntity> icHouseEntities = icHouseDao.selectList(new QueryWrapper<IcHouseEntity>().lambda().eq(IcHouseEntity::getBuildingId, buildingId)); |
|
|
|
if(!CollectionUtils.isEmpty(icHouseEntities)){ |
|
|
|
throw new RenException(EpmetErrorCode.ORG_DEL_FAILED.getCode(),"楼宇单元下存在房屋,无法删除"); |
|
|
|
throw new RenException(EpmetErrorCode.ORG_DEL_FAILED.getCode(),"楼栋单元下存在房屋,无法删除"); |
|
|
|
} |
|
|
|
//删除楼宇
|
|
|
|
icBuildingService.deleteById(buildingId); |
|
|
|