|
@ -553,7 +553,7 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
if(nowUnit<unit){ |
|
|
if(nowUnit<unit){ |
|
|
//如果小于,判断是否存在房屋,如果存在就提示不能更改
|
|
|
//如果小于,判断是否存在房屋,如果存在就提示不能更改
|
|
|
throw new EpmetException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),EpmetErrorCode.ORG_EDIT_FAILED.getMsg(),"暂不支持单元号减小"); |
|
|
throw new EpmetException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),EpmetErrorCode.ORG_EDIT_FAILED.getMsg(),"暂不支持单元号减小"); |
|
|
} |
|
|
}else{ |
|
|
//新增单元
|
|
|
//新增单元
|
|
|
List<OptionResultDTO> units = icBuildingUnitService.getUnitOptions(icBuilding.getId()); |
|
|
List<OptionResultDTO> units = icBuildingUnitService.getUnitOptions(icBuilding.getId()); |
|
|
Map<String, String> unitMap = units.stream().collect(Collectors.toMap(OptionResultDTO::getCode, OptionResultDTO::getLabel)); |
|
|
Map<String, String> unitMap = units.stream().collect(Collectors.toMap(OptionResultDTO::getCode, OptionResultDTO::getLabel)); |
|
@ -569,13 +569,9 @@ public class BuildingServiceImpl implements BuildingService { |
|
|
unitList.add(icBuildingUnit); |
|
|
unitList.add(icBuildingUnit); |
|
|
} |
|
|
} |
|
|
icBuildingUnitService.insertBatch(unitList); |
|
|
icBuildingUnitService.insertBatch(unitList); |
|
|
}else{ |
|
|
|
|
|
//如果小于,判断是否存在房屋,如果存在就提示不能更改
|
|
|
|
|
|
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(),"楼栋单元下存在房屋,无法更新"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|