diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index 1a8f79ef5..cdaa46a50 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -746,79 +746,75 @@ public class PropertyController { } } - if (model.getDetailLevel() != null && model.getDetailLevel() >= 1) { - districtInfoDto.setBlock(district.getBlock()); + districtInfoDto.setBlock(district.getBlock()); + districtInfoDto.setLoopLine(district.getLoopLineInfo()); + if (HouseValidator.validateBuildingType(district.getBuildType())) { + districtInfoDto.setBuildingType(district.getBuildType()); + } else { + districtInfoDto.setBuildingType(""); + } + districtInfoDto.setAlias(district.getMappingAlias()); + districtInfoDto.setAddressAlias(district.getAddrAlias()); + districtInfoDto.setCommunity(district.getStreetCommunity()); + districtInfoDto.setCommercialArea(district.getBusinessQuarter()); + if (district.getHouseholdCount() != null) { + districtInfoDto.setTotalUnitCount(SeaweedUtils.formatHouseholdCount(district.getHouseholdCount().toString())); + } else { + districtInfoDto.setTotalUnitCount(""); + } + districtInfoDto.setManagementFee(district.getEstateCharge()); + if (district.getCarSiteCount() != null) { + districtInfoDto.setParking(SeaweedUtils.formatCarSiteCount(district.getCarSiteCount().toString())); + } else { + districtInfoDto.setParking(""); + } + districtInfoDto.setParkingDescription(district.getCarSite()); + districtInfoDto.setOwnershipPeriod(district.getPropertyLife()); + districtInfoDto.setOwnershipType(district.getHouseProperty()); + districtInfoDto.setStartBuildTime(district.getStartBuildingDate()); + if (district.getOpenDate() != null) { + Date minDate = DateUtil.parseDate("1900-01-01", "yyyy-MM-dd"); + Date maxDate = DateUtil.parseDate("2025-01-01", "yyyy-MM-dd"); + if (district.getOpenDate().after(minDate) && district.getOpenDate().before(maxDate)) { + districtInfoDto + .setStartSellingTime(DateUtil.formatByPattern(district.getOpenDate(), "yyyy-MM-dd")); + } + } else { + districtInfoDto.setStartSellingTime(""); } - if (model.getDetailLevel() != null && model.getDetailLevel() >= 2) { - districtInfoDto.setLoopLine(district.getLoopLineInfo()); - if (HouseValidator.validateBuildingType(district.getBuildType())) { - districtInfoDto.setBuildingType(district.getBuildType()); - } else { - districtInfoDto.setBuildingType(""); - } - districtInfoDto.setAlias(district.getMappingAlias()); - districtInfoDto.setAddressAlias(district.getAddrAlias()); - districtInfoDto.setCommunity(district.getStreetCommunity()); - districtInfoDto.setCommercialArea(district.getBusinessQuarter()); - if (district.getHouseholdCount() != null) { - districtInfoDto.setTotalUnitCount(SeaweedUtils.formatHouseholdCount(district.getHouseholdCount().toString())); - } else { - districtInfoDto.setTotalUnitCount(""); - } - districtInfoDto.setManagementFee(district.getEstateCharge()); - if (district.getCarSiteCount() != null) { - districtInfoDto.setParking(SeaweedUtils.formatCarSiteCount(district.getCarSiteCount().toString())); - } else { - districtInfoDto.setParking(""); - } - districtInfoDto.setParkingDescription(district.getCarSite()); - districtInfoDto.setOwnershipPeriod(district.getPropertyLife()); - districtInfoDto.setOwnershipType(district.getHouseProperty()); - districtInfoDto.setStartBuildTime(district.getStartBuildingDate()); - if (district.getOpenDate() != null) { - Date minDate = DateUtil.parseDate("1900-01-01", "yyyy-MM-dd"); - Date maxDate = DateUtil.parseDate("2025-01-01", "yyyy-MM-dd"); - if (district.getOpenDate().after(minDate) && district.getOpenDate().before(maxDate)) { - districtInfoDto - .setStartSellingTime(DateUtil.formatByPattern(district.getOpenDate(), "yyyy-MM-dd")); - } - } else { - districtInfoDto.setStartSellingTime(""); - } - - districtInfoDto.setFinishBuildTime(district.getFinishBuildingDate()); - districtInfoDto.setMoveinTime(district.getLiveDate()); - districtInfoDto.setFloorSpace(SeaweedUtils.formatAllArea(district.getAllArea())); - districtInfoDto.setConstructionSpace(district.getBuildArea()); - districtInfoDto.setPlotRatio(SeaweedUtils.formatCubagePercent(district.getCubagePercent())); - districtInfoDto.setGreenPercentage(SeaweedUtils.formatVirescencePercent(district.getVirescencePercent())); - districtInfoDto.setPreSalePermit(district.getLicence()); - districtInfoDto.setDeveloper(district.getDeveloper()); - districtInfoDto.setDiscount(district.getDiscount()); - districtInfoDto.setPropertyManagement(district.getEstateCompany()); - if (HouseValidator.fetchFitmentInfo(district.getFitment()) == null) { - districtInfoDto.setDecorationStandard(""); - } else { - districtInfoDto.setDecorationStandard(HouseValidator.fetchFitmentInfo(district.getFitment())); - } - districtInfoDto.setBuildingStructure(district.getBuildStructure()); - districtInfoDto.setSupportingFacilities(district.getFacilities()); - districtInfoDto.setTransportation(district.getTraffic()); - districtInfoDto.setRelatedInfo(district.getRelateInfo()); - districtInfoDto.setDescription(district.getDescription()); - districtInfoDto.setSalesOfficeAdd(district.getSellAddress()); - districtInfoDto.setSalesPhoneNumber(district.getMobile()); - districtInfoDto.setTownship(district.getTownship()); - if (district.getLoudongCount() != null && district.getLoudongCount() > 0) { - districtInfoDto.setBuildingCount(district.getLoudongCount()); - } + districtInfoDto.setFinishBuildTime(district.getFinishBuildingDate()); + districtInfoDto.setMoveinTime(district.getLiveDate()); + districtInfoDto.setFloorSpace(SeaweedUtils.formatAllArea(district.getAllArea())); + districtInfoDto.setConstructionSpace(district.getBuildArea()); + districtInfoDto.setPlotRatio(SeaweedUtils.formatCubagePercent(district.getCubagePercent())); + districtInfoDto.setGreenPercentage(SeaweedUtils.formatVirescencePercent(district.getVirescencePercent())); + districtInfoDto.setPreSalePermit(district.getLicence()); + districtInfoDto.setDeveloper(district.getDeveloper()); + districtInfoDto.setDiscount(district.getDiscount()); + districtInfoDto.setPropertyManagement(district.getEstateCompany()); + if (HouseValidator.fetchFitmentInfo(district.getFitment()) == null) { + districtInfoDto.setDecorationStandard(""); + } else { + districtInfoDto.setDecorationStandard(HouseValidator.fetchFitmentInfo(district.getFitment())); + } + districtInfoDto.setBuildingStructure(district.getBuildStructure()); + districtInfoDto.setSupportingFacilities(district.getFacilities()); + districtInfoDto.setTransportation(district.getTraffic()); + districtInfoDto.setRelatedInfo(district.getRelateInfo()); + districtInfoDto.setDescription(district.getDescription()); + districtInfoDto.setSalesOfficeAdd(district.getSellAddress()); + districtInfoDto.setSalesPhoneNumber(district.getMobile()); + districtInfoDto.setTownship(district.getTownship()); + if (district.getLoudongCount() != null && district.getLoudongCount() > 0) { + districtInfoDto.setBuildingCount(district.getLoudongCount()); + } // Integer finishYear = districtService.getBuildYear(district); - Integer finishYear = districtService.getCreateYear(district); - if (finishYear != null) { - districtInfoDto.setFinishYear(finishYear); - } + Integer finishYear = districtService.getCreateYear(district); + if (finishYear != null) { + districtInfoDto.setFinishYear(finishYear); } + mav.setModel(BasicModel.buildOKModel().setResult(districtInfoDto)); return mav; }