You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
357 lines
13 KiB
357 lines
13 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.elink.esua.epdc.modules.screen.dao.EpdcScreenDao">
|
|
|
|
<select id="gridGovernanceItemList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceItemResultDTO">
|
|
SELECT
|
|
i.ID,
|
|
i.ITEM_CONTENT,
|
|
c.CATEGORY_NAME,
|
|
i.DISTRIBUTE_TIME,
|
|
IFNULL(e.APPROVE_NUM + e.OPPOSE_NUM + e.COMMENT_NUM, 0) AS attentionNum
|
|
FROM
|
|
yushan_esua_epdc_events.epdc_item i
|
|
LEFT JOIN yushan_esua_epdc_events.epdc_category c ON c.CATEGORY_CODE = i.CATEGORY_CODE
|
|
LEFT JOIN yushan_esua_epdc_events.epdc_events e ON e.ID = i.EVENT_ID
|
|
WHERE
|
|
i.DEL_FLAG = '0'
|
|
ORDER BY
|
|
<if test="orderType == 1">
|
|
attentionNum DESC,
|
|
</if>
|
|
i.DISTRIBUTE_TIME DESC
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="itemCategoryStatistics" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceItemCategoryResultDTO">
|
|
SELECT
|
|
ec.CATEGORY_NAME,
|
|
t.itemNum
|
|
FROM
|
|
yushan_esua_epdc_analysis.meta_epdc_category ec
|
|
LEFT JOIN (
|
|
SELECT
|
|
c.CATEGORY_NAME,
|
|
IFNULL( SUM( c.ITEM_TOTLE ), 0 ) itemNum
|
|
FROM
|
|
yushan_esua_epdc_analysis.epdc_issue_item_category c
|
|
WHERE
|
|
c.CATEGORY_TYPE = '1'
|
|
GROUP BY
|
|
c.CATEGORY_NAME
|
|
ORDER BY
|
|
itemNum DESC
|
|
) t ON t.CATEGORY_NAME = ec.CATEGORY_NAME
|
|
WHERE
|
|
ec.DEL_FLAG = 0
|
|
AND ec.CATEGORY_TYPE = '0'
|
|
</select>
|
|
|
|
<select id="itemStatusStatistics" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceItemStatusResultDTO">
|
|
SELECT
|
|
IFNULL(SUM(ITEM_STATE = 0), 0) AS processingNum,
|
|
IFNULL(SUM(ITEM_STATE = 5 OR ITEM_STATE = 10), 0) AS completedNum
|
|
FROM
|
|
yushan_esua_epdc_events.epdc_item
|
|
WHERE
|
|
DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="difficultItemList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceItemDifficultResultDTO">
|
|
SELECT
|
|
di.EVENT_ID,
|
|
di.ITEM_CONTENT,
|
|
di.DISTRIBUTE_TIME,
|
|
di.SPEND_TIME,
|
|
di.HANDLE_TOTAL,
|
|
di.DEPT_TOTAL
|
|
FROM
|
|
yushan_esua_epdc_analysis.epdc_difficult_item di,
|
|
yushan_esua_epdc_analysis.epdc_item_difficult_config dc
|
|
WHERE
|
|
di.DEL_FLAG = '0'
|
|
AND (
|
|
di.SPEND_TIME >= dc.MIN_SPEND_TIME
|
|
OR di.HANDLE_TOTAL >= dc.MIN_HANDLE_TOTAL
|
|
OR di.DEPT_TOTAL >= dc.MIN_DEPT_TOTAL)
|
|
ORDER BY
|
|
<if test="orderType == 0">
|
|
di.SPEND_TIME DESC,
|
|
</if>
|
|
<if test="orderType == 1">
|
|
di.DEPT_TOTAL DESC,
|
|
</if>
|
|
<if test="orderType == 2">
|
|
di.HANDLE_TOTAL DESC,
|
|
</if>
|
|
di.DISTRIBUTE_TIME DESC
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="governanceRanking" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenGridGovernanceRankingResultDTO">
|
|
SELECT
|
|
DEPT_ID,
|
|
DEPT_NAME,
|
|
REGISTRATION_RATE,
|
|
RESPONSE_RATE,
|
|
RESOLUTION_RATE,
|
|
SATISFACTION_RATE,
|
|
AUTONOMY_RATE
|
|
FROM
|
|
yushan_esua_epdc_analysis.epdc_screen_governance_ranking
|
|
WHERE
|
|
DEL_FLAG = '0'
|
|
AND STATISTIC_TYPE = #{statisticType}
|
|
ORDER BY
|
|
<if test="orderType == 0">
|
|
REGISTRATION_RATE DESC,
|
|
</if>
|
|
<if test="orderType == 1">
|
|
RESPONSE_RATE DESC,
|
|
</if>
|
|
<if test="orderType == 2">
|
|
RESOLUTION_RATE DESC,
|
|
</if>
|
|
<if test="orderType == 3">
|
|
SATISFACTION_RATE DESC,
|
|
</if>
|
|
<if test="orderType == 4">
|
|
AUTONOMY_RATE DESC,
|
|
</if>
|
|
DEPT_NAME
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="noticeList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingNoticeListResultDTO">
|
|
SELECT
|
|
n.ID,
|
|
n.NOTICE_TITLE,
|
|
n.NOTICE_CONTENT,
|
|
n.DEPT_NAME,
|
|
n.CREATED_TIME,
|
|
n.TOP_FLAG
|
|
FROM
|
|
yushan_esua_epdc_news.epdc_notice n
|
|
LEFT JOIN yushan_esua_epdc_news.epdc_module_type t ON t.id = n.TYPE_ID
|
|
WHERE
|
|
n.DEL_FLAG = '0'
|
|
AND n.NOTICE_RELEASE_STATE = '1'
|
|
AND n.NOTICE_UP_DOWN_STATE = '1'
|
|
AND t.TYPE_CODE = #{typeCode}
|
|
|
|
ORDER BY
|
|
n.TOP_FLAG DESC,
|
|
n.TOP_TIME DESC,
|
|
n.CREATED_TIME DESC
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="partyOrgActList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingPartyOrgActResultDTO">
|
|
SELECT
|
|
d.id AS deptId,
|
|
d.`name` AS deptName,
|
|
IFNULL( a.ACT_ZTDR_NUM, 0 ) AS actZtdrNum,
|
|
IFNULL( a.ACT_SHYK_NUM, 0 ) AS actShykNum,
|
|
IFNULL( a.ACT_LJGJ_NUM, 0 ) AS actLjgjNum,
|
|
IFNULL( a.ACT_ZTDR_PERSON_NUM, 0 ) AS actZtdrPersonNum,
|
|
IFNULL( a.ACT_SHYK_PERSON_NUM, 0 ) AS actShykPersonNum,
|
|
IFNULL( a.ACT_LJGJ_PERSON_NUM, 0 ) AS actLjgjPersonNum
|
|
FROM
|
|
yushan_esua_epdc_admin.sys_dept d
|
|
LEFT JOIN yushan_esua_epdc_analysis.epdc_screen_community_act_statistics a ON a.DEPT_ID = d.id
|
|
AND a.DEL_FLAG = '0'
|
|
WHERE
|
|
d.del_flag = 0
|
|
AND d.type_key = 'community_party'
|
|
ORDER BY
|
|
<if test="orderType == 0">
|
|
actZtdrNum+actShykNum+actLjgjNum DESC,
|
|
</if>
|
|
<if test="orderType == 1">
|
|
actZtdrPersonNum+actShykPersonNum+actLjgjPersonNum DESC,
|
|
</if>
|
|
d.`name`
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="partyOrgTypeList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingPartyOrgTypeResultDTO">
|
|
SELECT
|
|
ot.ID,
|
|
ot.TYPE_NAME,
|
|
COUNT( po.ID ) AS partyOrgNum
|
|
FROM
|
|
yushan_esua_epdc_admin.epdc_party_org_type ot
|
|
LEFT JOIN yushan_esua_epdc_admin.epdc_party_org po ON po.TYPE_CODE = ot.TYPE_CODE
|
|
AND po.DEL_FLAG = '0'
|
|
WHERE
|
|
ot.DEL_FLAG = '0'
|
|
AND `ENABLE` = '1'
|
|
ORDER BY
|
|
SORT
|
|
</select>
|
|
|
|
<select id="partyOrgList" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingPartyOrgResultDTO">
|
|
SELECT
|
|
ID,
|
|
PARTY_ORG_NAME,
|
|
INTRODUCTION,
|
|
TWO_COMMITTEES,
|
|
PARTY_MEMBER_NUM,
|
|
LONGITUDE,
|
|
LATITUDE
|
|
FROM
|
|
yushan_esua_epdc_admin.epdc_party_org
|
|
WHERE
|
|
DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="brightIdentity" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingBrightIdentityResultDTO">
|
|
SELECT
|
|
ui.ID,
|
|
u.REAL_NAME,
|
|
u.FACE_IMG,
|
|
u.MOBILE,
|
|
ui.MOTTO,
|
|
ui.PROMISE,
|
|
ui.SERVICE_AREA
|
|
FROM
|
|
yushan_esua_epdc_user.epdc_user_info ui
|
|
LEFT JOIN yushan_esua_epdc_user.epdc_user u ON u.ID = ui.USER_ID
|
|
WHERE
|
|
ui.DEL_FLAG = '0'
|
|
AND ui.RECOMMEND_FLAG = '1'
|
|
ORDER BY
|
|
ui.RECOMMEND_TIME DESC,
|
|
ui.CREATED_TIME DESC
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="partyMemberAge" resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenPartyBuildingPartyMemberAgeResultDTO">
|
|
SELECT
|
|
IFNULL(SUM( AGE_EIGHTEEN_THIRTY ), 0) AS ageEighteenThirty,
|
|
IFNULL(SUM( AGE_THIRTY_ONE_FORTY ), 0) AS ageThirtyOneForty,
|
|
IFNULL(SUM( AGE_FORTY_ONE_FIFTY ), 0) AS ageFortyOneFifty,
|
|
IFNULL(SUM( AGE_FIFTY_ONE_SIXTY ), 0) AS ageFiftyOneSixty,
|
|
IFNULL(SUM( AGE_SIXTY_ONE_SEVENTY ), 0) AS ageSixtyOneSeventy,
|
|
IFNULL(SUM( AGE_OVER_SEVENTY ), 0) AS ageOverSeventy
|
|
FROM
|
|
yushan_esua_epdc_analysis.epdc_screen_party_member_age_statistics
|
|
WHERE
|
|
DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="frontPageDeptInfoList"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenFrontPageDeptInfoResultDTO">
|
|
SELECT
|
|
sd.name,
|
|
sd.type_key,
|
|
sdi.DEPT_ID,
|
|
sdi.introduction,
|
|
sdi.COMMUNITY_NUM,
|
|
sdi.GRID_NUM,
|
|
sdi.GRIDMAN_NUM,
|
|
sdi.PARTY_MEMBER_NUM,
|
|
sdi.LONGITUDE,
|
|
sdi.LATITUDE,
|
|
sdi.ACREAGE,
|
|
edi.IMG_URL,
|
|
edi.IMG_TYPE
|
|
FROM sys_dept_info sdi
|
|
LEFT JOIN sys_dept sd WHERE sd.ID = sdi.DEPR_ID
|
|
LEFT JOIN epdc_admin_img edi WHERE edi.REFERENCE_ID = sdi.ID
|
|
WHERE sd.del_flag = '0'
|
|
AND sdi.DEL_FLAG = '0'
|
|
AND edi.DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="frontPagePersonInfoStatisticsList"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenFrontPagePersonInfoStatisticsResultDTO">
|
|
SELECT
|
|
sum(if(LIVE_TYPE='0',PERSON_NUM,0)) as permanentResidenceNum,
|
|
sum(if(LIVE_TYPE='1',PERSON_NUM,0)) as floatingPopulationNum,
|
|
sum(if(LIVE_TYPE='2',PERSON_NUM,0)) as overseasPopulationNum
|
|
FROM epdc_screen_person_live_statistics
|
|
WHERE DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="frontPageHouseTypeStatistics"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenFrontPageHouseTypeStatisticsResultDTO">
|
|
SELECT
|
|
sum(if(HOUSE_TYPE ='0',HOUSE_NUM ,0)) as aloneLiveNum,
|
|
sum(if(HOUSE_TYPE ='1',HOUSE_NUM ,0)) as rentNum,
|
|
sum(if(HOUSE_TYPE ='2',HOUSE_NUM ,0)) as dormitoryNum,
|
|
sum(if(HOUSE_TYPE ='3',HOUSE_NUM ,0)) as vacantNum,
|
|
sum(if(HOUSE_TYPE ='4',HOUSE_NUM ,0)) as otherNum
|
|
FROM epdc_screen_house_type_statistics
|
|
WHERE DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="epidemicVaccinationStatistics"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenEpidemicVaccinationStatisticsResultDTO">
|
|
SELECT
|
|
SUM (VACCINATION_COMPLETED_NUM) as vaccinationCompletedNum,
|
|
SUM (ONE_SHOT_NUM) as oneShotNum,
|
|
SUM (TWO_SHOTS_NUM) as twoShotsNum,
|
|
SUM (NOT_VACCINATED_NUM) as notVaccinatedNum
|
|
FROM epdc_screen_vaccination_statistics
|
|
WHERE DEL_FLAG = '0'
|
|
GROUP BY id
|
|
</select>
|
|
|
|
<select id="epidemicCommunityVaccinationStatisticsList"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenEpidemicCommunityVaccinationStatisticsResultDTO">
|
|
SELECT
|
|
DEPT_ID,
|
|
DEPT_NAME,
|
|
COMMUNITY_TOTAL_NUM,
|
|
VACCINATION_COMPLETED_NUM,
|
|
ONE_SHOT_NUM,
|
|
TWO_SHOTS_NUM,
|
|
NOT_VACCINATED_NUM,
|
|
BEING_VACCINATED_NUM,
|
|
LONGITUDE,
|
|
LATITUDE
|
|
FROM epdc_screen_vaccination_statistics
|
|
WHERE DEL_FLAG = '0'
|
|
ORDER BY
|
|
<if test="orderType == 0">
|
|
VACCINATION_COMPLETED_NUM DESC
|
|
</if>
|
|
<if test="orderType == 1">
|
|
ONE_SHOT_NUM DESC
|
|
</if>
|
|
<if test="orderType == 2">
|
|
TWO_SHOTS_NUM DESC
|
|
</if>
|
|
<if test="orderType == 3">
|
|
NOT_VACCINATED_NUM DESC
|
|
</if>
|
|
DEPT_NAME
|
|
LIMIT #{pageIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="epidemicCompanyVaccinationStatisticsList"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenEpidemicCompanyVaccinationStatisticsResultDTO">
|
|
SELECT
|
|
COMPANY,
|
|
VACCINATION_NUM
|
|
FROM epdc_screen_vaccination_company_statistics
|
|
WHERE DEL_FLAG = '0'
|
|
</select>
|
|
|
|
<select id="vaccinationAgeVaccinationStatistics"
|
|
resultType="com.elink.esua.epdc.dto.analysis.pc.screen.result.EpdcScreenVaccinationAgeVaccinationStatisticsResultDTO">
|
|
|
|
SELECT
|
|
|
|
FROM epdc_screen_vaccination_age_statistics
|
|
SUM (AGE_EIGHTEEN_THIRTY) ,
|
|
SUM (AGE_THIRTY_ONE_FORTY) ,
|
|
SUM (AGE_FORTY_ONE_FIFTY) ,
|
|
SUM (AGE_FIFTY_ONE_SIXTY) ,
|
|
SUM (AGE_OVER_SIXTY)
|
|
WHERE DEL_FLAG = '0'
|
|
AND STATISTIC_TYPE = #{statisticType}
|
|
</select>
|
|
</mapper>
|
|
|