Browse Source

Merge remote-tracking branch 'origin/dev_optimize' into dev_optimize

release
yinzuomei 3 years ago
parent
commit
451a46b687
  1. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  2. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java
  3. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  4. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java
  5. 9
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java
  6. 8
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java
  7. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  8. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  9. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  10. 35
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  11. 25
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -163,6 +163,7 @@
WHERE
u.del_flag = '0'
AND PARTY_FLAG = 0
AND u.point_total > 0 <!-- 初心互助中公益达人,0分人员不显示在榜单上 -->
<if test="orgType != null and orgType !=''">
<if test="orgType == 'agency'">
AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%')
@ -207,6 +208,7 @@
WHERE
u.del_flag = '0'
AND party_flag = '1'<!-- 是否是党员标志:1是。0不是党员 -->
and u.point_total > 0 <!-- 初心互助中党员先锋排行,0分人员不显示在榜单上 -->
<if test="orgType != null and orgType !=''">
<if test="orgType == 'agency'">
AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%')

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java

@ -92,6 +92,7 @@ public class CommunitySelfOrganizationListDTO implements Serializable {
this.longitude = "";
this.latitude = "";
this.orgId = "";
this.remark = "";
this.score = NumConstant.ZERO;
this.organizationPersonnel = new ArrayList<>();
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml

@ -53,7 +53,8 @@
so.SERVICE_ITEM AS serviceItem,
so.LONGITUDE AS longitude,
so.LATITUDE AS latitude,
so.ID as orgId
so.ID as orgId,
so.remark
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.ORG_ID = #{agencyId}

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

@ -79,9 +79,9 @@ public class IcHouseFormDTO implements Serializable {
private String purpose;
/**
* 1出租0未出租
* 1出租 0自住 2闲置
*/
@NotNull(message = "是否出租不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
@NotNull(message = "房屋状态不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
private Integer rentFlag;
/**

9
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java

@ -62,6 +62,10 @@ public class ListIcNeighborHoodFormDTO implements Serializable{
* 房主电话
*/
private String ownerPhone;
/**
* 房屋状态 1出租 0自住 2闲置
*/
private String rentFlag;
/**
* 数据类型小区neighbourHood楼栋building房屋house
*/
@ -81,5 +85,10 @@ public class ListIcNeighborHoodFormDTO implements Serializable{
*/
private String keyword;
/**
* 1出租 0自住 2闲置
*/
private String rentFlag;
}

8
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java

@ -3,8 +3,12 @@ package com.epmet.enums;
import org.springframework.util.StringUtils;
public enum HouseRentFlagEnums {
YES(1,"是"),
NO(0,"否");
//原有的房屋出租状态是否改为房屋状态【1:出租 0:自住 2:闲置】
/*YES(1,"是"),
NO(0,"否");*/
HOUSE_ZZ(0,"自住"),
HOUSE_CZ(1,"出租"),
HOUSE_XZ(2,"闲置");

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

@ -94,7 +94,7 @@ public class HouseController implements ResultDataResolver {
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, formDTO.getBuildingId(), formDTO.getOwnerName(),
formDTO.getOwnerPhone(), null,
null, queryScene,
formDTO.getPageNo(), formDTO.getPageSize());
formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getId(),formDTO.getLevel(),formDTO.getRentFlag());
return new Result().ok(icNeighborHoodResultDTO);
}
@ -142,7 +142,7 @@ public class HouseController implements ResultDataResolver {
null);
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(loginUserDetail.getAgencyId(),null, null, null,
neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize());
neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize(),null,null,null);
return new Result<IcNeighborHoodResultDTO>().ok(icNeighborHoodResultDTO);
}

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

@ -38,7 +38,10 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
@Param("ownerPhone") String ownerPhone,
@Param("neighborHoodName") String neighborHoodName,
@Param("buildingName") String buildingName,
@Param("queryScene") String queryScene);
@Param("queryScene") String queryScene,
@Param("id")String id,
@Param("level")String level,
@Param("rentFlag")String rentFlag);
List<IcHouseExcel> searchAllHouse(@Param("house") IcHouseEntity house);

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

