Browse Source

Merge branch 'dev_ic_platform' into develop

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
a0359c6c73
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  2. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  3. 15
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  4. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  5. 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") @PostMapping("buildingunitlist")
public Result buildingunitlist(@LoginUser TokenDto tokenDTO,@RequestBody IcBulidingUnitFormDTO icBulidingUnitFormDTO ){ public Result buildingunitlist(@LoginUser TokenDto tokenDTO,@RequestBody IcBulidingUnitFormDTO icBulidingUnitFormDTO ){
ValidatorUtils.validateEntity(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<>(); List<JSONObject> result = new ArrayList<>();
icBuildingUnitEntityList.forEach(item->{ icBuildingUnitEntityList.forEach(item->{
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -115,12 +115,12 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
*/ */
@Override @Override
public List<OptionResultDTO> getHouseOption(HouseFormDTO formDTO) { public List<OptionResultDTO> getHouseOption(HouseFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getUnitId())) { if (StringUtils.isBlank(formDTO.getBuildingId()) && StringUtils.isBlank(formDTO.getUnitId())) {
log.error("单元ID为空"); log.error("楼栋和单元ID为空");
return Collections.emptyList(); return Collections.emptyList();
} }
LambdaQueryWrapper<IcHouseEntity> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IcHouseEntity> wrapper = new LambdaQueryWrapper<>();
//wrapper.eq(StringUtils.isNotBlank(formDTO.getBuildingId()), IcHouseEntity::getBuildingId, formDTO.getBuildingId()); wrapper.eq(StringUtils.isNotBlank(formDTO.getBuildingId()), IcHouseEntity::getBuildingId, formDTO.getBuildingId());
wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcHouseEntity::getBuildingUnitId, formDTO.getUnitId()); wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcHouseEntity::getBuildingUnitId, formDTO.getUnitId());
wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC"); wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC");
List<IcHouseEntity> list = baseDao.selectList(wrapper); List<IcHouseEntity> list = baseDao.selectList(wrapper);

15
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 AND a.ID in (select distinct BUILDING_ID from ic_house e
<where> <where>
<if test="house.ownerName != null and house.ownerName.trim() != ''"> <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>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''"> <if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND e.OWNER_PHONE = #{house.ownerPhone} AND e.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if> </if>
and e.DEL_FLAG='0' and e.DEL_FLAG='0'
</where> </where>
@ -292,11 +292,12 @@
<!-- 根据neighborHoodId查询楼 --> <!-- 根据neighborHoodId查询楼 -->
<select id="baseInfoFamilyBuilding" resultType="com.epmet.dto.result.BaseInfoFamilyBuildingResultDTO"> <select id="baseInfoFamilyBuilding" resultType="com.epmet.dto.result.BaseInfoFamilyBuildingResultDTO">
SELECT SELECT
id AS buildingId, b.id AS buildingId,
BUILDING_NAME CONCAT(nh.NEIGHBOR_HOOD_NAME,'-',b.BUILDING_NAME)
FROM ic_building FROM ic_building b
WHERE DEL_FLAG = '0' LEFT JOIN ic_neighbor_hood nh ON (nh.ID = b.NEIGHBOR_HOOD_ID AND nh.DEL_FLAG = '0')
AND NEIGHBOR_HOOD_ID = #{neighborHoodId} WHERE b.DEL_FLAG = '0'
AND b.NEIGHBOR_HOOD_ID = #{neighborHoodId}
</select> </select>

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

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

Loading…
Cancel
Save