Browse Source

Merge branch 'yantai_zhengwu_master' into dev

master
lichao 2 years ago
parent
commit
01df7479c6
  1. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseCountPictureFormDTO.java
  2. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  3. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  4. 84
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseCountPictureFormDTO.java

@ -16,6 +16,10 @@ public class HouseCountPictureFormDTO implements Serializable {
private String orgIdPath;
private String orgId;
private String orgType;
private Date timeStart;
private Date timeEnd;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -220,9 +220,9 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
*/
List<GroupRentHouseResultDTO> selectGroupRentHouseList(GroupRentHouseFormDTO formDTO);
List<HouseCountPictureListResultDTO> getHousePurposeCount(@Param("orgId") String orgId, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
List<HouseCountPictureListResultDTO> getHousePurposeCount(@Param("orgId") String orgId,@Param("orgType") String orgType, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
List<HouseCountPictureListResultDTO> getHouseStatusCount(@Param("orgId") String orgId, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
List<HouseCountPictureListResultDTO> getHouseStatusCount(@Param("orgId") String orgId,@Param("orgType") String orgType, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
List<HousePictureListResultDTO> getHousePictureList(@Param("orgId") String orgId, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd,@Param("purpose") String purpose,@Param("rentFlag") Integer rentFlag);
List<HousePictureListResultDTO> getHousePictureList(@Param("orgId") String orgId,@Param("orgType") String orgType, @Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd,@Param("purpose") String purpose,@Param("rentFlag") Integer rentFlag);
}

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

@ -418,7 +418,10 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
resultDTO.setTotal(0);
resultDTO.setList(baseDao.getHousePurposeCount(dto.getOrgIdPath(),dto.getTimeStart(),dto.getTimeEnd()));
if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){
dto.setOrgType("agency");
}
resultDTO.setList(baseDao.getHousePurposeCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd()));
resultDTO.getList().forEach(
result->resultDTO.setTotal(resultDTO.getTotal()+result.getCount())
@ -434,7 +437,11 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
resultDTO.setTotal(0);
resultDTO.setList(baseDao.getHouseStatusCount(dto.getOrgIdPath(),dto.getTimeStart(),dto.getTimeEnd()));
if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){
dto.setOrgType("agency");
}
resultDTO.setList(baseDao.getHouseStatusCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd()));
resultDTO.getList().forEach(
result->resultDTO.setTotal(resultDTO.getTotal()+result.getCount())
@ -447,7 +454,12 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
public PageData<HousePictureListResultDTO> getHousePictureList(HouseCountPictureFormDTO dto) {
// 列表/导出查询
PageHelper.startPage(dto.getPageNo(), dto.getPageSize());
List<HousePictureListResultDTO> list = baseDao.getHousePictureList(dto.getOrgIdPath(),dto.getTimeStart(),dto.getTimeEnd(),dto.getPurpose(),dto.getRentFlag());
if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){
dto.setOrgType("agency");
}
List<HousePictureListResultDTO> list = baseDao.getHousePictureList(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd(),dto.getPurpose(),dto.getRentFlag());
list.forEach(entity->{
String[] agencyIds = entity.getOrgIdPath().split(":");

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

@ -781,8 +781,32 @@
select count(*) as count,PURPOSE as type
from ic_house
where DEL_FLAG = 0
and
ORG_ID_PATH like concat(#{orgId},'%')
<choose>
<when test='orgType == "agency"'>
AND neighbor_hood_id IN (
select a.id from ic_neighbor_hood a
<!-- 排除掉无效组织、网格数据 -->
inner join customer_agency b on a.agency_id = b.id and b.del_flag = '0'
inner join customer_grid c on a.grid_id = c.id and c.del_flag = '0'
where a.del_flag = '0'
and (a.agency_id = #{orgId} OR a.agency_pids LIKE CONCAT('%', #{orgId}, '%'))
)
</when>
<when test='orgType == "grid"'>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and grid_id = #{orgId}
)
</when>
<otherwise>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and id = #{orgId}
)
</otherwise>
</choose>
<if test="timeStart != null">
and CREATED_TIME &gt;= #{timeStart}
</if>
@ -796,8 +820,32 @@
select count(*) as count,RENT_FLAG as type
from ic_house
where DEL_FLAG = 0
and
ORG_ID_PATH like concat(#{orgId},'%')
<choose>
<when test='orgType == "agency"'>
AND neighbor_hood_id IN (
select a.id from ic_neighbor_hood a
<!-- 排除掉无效组织、网格数据 -->
inner join customer_agency b on a.agency_id = b.id and b.del_flag = '0'
inner join customer_grid c on a.grid_id = c.id and c.del_flag = '0'
where a.del_flag = '0'
and (a.agency_id = #{orgId} OR a.agency_pids LIKE CONCAT('%', #{orgId}, '%'))
)
</when>
<when test='orgType == "grid"'>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and grid_id = #{orgId}
)
</when>
<otherwise>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and id = #{orgId}
)
</otherwise>
</choose>
<if test="timeStart != null">
and CREATED_TIME &gt;= #{timeStart}
</if>
@ -816,8 +864,32 @@
left join customer_grid grid on grid.id = hood.GRID_ID
where house.DEL_FLAG = '0'
and
house.ORG_ID_PATH like concat(#{orgId},'%')
<choose>
<when test='orgType == "agency"'>
AND neighbor_hood_id IN (
select a.id from ic_neighbor_hood a
<!-- 排除掉无效组织、网格数据 -->
inner join customer_agency b on a.agency_id = b.id and b.del_flag = '0'
inner join customer_grid c on a.grid_id = c.id and c.del_flag = '0'
where a.del_flag = '0'
and (a.agency_id = #{orgId} OR a.agency_pids LIKE CONCAT('%', #{orgId}, '%'))
)
</when>
<when test='orgType == "grid"'>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and grid_id = #{orgId}
)
</when>
<otherwise>
AND neighbor_hood_id IN (
select id from ic_neighbor_hood
where del_flag = '0'
and id = #{orgId}
)
</otherwise>
</choose>
<if test="timeStart != null">
and house.CREATED_TIME &gt;= #{timeStart}
</if>

Loading…
Cancel
Save