Browse Source

【修复bug】党员学历信息统计总数和总人数不一致

1.数据库中学历字段空字符串和null合并
national_dev
Bill 2 years ago
parent
commit
5dc69dccd1
  1. 28
      code/smart-community/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml

28
code/smart-community/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml

@ -141,23 +141,23 @@
<select id="getPartyMemberEducationStatistics"
resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO">
SELECT
CULTURE AS "code",
count(ID) AS "value"
CULTURE AS "code",
count(ID) AS "value"
FROM
( SELECT ID, IF(CULTURE = '', NULL, CULTURE) as CULTURE FROM
ic_party_member
WHERE
WHERE
DEL_FLAG = '0'
-- AND CULTURE IS NOT NULL
-- AND CULTURE != ''
<choose>
<when test='orgId != "" and orgId != null'>
AND (SSZB = #{orgId} OR ORG_PIDS LIKE CONCAT('%',#{orgId},'%'))
</when>
<otherwise>
AND (AGENCY_ID = #{agencyId} OR AGENCY_PIDS LIKE CONCAT('%',#{agencyId},'%'))
</otherwise>
</choose>
GROUP BY CULTURE
<choose>
<when test='orgId != "" and orgId != null'>
AND (SSZB = #{orgId} OR ORG_PIDS LIKE CONCAT('%',#{orgId},'%'))
</when>
<otherwise>
AND (AGENCY_ID = #{agencyId} OR AGENCY_PIDS LIKE CONCAT('%',#{agencyId},'%'))
</otherwise>
</choose>
) ipm
GROUP BY ipm.CULTURE
</select>
<select id="getPartyMemberAgeList" resultType="com.epmet.dto.result.PartyMemberAgeResultDTO">
SELECT

Loading…
Cancel
Save