Browse Source

小区管理 列表 模糊查询,楼宇单元列表排序

master
lzh 4 years ago
parent
commit
1be87cef4c
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  2. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  3. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  4. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java

@ -209,7 +209,7 @@ public class BuildingController {
@PostMapping("buildingunitlist")
public Result buildingunitlist(@LoginUser TokenDto tokenDTO,@RequestBody IcBulidingUnitFormDTO icBulidingUnitFormDTO ){
ValidatorUtils.validateEntity(icBulidingUnitFormDTO);
List<IcBuildingUnitEntity> icBuildingUnitEntityList = icBuildingUnitDao.selectList(new QueryWrapper<IcBuildingUnitEntity>().lambda().eq(IcBuildingUnitEntity::getBuildingId, icBulidingUnitFormDTO.getBuildingId()));
List<IcBuildingUnitEntity> icBuildingUnitEntityList = icBuildingUnitDao.selectList(new QueryWrapper<IcBuildingUnitEntity>().lambda().eq(IcBuildingUnitEntity::getBuildingId, icBulidingUnitFormDTO.getBuildingId()).orderByAsc(IcBuildingUnitEntity::getUnitNum));
List<JSONObject> result = new ArrayList<>();
icBuildingUnitEntityList.forEach(item->{
JSONObject jsonObject = new JSONObject();

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

@ -122,10 +122,10 @@
AND a.ID in (select distinct BUILDING_ID from ic_house e
<where>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND e.OWNER_NAME = #{house.ownerName}
AND e.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND e.OWNER_PHONE = #{house.ownerPhone}
AND e.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
and e.DEL_FLAG='0'
</where>

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

@ -134,10 +134,10 @@
AND a.BUILDING_ID = #{house.buildingId}
</if>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND a.OWNER_NAME = #{house.ownerName}
AND a.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND a.OWNER_PHONE = #{house.ownerPhone}
AND a.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{house.delFlag}
@ -167,10 +167,10 @@
AND a.BUILDING_ID = #{house.buildingId}
</if>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND a.OWNER_NAME = #{house.ownerName}
AND a.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND a.OWNER_PHONE = #{house.ownerPhone}
AND a.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{house.delFlag}

8
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml

@ -91,10 +91,10 @@
AND a.ID in (select NEIGHBOR_HOOD_ID from ic_house e
<where>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND e.OWNER_NAME = #{house.ownerName}
AND e.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND e.OWNER_PHONE = #{house.ownerPhone}
AND e.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
and e.DEL_FLAG='0'
</where>
@ -134,10 +134,10 @@
AND a.ID in (select distinct NEIGHBOR_HOOD_ID from ic_house e
<where>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND e.OWNER_NAME = #{house.ownerName}
AND e.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND e.OWNER_PHONE = #{house.ownerPhone}
AND e.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
and e.DEL_FLAG='0'
</where>

Loading…
Cancel
Save