|
|
@ -4,18 +4,16 @@ import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.air.common.Constant; |
|
|
|
import com.air.common.Constant; |
|
|
|
import com.air.enums.BlocksOriginStatusEnum; |
|
|
|
import com.air.enums.BlocksOriginStatusEnum; |
|
|
|
import com.air.housing.dto.HousingDefine; |
|
|
|
import com.air.housing.dto.HousingDefine; |
|
|
|
|
|
|
|
import com.air.housing.dto.HousingEstatesListDto; |
|
|
|
import com.air.housing.dto.HousingEstatesQuery; |
|
|
|
import com.air.housing.dto.HousingEstatesQuery; |
|
|
|
import com.air.housing.entity.Blocks; |
|
|
|
import com.air.housing.entity.*; |
|
|
|
import com.air.housing.entity.Format; |
|
|
|
import com.air.housing.mapper.AnnoBlocksRelMapper; |
|
|
|
import com.air.housing.entity.Houses; |
|
|
|
|
|
|
|
import com.air.housing.entity.HousingEstates; |
|
|
|
|
|
|
|
import com.air.housing.mapper.HousingEstatesMapper; |
|
|
|
import com.air.housing.mapper.HousingEstatesMapper; |
|
|
|
import com.air.housing.service.BlocksService; |
|
|
|
import com.air.housing.service.BlocksService; |
|
|
|
import com.air.housing.service.FormatService; |
|
|
|
import com.air.housing.service.FormatService; |
|
|
|
import com.air.housing.service.HousesService; |
|
|
|
import com.air.housing.service.HousesService; |
|
|
|
import com.air.housing.service.HousingEstatesService; |
|
|
|
import com.air.housing.service.HousingEstatesService; |
|
|
|
import com.air.housing.vo.HousingEstatesDetail; |
|
|
|
import com.air.housing.vo.HousingEstatesDetail; |
|
|
|
import com.air.housing.vo.HousingEstatesListVO; |
|
|
|
|
|
|
|
import com.air.housing.vo.HousingEstatesName; |
|
|
|
import com.air.housing.vo.HousingEstatesName; |
|
|
|
import com.air.land.entity.LandListed; |
|
|
|
import com.air.land.entity.LandListed; |
|
|
|
import com.air.land.mapper.LandListedMapper; |
|
|
|
import com.air.land.mapper.LandListedMapper; |
|
|
@ -57,13 +55,14 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper, |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private HousingEstatesMapper housingEstatesMapper; |
|
|
|
private HousingEstatesMapper housingEstatesMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
|
|
|
|
private AnnoBlocksRelMapper annoBlocksRelMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private LandListedMapper landListedMapper; |
|
|
|
private LandListedMapper landListedMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private FormatService formatService; |
|
|
|
private FormatService formatService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<HousingEstatesName> getHousingEstatesNamePage(IPage<HousingEstatesName> page, String name) { |
|
|
|
public IPage<HousingEstatesName> getHousingEstatesNamePage(IPage<HousingEstatesName> page, String name) { |
|
|
|
|
|
|
|
|
|
|
|
return housingEstatesMapper.getHousingEstatesNamePage(page, name); |
|
|
|
return housingEstatesMapper.getHousingEstatesNamePage(page, name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -73,7 +72,7 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper, |
|
|
|
if (housingDefine.getHousingEstateId() == null) { |
|
|
|
if (housingDefine.getHousingEstateId() == null) { |
|
|
|
HousingEstates housingEstates = new HousingEstates(); |
|
|
|
HousingEstates housingEstates = new HousingEstates(); |
|
|
|
housingEstates.setName(housingDefine.getName()); |
|
|
|
housingEstates.setName(housingDefine.getName()); |
|
|
|
housingEstates.setAnnoId(housingDefine.getAnnoId()); |
|
|
|
// housingEstates.setAnnoId(housingDefine.getAnnoId());
|
|
|
|
housingEstates.setStatusCd(Constant.COMMON_STATUS_1000); |
|
|
|
housingEstates.setStatusCd(Constant.COMMON_STATUS_1000); |
|
|
|
save(housingEstates); |
|
|
|
save(housingEstates); |
|
|
|
housingDefine.setHousingEstateId(housingEstates.getHousingEstateId()); |
|
|
|
housingDefine.setHousingEstateId(housingEstates.getHousingEstateId()); |
|
|
@ -106,21 +105,27 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public HousingEstatesDetail getHousingEstatesDetail(Long housingEstateId, Long blockId) { |
|
|
|
public HousingEstatesDetail getHousingEstatesDetail(Long housingEstateId) { |
|
|
|
HousingEstates housingEstates = baseMapper.selectById(housingEstateId); |
|
|
|
|
|
|
|
LandListed landListed = landListedMapper.selectOne(Wrappers.<LandListed>lambdaQuery().eq(LandListed::getAnnoId,housingEstates.getAnnoId())); |
|
|
|
|
|
|
|
HousingEstatesDetail detail = new HousingEstatesDetail(); |
|
|
|
HousingEstatesDetail detail = new HousingEstatesDetail(); |
|
|
|
|
|
|
|
HousingEstates housingEstates = baseMapper.selectById(housingEstateId); |
|
|
|
|
|
|
|
if (null == housingEstates) { |
|
|
|
|
|
|
|
return detail; |
|
|
|
|
|
|
|
} |
|
|
|
detail.setHousingEstates(housingEstates); |
|
|
|
detail.setHousingEstates(housingEstates); |
|
|
|
detail.setLandListed(landListed); |
|
|
|
AnnoBlocksRel annoBlocksRel = annoBlocksRelMapper.selectOne(Wrappers.<AnnoBlocksRel>query().lambda() |
|
|
|
if(ObjectUtil.isNotNull(blockId)){ |
|
|
|
.eq(AnnoBlocksRel::getHousingEstatesId, housingEstateId).eq(AnnoBlocksRel::getMainLand, 1)); |
|
|
|
Format format = formatService.getOne(Wrappers.<Format>lambdaQuery().eq(Format::getHousingEstateId,housingEstateId)); |
|
|
|
if (null != annoBlocksRel) { |
|
|
|
detail.setFormat(format); |
|
|
|
LandListed landListed = landListedMapper.selectOne(Wrappers.<LandListed>lambdaQuery() |
|
|
|
|
|
|
|
.eq(LandListed::getLandListedId, annoBlocksRel.getLandListedId())); |
|
|
|
|
|
|
|
detail.setLandListed(landListed); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Format format = formatService.getOne(Wrappers.<Format>lambdaQuery().eq(Format::getHousingEstateId, housingEstateId)); |
|
|
|
|
|
|
|
detail.setFormat(format); |
|
|
|
return detail; |
|
|
|
return detail; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<HousingEstatesListVO> page(QueryPage page, HousingEstatesQuery query) { |
|
|
|
public IPage<HousingEstatesListDto> page(QueryPage page, HousingEstatesQuery query) { |
|
|
|
return baseMapper.selectIPage(page.toPage(), query); |
|
|
|
return baseMapper.selectIPage(page.toPage(), query); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|