Browse Source

大屏房屋列表。点击房屋查询联户坐标点位

master
yinzuomei 2 years ago
parent
commit
cd8f0f573d
  1. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java
  2. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  3. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java
  4. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  5. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  6. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  7. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  8. 15
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml

3
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/lingshan/LingshanPartyCenterHouseLianhuDTO.java

@ -70,6 +70,7 @@ public class LingshanPartyCenterHouseLianhuDTO implements Serializable {
* 联户联户房屋id * 联户联户房屋id
*/ */
private String houseId; private String houseId;
private String longitude;
private String latitude;
} }

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -50,9 +50,11 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcHouseDao; import com.epmet.dao.IcHouseDao;
import com.epmet.dto.IcHouseDTO; import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO;
import com.epmet.dto.form.lingshan.ScreenPartyCenterHouseDistributionFormDTO; import com.epmet.dto.form.lingshan.ScreenPartyCenterHouseDistributionFormDTO;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.dto.result.lingshan.HouseDetailResultDTO; import com.epmet.dto.result.lingshan.HouseDetailResultDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO;
import com.epmet.entity.CustomerOrgParameterEntity; import com.epmet.entity.CustomerOrgParameterEntity;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
@ -710,4 +712,16 @@ public class HouseController implements ResultDataResolver {
return new Result<HouseDetailResultDTO>().ok(houseService.queryHouseDetail(houseId)); return new Result<HouseDetailResultDTO>().ok(houseService.queryHouseDetail(houseId));
} }
/**
* 灵山项目:根据楼栋id返回房屋列表分页且返回党员中心户标志, 联户群众数
*
* @param formDTO
* @return
*/
@MaskResponse(fieldNames = {"showOwnerPhone", "showOwnerIdCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("lingshanScreen/houseList")
public Result<PageData<PartyCenterHouseResultDTO>> queryHouseListForLingShanScreen(@RequestBody PartyCenterHousePageFormDTO formDTO) {
return new Result<PageData<PartyCenterHouseResultDTO>>().ok(houseService.queryHouseListForLingShanScreen(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getBuildingId()));
}
} }

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/LingshanPartyCenterHouseLianhuDao.java

@ -1,9 +1,12 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO;
import com.epmet.entity.LingshanPartyCenterHouseLianhuEntity; import com.epmet.entity.LingshanPartyCenterHouseLianhuEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 灵山_党员中心户联户 * 灵山_党员中心户联户
* *
@ -15,5 +18,17 @@ public interface LingshanPartyCenterHouseLianhuDao extends BaseDao<LingshanParty
int deleteByPartyCenterHouseId(String partyCenterHouseId); int deleteByPartyCenterHouseId(String partyCenterHouseId);
/**
* 判断房屋是否被党员中心户关联
* @param houseId
* @return
*/
LingshanPartyCenterHouseLianhuEntity selectByHouseId(String houseId); LingshanPartyCenterHouseLianhuEntity selectByHouseId(String houseId);
/**
* 查询房屋的联户房屋
* @param partyCenterHouseId
* @return
*/
List<LingshanPartyCenterHouseLianhuDTO> selectLianHuHouse(String partyCenterHouseId);
} }

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java

