diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java index 910044f9cb..10e8e09477 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java @@ -57,6 +57,10 @@ public class IcBulidingDetailDTO implements Serializable { */ private String type; + /** + * --楼栋类型,1商品房,2自建房,3别墅 + */ + private String typeName; /** * 排序 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodDetailDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodDetailDTO.java new file mode 100644 index 0000000000..aa585263a9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcNeighborHoodDetailDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IcPropertyManagementDTO; +import lombok.Data; + +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/9/21 9:19 + */ +@Data +public class IcNeighborHoodDetailDTO { + /** + * 客户id + */ + private String customerId; + + /** + * 小区名称 + */ + private String neighborHoodName; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称--新版详情页面用于显示 + */ + private String agencyName; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 组织的所有上级组织id + */ + private String agencyPids; + + /** + * 网格id + */ + private String gridId; + + /** + * 详细地址 + */ + private String address; + + /** + * 备注 + */ + private String remark; + + /** + * 中心点位:经度 + */ + private String longitude; + + /** + * 中心点位:纬度 + */ + private String latitude; + + /** + * 坐标区域 + */ + private String coordinates; + + /** + * 坐标位置 + */ + private String location; + + /** + * 网格名称--新版详情页面用于显示 + */ + private String gridName; + + /** + * 物业名称--新版详情页面用于显示 + */ + private List propertyList; + + /** + * 小区编码 + */ + private String coding; + + /** + * 小区系统编码 + */ + private String sysCoding; + + /** + * 实有楼栋数 + */ + private Integer realBuilding; + + /** + * 二维码地址 + */ + private String qrcodeUrl; +} + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index 21ca6fb933..21cddd9951 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -23,7 +23,6 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.result.*; -import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -64,7 +63,7 @@ public class HouseInformationController { * @return com.epmet.commons.tools.utils.Result */ @PostMapping("neighborhoodDetail/{neighborhoodId}") - public Result neighborhoodDetail(@PathVariable("neighborhoodId") String neighborhoodId){ + public Result neighborhoodDetail(@PathVariable("neighborhoodId") String neighborhoodId){ return icNeighborHoodService.neighborhoodDetail(neighborhoodId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java index 24bd9b22e2..52a038ab3b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcPropertyManagementDTO; import com.epmet.entity.IcPropertyManagementEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -50,4 +51,11 @@ public interface IcPropertyManagementDao extends BaseDao selectIdByName(@Param("names")List names); + + /** + * 查询小区关联物业id,name + * @param neighborhoodId + * @return + */ + List selectPropertyNameList(String neighborhoodId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java index 913b4496c4..266d0f9b41 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java @@ -28,11 +28,11 @@ import com.epmet.dto.NeighborHoodAndManagementDTO; import com.epmet.dto.form.IcNeighborHoodAddFormDTO; import com.epmet.dto.form.ImportInfoFormDTO; import com.epmet.dto.result.BuildingResultDTO; +import com.epmet.dto.result.IcNeighborHoodDetailDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.entity.IcNeighborHoodPropertyEntity; import com.epmet.entity.IcPropertyManagementEntity; -import org.springframework.web.bind.annotation.RequestBody; import java.io.IOException; import java.io.InputStream; @@ -194,5 +194,5 @@ public interface IcNeighborHoodService extends BaseService * @params [neighborhoodId] * @return com.epmet.commons.tools.utils.Result */ - Result neighborhoodDetail(String neighborhoodId); + Result neighborhoodDetail(String neighborhoodId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 66658f83f2..e14ea745ab 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -50,10 +51,7 @@ import com.epmet.dto.*; import com.epmet.dto.form.IcNeighborHoodAddFormDTO; import com.epmet.dto.form.ImportInfoFormDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; -import com.epmet.dto.result.BuildingResultDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; -import com.epmet.dto.result.InfoByNamesResultDTO; -import com.epmet.dto.result.UploadImgResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.excel.IcNeighborHoodExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -808,12 +806,22 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl neighborhoodDetail(String neighborhoodId) { - IcNeighborHoodEntity result = baseDao.selectById(neighborhoodId); - if(null != result && null == result.getRemark()){ - result.setRemark(""); + public Result neighborhoodDetail(String neighborhoodId) { + IcNeighborHoodEntity icNeighborHoodEntity = baseDao.selectById(neighborhoodId); + if (null == icNeighborHoodEntity) { + return new Result<>(); } - return new Result().ok(result); + IcNeighborHoodDetailDTO result = ConvertUtils.sourceToTarget(icNeighborHoodEntity, IcNeighborHoodDetailDTO.class); + if(null == result.getRemark()){ + result.setRemark(StrConstant.EPMETY_STR); + } + GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(result.getGridId()); + if (null != gridInfoCache) { + result.setAgencyName(gridInfoCache.getAgencyName()); + result.setGridName(gridInfoCache.getGridName()); + } + result.setPropertyList(propertyManagementDao.selectPropertyNameList(neighborhoodId)); + return new Result().ok(result); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index aaebe3cf78..a825c2538a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -458,6 +458,13 @@ b.LONGITUDE, b.COORDINATE_POSITION, b.TYPE, + ( + case when b.TYPE='1' then '商品房' + when b.TYPE='2' then '自建房' + when b.TYPE='3' then '别墅' + else '' + end + ) as typeName, h.GRID_ID, h.AGENCY_ID, b.BUILDING_LEADER_NAME, diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml index 5a5cf172a3..0b0aba046c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml @@ -48,4 +48,21 @@ ) + \ No newline at end of file