Browse Source

人户状况

master
zxc 3 years ago
parent
commit
e8e4112f36
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  2. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java
  3. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  4. 26
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

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

@ -972,6 +972,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
} }
} }
for (RHZKStatisticsResultDTO r : rhzkResult.getData()) { for (RHZKStatisticsResultDTO r : rhzkResult.getData()) {
if (StringUtils.isNotBlank(r.getOrgId())){
if (r.getOrgId().equals(id)){ if (r.getOrgId().equals(id)){
dto.setRhyzUserTotal(r.getRhyzUserTotal()); dto.setRhyzUserTotal(r.getRhyzUserTotal());
dto.setRhyzUserRatio(r.getRhyzUserRatio()); dto.setRhyzUserRatio(r.getRhyzUserRatio());
@ -984,6 +985,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
dto.setUserTotal(r.getUserTotal()); dto.setUserTotal(r.getUserTotal());
} }
} }
}
list.add(dto); list.add(dto);
} }
return list; return list;

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java

@ -27,6 +27,11 @@ public class UserChartFormDTO implements Serializable {
*/ */
private String type; private String type;
/**
* 人户一致:rhyz人在户不在rzhbz户在人不在hzrbz暂不清楚no全部all
*/
private String rhType;
private Integer pageNo = 1; private Integer pageNo = 1;
private Integer pageSize = 20; private Integer pageSize = 20;
private Boolean isPage = true; private Boolean isPage = true;

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -3660,6 +3660,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
} }
r.setUserTotal(userByRenHu.stream().collect(Collectors.summingInt(RHZKStatisticsResultDTO::getTotal))); r.setUserTotal(userByRenHu.stream().collect(Collectors.summingInt(RHZKStatisticsResultDTO::getTotal)));
userByRenHu.forEach(u -> { userByRenHu.forEach(u -> {
r.setOrgId(u.getOrgId());
switch (u.getRhzk()){ switch (u.getRhzk()){
case UserConstant.R_H_Y_Z: case UserConstant.R_H_Y_Z:
r.setRhyzUserTotal(u.getTotal()); r.setRhyzUserTotal(u.getTotal());

26
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -1359,6 +1359,18 @@
<if test='null != type and type.trim() != "" and type == "ld" '> <if test='null != type and type.trim() != "" and type == "ld" '>
AND (is_floating != '0' or is_floating is null) AND (is_floating != '0' or is_floating is null)
</if> </if>
<if test='null != rhType and rhType.trim() != "" and rhType == "rhyz" '>
AND RHZK = 'rhyz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "rzhbz" '>
AND RHZK = 'rzhbz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "hzrbz" '>
AND RHZK = 'hzrbz'
</if>
<if test='null != rhType and rhType.trim() != "" and rhType == "no" '>
AND(RHZK = '' or RHZK = null)
</if>
<choose> <choose>
<when test='orgType == "agency"'> <when test='orgType == "agency"'>
AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%')) AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%'))
@ -1406,11 +1418,21 @@
<select id="getUserByRenHu" resultType="com.epmet.dto.result.RHZKStatisticsResultDTO"> <select id="getUserByRenHu" resultType="com.epmet.dto.result.RHZKStatisticsResultDTO">
SELECT SELECT
COUNT(ID) AS total, COUNT(ID) AS total,
rhzk rhzk,
orgId
FROM FROM
(SELECT (SELECT
ID, ID,
IFNULL(RHZK,'') AS rhzk IFNULL(RHZK,'') AS rhzk,
<if test='orgType == "agency" '>
AGENCY_ID AS orgId
</if>
<if test='orgType == "grid" '>
GRID_ID AS orgId
</if>
<if test='orgType == "village" '>
VILLAGE_ID AS orgId
</if>
FROM ic_resi_user FROM ic_resi_user
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
AND `STATUS` = '0' AND `STATUS` = '0'

Loading…
Cancel
Save