@ -24,6 +24,7 @@ import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.dto.result.lingshan.HouseDetailResultDTO; import com.epmet.dto.result.lingshan.HouseDetailResultDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -223,4 +224,11 @@ public interface HouseService {
* @return * @return
*/ */
HouseDetailResultDTO queryHouseDetail(String houseId); HouseDetailResultDTO queryHouseDetail(String houseId);
/**
* 灵山项目:根据楼栋id返回房屋列表分页且返回党员中心户标志, 联户群众数
* @param buildingId
* @return
*/
PageData<PartyCenterHouseResultDTO> queryHouseListForLingShanScreen(Integer pageNo, Integer pageSize, String buildingId);
} }

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -37,6 +37,7 @@ import com.epmet.dto.*;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.dto.result.lingshan.HouseDetailResultDTO; import com.epmet.dto.result.lingshan.HouseDetailResultDTO;
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO;
import com.epmet.entity.*; import com.epmet.entity.*;
import com.epmet.enums.*; import com.epmet.enums.*;
import com.epmet.feign.*; import com.epmet.feign.*;
@ -1559,4 +1560,29 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
} }
return resultDTO; return resultDTO;
} }
/**
* 灵山项目:根据楼栋id返回房屋列表分页且返回党员中心户标志, 联户群众数
*
* @param pageNo
* @param pageSize
* @param buildingId
* @return
*/
@Override
public PageData<PartyCenterHouseResultDTO> queryHouseListForLingShanScreen(Integer pageNo, Integer pageSize, String buildingId) {
PageHelper.startPage(pageNo, pageSize);
List<PartyCenterHouseResultDTO> list = icHouseDao.selectListPartyCenterHouse(null,
null,
null,
null,
buildingId,
null);
list.forEach(item -> {
item.setHouseTypeName(HouseTypeEnums.getTypeValue(item.getHouseType()));
item.setPurposeName(HousePurposeEnums.getTypeValue(item.getPurpose()));
});
PageInfo<PartyCenterHouseResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal(), pageSize);
}
} }

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

@ -502,10 +502,8 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
if(StringUtils.isBlank(partyCenterHouseId)){ if(StringUtils.isBlank(partyCenterHouseId)){
return new ArrayList<>(); return new ArrayList<>();
} }
LambdaQueryWrapper<LingshanPartyCenterHouseLianhuEntity> queryWrapper=new LambdaQueryWrapper<>(); List<LingshanPartyCenterHouseLianhuDTO> resultList=partyCenterHouseLianhuDao.selectLianHuHouse(partyCenterHouseId);
queryWrapper.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId,partyCenterHouseId); return resultList;
List<LingshanPartyCenterHouseLianhuEntity> list=partyCenterHouseLianhuDao.selectList(queryWrapper);
return ConvertUtils.sourceToTarget(list,LingshanPartyCenterHouseLianhuDTO.class);
} }
/** /**

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

@ -751,6 +751,9 @@
ih.DEL_FLAG = '0' ih.DEL_FLAG = '0'
AND b.DEL_FLAG = '0' AND b.DEL_FLAG = '0'
AND h.DEL_FLAG = '0' AND h.DEL_FLAG = '0'
<if test="customerId != null and customerId != ''">
and ih.customer_id=#{customerId}
</if>
<if test="partyCenterHouseFlag != null and partyCenterHouseFlag.trim() != ''"> <if test="partyCenterHouseFlag != null and partyCenterHouseFlag.trim() != ''">
AND ih.PARTY_CENTER_HOUSE_FLAG='1' AND ih.PARTY_CENTER_HOUSE_FLAG='1'
</if> </if>

15
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/LingshanPartyCenterHouseLianhuDao.xml

@ -34,4 +34,19 @@
where DEL_FLAG='0' where DEL_FLAG='0'
and HOUSE_ID = #{houseId} and HOUSE_ID = #{houseId}
</select> </select>
<select id="selectLianHuHouse" parameterType="java.lang.String" resultType="com.epmet.dto.result.lingshan.LingshanPartyCenterHouseLianhuDTO">
SELECT
l.*,
h.LONGITUDE,
h.LATITUDE
FROM
lingshan_party_center_house_lianhu l
INNER JOIN ic_house h ON ( l.HOUSE_ID = h.ID )
WHERE
l.DEL_FLAG = '0'
AND l.PARTY_CENTER_HOUSE_ID = #{partyCenterHouseId}
AND h.DEL_FLAG = '0'
order by l.CREATED_TIME asc
</select>
</mapper> </mapper>
Loading…
Cancel
Save