Browse Source

联户群众列表

master
yinzuomei 2 years ago
parent
commit
8888215fd8
  1. 15
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/LingShanLianHuResiUserFormDTO.java
  2. 16
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/IcResiUserResultDTO.java
  3. 33
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/LingShanLianHuResiUserResultDTO.java
  4. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  5. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java
  6. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  7. 23
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  8. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  9. 31
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  10. 24
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml

15
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/LingShanLianHuResiUserFormDTO.java

@ -0,0 +1,15 @@
package com.epmet.dataaggre.dto.epmetuser.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
/**
* @Description
* @Author yzm
* @Date 2023/5/19 9:23
*/
@Data
public class LingShanLianHuResiUserFormDTO extends PageFormDTO {
private String partyCenterHouseId;
}

16
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/IcResiUserResultDTO.java

@ -0,0 +1,16 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
/**
* @Description
* @Author yzm
* @Date 2023/5/19 9:52
*/
@Data
public class IcResiUserResultDTO {
private String icResiUserId;
private String name;
private String mobile;
}

33
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/LingShanLianHuResiUserResultDTO.java

@ -0,0 +1,33 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
import java.util.List;
/**
* @Description 灵山大屏-党员中共新户联户群众列表
* @Author yzm
* @Date 2023/5/19 9:10
*/
@Data
public class LingShanLianHuResiUserResultDTO {
/**
* 与入参一致
* 党员中心户房屋id,
*/
private String partyCenterHouseId;
// 关联的房屋信息
private String neighborHoodId;
private String neighborHoodName;
private String buildingId;
private String buildingName;
private String buildingUnitId;
private String unitName;
private String doorName;
private String houseId;
// 每个房屋里住的居民
private List<IcResiUserResultDTO> resiList;
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -24,6 +24,8 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.beans.GridMemberDataAnalysisExcelExportBean;
import com.epmet.dataaggre.dto.epmetuser.form.LingShanLianHuResiUserFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.LingShanLianHuResiUserResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
@ -567,4 +569,15 @@ public class GovOrgController {
}
}
/**
* 灵山大屏根据房屋id查询联户里的居民信息列表
*
* @param formDTO
* @return
*/
@PostMapping("lianHuResi")
public Result<PageData<LingShanLianHuResiUserResultDTO>> lianHuResi(@RequestBody LingShanLianHuResiUserFormDTO formDTO) {
return new Result<PageData<LingShanLianHuResiUserResultDTO>>().ok(govOrgService.lianHuResi(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getPartyCenterHouseId()));
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java

@ -2,6 +2,7 @@ package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.LingShanLianHuResiUserResultDTO;
import com.epmet.dataaggre.entity.govorg.IcHouseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -36,4 +37,11 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
@Param("houseId") String houseId,
@Param("houseRule") List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
@Param("statRule") List<ResisByPolicyRulesFormDTO.StatRule> statRule);
/**
* 灵山项目查询房屋关联的联户房屋
* @param partyCenterHouseId
* @return
*/
List<LingShanLianHuResiUserResultDTO> selectListLianHuHouse(@Param("partyCenterHouseId") String partyCenterHouseId);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -11,7 +11,6 @@ import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.CoverageAnalisisDataListResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
@ -269,4 +268,11 @@ public interface EpmetUserService {
Integer pageNo, Integer pageSize);
Integer staffQtyInGridsOfRole(String roleKeyAgent, Set<String> staffIds);
/**
* 根据房屋id,查询居民信息
* @param houseId
* @return
*/
List<IcResiUserResultDTO> listIcResiUserByHouseId(String houseId);
}

