|
|
@ -352,47 +352,46 @@ |
|
|
|
<select id="selectSubStreetByAreaCode" parameterType="map" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO"> |
|
|
|
SELECT |
|
|
|
sca.AGENCY_NAME AS NAME, |
|
|
|
sy.govern_ablity AS governAbility, |
|
|
|
sy.party_dev_ablity AS partyDevAbility, |
|
|
|
sy.service_ablity AS serviceAbility, |
|
|
|
sy.govern_ablity * sy.GOVERN_ABLITY_WEIGHT AS governAbility, |
|
|
|
sy.party_dev_ablity * sy.PARTY_DEV_WEIGHT AS partyDevAbility, |
|
|
|
sy.service_ablity * sy.SERVICE_ABLITY_WEIGHT AS serviceAbility, |
|
|
|
sy.ORG_ID as orgId, |
|
|
|
sca.area_code as areaCode |
|
|
|
FROM screen_customer_agency sca |
|
|
|
left join screen_index_data_yearly sy |
|
|
|
on(sca.AGENCY_ID=sy.ORG_ID |
|
|
|
and sy.DEL_FLAG='0' |
|
|
|
and sy.ORG_TYPE != 'department' |
|
|
|
and sy.YEAR_ID=#{yearId} |
|
|
|
) |
|
|
|
left join screen_index_data_monthly sy |
|
|
|
on(sca.AGENCY_ID=sy.ORG_ID |
|
|
|
and sy.DEL_FLAG='0' |
|
|
|
and sy.MONTH_ID=#{monthId} |
|
|
|
) |
|
|
|
WHERE |
|
|
|
sca.del_flag = '0' |
|
|
|
AND sca.PARENT_AREA_CODE=#{areaCode} |
|
|
|
and sy.CUSTOMER_ID=#{customerId} |
|
|
|
sca.del_flag = '0' |
|
|
|
AND sca.PARENT_AREA_CODE=#{areaCode} |
|
|
|
and sy.CUSTOMER_ID=#{customerId} |
|
|
|
ORDER BY (sy.govern_ablity+sy.party_dev_ablity+sy.service_ablity) DESC |
|
|
|
LIMIT #{topNum} |
|
|
|
LIMIT #{topNum} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectSubGridByAreaCode" parameterType="map" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO"> |
|
|
|
SELECT |
|
|
|
scg.GRID_NAME AS NAME, |
|
|
|
sy.govern_ablity AS governAbility, |
|
|
|
sy.party_dev_ablity AS partyDevAbility, |
|
|
|
sy.service_ablity AS serviceAbility, |
|
|
|
sy.govern_ablity * sy.GOVERN_ABLITY_WEIGHT AS governAbility, |
|
|
|
sy.party_dev_ablity * sy.PARTY_DEV_WEIGHT AS partyDevAbility, |
|
|
|
sy.service_ablity * sy.SERVICE_ABLITY_WEIGHT AS serviceAbility, |
|
|
|
sy.ORG_ID as orgId, |
|
|
|
scg.area_code as areaCode |
|
|
|
FROM screen_customer_grid scg |
|
|
|
left join screen_index_data_yearly sy |
|
|
|
on(scg.GRID_ID=sy.ORG_ID |
|
|
|
and sy.DEL_FLAG='0' |
|
|
|
and sy.ORG_TYPE != 'department' |
|
|
|
and sy.YEAR_ID=#{yearId} |
|
|
|
) |
|
|
|
left join screen_index_data_monthly sy |
|
|
|
on(scg.GRID_ID=sy.ORG_ID |
|
|
|
and sy.DEL_FLAG='0' |
|
|
|
and sy.ORG_TYPE != 'department' |
|
|
|
and sy.MONTH_ID=#{monthId} |
|
|
|
) |
|
|
|
WHERE |
|
|
|
scg.del_flag = '0' |
|
|
|
AND scg.AREA_CODE like CONCAT(#{areaCode},'%') |
|
|
|
and sy.CUSTOMER_ID=#{customerId} |
|
|
|
scg.del_flag = '0' |
|
|
|
AND scg.AREA_CODE like CONCAT(#{areaCode},'%') |
|
|
|
and sy.CUSTOMER_ID=#{customerId} |
|
|
|
ORDER BY (sy.govern_ablity+sy.party_dev_ablity+sy.service_ablity) DESC |
|
|
|
LIMIT #{topNum} |
|
|
|
LIMIT #{topNum} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectKczSubAgencyOrGridIndexMonthlyRank" parameterType="com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankYMFormDTO" |
|
|
|