|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
package com.air.housing.service.impl; |
|
|
|
|
|
|
|
|
|
import com.air.entity.Blocks; |
|
|
|
|
import com.air.housing.entity.Format; |
|
|
|
|
import com.air.housing.entity.Houses; |
|
|
|
|
import com.air.housing.dto.HousingDefine; |
|
|
|
|
import com.air.housing.entity.HousingEstates; |
|
|
|
|
import com.air.housing.mapper.HousingEstatesMapper; |
|
|
|
|
import com.air.housing.service.FormatService; |
|
|
|
|
import com.air.housing.service.HousingEstatesService; |
|
|
|
|
import com.air.housing.vo.HousingEstatesName; |
|
|
|
|
import com.air.origin.entity.BlocksOrigin; |
|
|
|
@ -43,7 +45,8 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
|
|
|
|
|
private HousesOriginService housesOriginService; |
|
|
|
|
@Autowired |
|
|
|
|
private HousesService housesService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private FormatService formatService; |
|
|
|
|
@Override |
|
|
|
|
public IPage<HousingEstatesName> getHousingEstatesNamePage(IPage<HousingEstatesName> page, String name) { |
|
|
|
|
|
|
|
|
@ -73,6 +76,18 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
|
|
|
|
|
copyBlocksOriginToBlocks(blocksOrigin, housingDefine); |
|
|
|
|
|
|
|
|
|
copyHousesOriginToHouses(housingDefine.getBlockId(), housingDefine); |
|
|
|
|
|
|
|
|
|
//查询业态表
|
|
|
|
|
Format format = formatService.getOne(Wrappers.<Format>query().lambda().eq(Format::getHousingEstateId, housingDefine.getHousingEstatesId()) |
|
|
|
|
.eq(Format::getLargeFormat, housingDefine.getLargeFormat()) |
|
|
|
|
.eq(Format::getFormat, housingDefine.getFormat())); |
|
|
|
|
if (format == null) { |
|
|
|
|
format = new Format(); |
|
|
|
|
format.setHousingEstateId(housingDefine.getHousingEstatesId()); |
|
|
|
|
format.setLargeFormat(housingDefine.getLargeFormat()); |
|
|
|
|
format.setFormat(housingDefine.getFormat()); |
|
|
|
|
formatService.save(format); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|