diff --git a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java index 6e7a659..4c29a13 100644 --- a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java +++ b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java @@ -149,11 +149,13 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { for (PopulationVO populationVO : populationVOList) { if("1".equals(populationVO.getOutHouse())) { populationService.update(populationVO.getPopulationId(), populationVO); - } else if(StringUtils.isEmpty(populationVO.getPopulationId())) { - populationVO.setHouseId(houseId); + } + } + + populationdao.deleteById(houseId); + for (PopulationVO populationVO : populationVOList) { + if(!"1".equals(populationVO.getOutHouse())) { populationService.save(token, populationVO); - }else { - populationdao.deleteById(populationVO.getPopulationId()); } } }