@ -62,7 +62,10 @@ public interface HouseService {
String buildingName,
String queryScene,
Integer pageNo,
Integer pageSize);
Integer pageSize,
String id,
String level,
String rentFlag);
void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception;

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

@ -256,7 +256,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
String buildingName,
String queryScene,
Integer pageNo,
Integer pageSize) {
Integer pageSize,
String id,String level, String rentFlag) {
IcNeighborHoodResultDTO result = new IcNeighborHoodResultDTO();
//如果类型是house 查房屋
//IPage<Map<String, Object>> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize);
@ -264,23 +265,15 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
// 查询pids
String pids = null;
if (StringUtils.isNotBlank(ancestorAgencyId)) {
CustomerAgencyDTO agency = agencyservice.getAgencyById(ancestorAgencyId);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败");
}
if (NumConstant.ZERO_STR.equals(agency.getPid())) {
pids = ancestorAgencyId;
} else {
pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId);
pids = getPids(ancestorAgencyId);
}
if (StringUtils.isNotBlank(level) && level.equals("agency")){
pids = getPids(ancestorAgencyId);
}
IPage<IcHouseEntity> page = new Page<IcHouseEntity>(pageNo,pageSize);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene,id,level,rentFlag);
List<Map<String, Object>> records = mapIPage.getRecords();
records.forEach(item->{
item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey")));
@ -291,6 +284,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
result.setList(records);
return result;
}
public String getPids(String agencyId){
String pids = null;
CustomerAgencyDTO agency = agencyservice.getAgencyById(agencyId);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败");
}
if (NumConstant.ZERO_STR.equals(agency.getPid())) {
pids = agencyId;
} else {
pids = agency.getPids().concat(StrConstant.COLON).concat(agencyId);
}
return pids;
}
@Override
public void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception {

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

@ -154,7 +154,7 @@
b.BUILDING_NAME as buildingName,
d.UNIT_NUM as unitNum,
a.DOOR_NAME as doorName,
if(a.RENT_FLAG=1,'是','否') as rentFlag,
if(a.RENT_FLAG=0,'自住',if(a.RENT_FLAG=1,'出租','闲置')) as rentFlag,
a.OWNER_NAME as ownerName,
/*a.RENT_FLAG as rentFlag,
a.PURPOSE as purpose,*/
@ -177,14 +177,24 @@
<where>
a.del_flag = '0'
<if test="pids != null and pids != ''">
and case c.AGENCY_PIDS
when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%')
end
and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end
</if>
<if test="buildingId != null and buildingId.trim() != ''">
AND a.BUILDING_ID = #{buildingId}
</if>
<if test='level == "grid"'>
AND c.GRID_ID = #{id}
</if>
<if test='level == "neighborHood"'>
AND c.id = #{id}
</if>
<if test='level == "build"'>
AND b.id = #{id}
</if>
<if test="rentFlag != null and rentFlag.trim() != ''">
AND a.RENT_FLAG = #{rentFlag}
</if>
<if test="ownerName != null and ownerName.trim() != ''">
AND a.OWNER_NAME like concat('%',#{ownerName},'%')
</if>
@ -197,6 +207,9 @@
<if test="buildingName != null and buildingName.trim() != ''">
AND b.BUILDING_NAME like CONCAT('%',#{buildingName},'%')
</if>
<if test="rentFlag != null and rentFlag.trim() != ''">
AND a.rent_flag = #{rentFlag}
</if>
</where>
/*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/
<choose>
@ -220,7 +233,7 @@
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
if(a.RENT_FLAG=1,'是','否') as rentFlag,
if(a.RENT_FLAG=0,'自住',if(a.RENT_FLAG=1,'出租','闲置')) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,

Loading…
Cancel
Save