Browse Source

修改楼宇排序 先按创建时间 再按楼宇名称;房屋排序将单元号转为数字排

dev_shibei_match
jianjun 4 years ago
parent
commit
8f0b81b16d
  1. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -155,8 +155,9 @@ public class BuildingServiceImpl implements BuildingService {
//3.获取网格下的所有小区
List<String> gridIdList = customerGridList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<IcNeighborHoodEntity> queryWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda().in(IcNeighborHoodEntity::getGridId, gridIdList);
queryWrapper.orderByAsc(IcNeighborHoodEntity::getCreatedTime);
LambdaQueryWrapper<IcNeighborHoodEntity> queryWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.in(IcNeighborHoodEntity::getGridId, gridIdList)
.orderByAsc(IcNeighborHoodEntity::getCreatedTime);
List<IcNeighborHoodEntity> icNeighborHoodList = icNeighborHoodDao.selectList(queryWrapper);
if(CollectionUtils.isEmpty(icNeighborHoodList)){
agencyList.addAll(gridList);
@ -178,7 +179,7 @@ public class BuildingServiceImpl implements BuildingService {
List<String> neighborHoodIdList = icNeighborHoodList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<IcBuildingEntity> buildingQueryWrapper = new QueryWrapper<IcBuildingEntity>().lambda()
.in(IcBuildingEntity::getNeighborHoodId, neighborHoodIdList)
.orderByAsc(IcBuildingEntity::getBuildingName);
.orderByAsc(IcBuildingEntity::getCreatedTime,IcBuildingEntity::getBuildingName);
List<IcBuildingEntity> icBuildingList = icBuildingDao.selectList(buildingQueryWrapper);
if(CollectionUtils.isEmpty(neighborHoodIdList)){

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -94,7 +94,7 @@
AND a.DEL_FLAG = #{building.delFlag}
</if>
</where>
order by a.BUILDING_NAME
order by a.CREATED_TIME, a.BUILDING_NAME
</select>
<select id="searchAllBuilding" resultType="com.epmet.excel.IcBuildingExcel">
select

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -144,7 +144,7 @@
</if>
</where>
ORDER BY d.UNIT_NUM,a.DOOR_NAME
ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME
</select>
<select id="searchAllHouse" resultType="com.epmet.excel.IcHouseExcel">
select

Loading…
Cancel
Save