23
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -1187,4 +1187,27 @@ public class EpmetUserServiceImpl implements EpmetUserService, ResultDataResolve
return customerStaffDao.countStaffQtyByStaffIdsAndRole(staffIds, role.getId());
}
/**
* 根据房屋id,查询居民信息
*
* @param houseId
* @return
*/
@Override
public List<IcResiUserResultDTO> listIcResiUserByHouseId(String houseId) {
LambdaQueryWrapper<IcResiUserEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(IcResiUserEntity::getHomeId, houseId)
.eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR);
List<IcResiUserEntity> list = icResiUserDao.selectList(queryWrapper);
List<IcResiUserResultDTO> resultList = new ArrayList<>();
for (IcResiUserEntity entity : list) {
IcResiUserResultDTO resultDTO = new IcResiUserResultDTO();
resultDTO.setIcResiUserId(entity.getId());
resultDTO.setName(entity.getName());
resultDTO.setMobile(entity.getMobile());
resultList.add(resultDTO);
}
return resultList;
}
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.beans.LingShanAgentServiceStaffAndGrid;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.LingShanLianHuResiUserResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
@ -309,4 +310,13 @@ public interface GovOrgService {
Set<String> getStaffIdsInGrid(String gridId);
List<CustomerGridEntity> listBelongGridsByStaffId(String staffId);
/**
* 灵山大屏根据房屋id查询联户里的居民信息列表
* @param pageNo
* @param pageSize
* @param partyCenterHouseId
* @return
*/
PageData<LingShanLianHuResiUserResultDTO> lianHuResi(Integer pageNo, Integer pageSize, String partyCenterHouseId);
}

31
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -37,10 +37,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.govorg.*;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.CustomerStaffResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ListStaffResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
@ -1572,4 +1569,30 @@ public class GovOrgServiceImpl implements GovOrgService {
q2.in(CustomerGridEntity::getId, staffAndGrids.stream().map(CustomerStaffGridEntity::getGridId).collect(Collectors.toList()));
return customerGridDao.selectList(q2);
}
/**
* 灵山大屏根据房屋id查询联户里的居民信息列表
*
* @param pageNo
* @param pageSize
* @param partyCenterHouseId
* @return
*/
public PageData<LingShanLianHuResiUserResultDTO> lianHuResi(Integer pageNo, Integer pageSize, String partyCenterHouseId) {
// 先查询关联的房屋id
PageHelper.startPage(pageNo, pageSize);
List<LingShanLianHuResiUserResultDTO> houseList = houseDao.selectListLianHuHouse(partyCenterHouseId);
if (CollectionUtils.isEmpty(houseList)) {
return new PageData<>();
}
houseList.forEach(lianHuHouse -> {
List<IcResiUserResultDTO> resiList = epmetUserService.listIcResiUserByHouseId(lianHuHouse.getHouseId());
lianHuHouse.setResiList(resiList);
});
PageInfo<LingShanLianHuResiUserResultDTO> pageInfo = new PageInfo<>(houseList);
return new PageData<>(houseList, pageInfo.getTotal());
}
}

24
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml

@ -38,4 +38,28 @@
</if>
</where>
</select>
<select id="selectListLianHuHouse" parameterType="map" resultType="com.epmet.dataaggre.dto.epmetuser.result.LingShanLianHuResiUserResultDTO">
SELECT DISTINCT
l.HOUSE_ID,
l.PARTY_CENTER_HOUSE_ID,
l.NEIGHBOR_HOOD_ID,
h.NEIGHBOR_HOOD_NAME,
l.BUILDING_ID,
ib.BUILDING_NAME,
l.BUILDING_UNIT_ID,
u.UNIT_NAME,
ih.DOOR_NAME
FROM
lingshan_party_center_house_lianhu l
INNER JOIN ic_house ih ON ( l.HOUSE_ID = ih.ID )
left join ic_neighbor_hood h on(ih.NEIGHBOR_HOOD_ID=h.ID)
left join ic_building ib on(l.BUILDING_ID=ib.ID)
left join ic_building_unit u on(l.BUILDING_UNIT_ID=u.ID)
WHERE
l.DEL_FLAG = '0'
AND l.PARTY_CENTER_HOUSE_ID = #{partyCenterHouseId}
AND ih.DEL_FLAG = '0'
order by l.CREATED_TIME asc
</select>
</mapper>

Loading…
Cancel
Save