Browse Source

查询先进排行关联组织

dev_shibei_match
jianjun 4 years ago
parent
commit
f605590fa8
  1. 45
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

45
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -185,28 +185,41 @@
<select id="selectMonthData" resultType="com.epmet.evaluationindex.screen.dto.result.IndexScoreResultDTO"> <select id="selectMonthData" resultType="com.epmet.evaluationindex.screen.dto.result.IndexScoreResultDTO">
SELECT SELECT
index_total AS "total", score.index_total AS "total",
(party_dev_ablity * party_dev_weight) AS "party", (score.party_dev_ablity * score.party_dev_weight) AS "party",
ROUND(party_dev_ablity,1) partyOriginScore, ROUND(score.party_dev_ablity,1) partyOriginScore,
party_dev_weight AS "partyDevAbilityWeight", score.party_dev_weight AS "partyDevAbilityWeight",
(govern_ablity * govern_ablity_weight) AS "govern", (score.govern_ablity * score.govern_ablity_weight) AS "govern",
ROUND(govern_ablity,1) governOriginScore, ROUND(score.govern_ablity,1) governOriginScore,
govern_ablity_weight AS "governAbilityWeight", score.govern_ablity_weight AS "governAbilityWeight",
(service_ablity * service_ablity_weight) AS "service", (score.service_ablity * score.service_ablity_weight) AS "service",
ROUND(service_ablity,1) serviceOriginScore, ROUND(score.service_ablity,1) serviceOriginScore,
service_ablity_weight AS "serviceAbilityWeight" score.service_ablity_weight AS "serviceAbilityWeight"
FROM FROM
screen_index_data_monthly screen_index_data_monthly score
<if test="orgType != null and orgType != ''">
<choose>
<when test="orgType == 'grid'">
INNER JOIN screen_customer_grid org ON org.CUSTOMER_ID = score.CUSTOMER_ID AND org.GRID_ID = score.ORG_ID AND org.DEL_FLAG = '0'
</when>
<when test="orgType == 'agency'">
INNER JOIN screen_customer_agency org ON org.CUSTOMER_ID = score.CUSTOMER_ID AND org.GRID_ID = score.ORG_ID AND org.DEL_FLAG = '0'
</when>
<when test="orgType == 'department'">
INNER JOIN screen_customer_dept org ON org.CUSTOMER_ID = score.CUSTOMER_ID AND org.GRID_ID = score.ORG_ID AND org.DEL_FLAG = '0'
</when>
</choose>
</if>
WHERE WHERE
del_flag = '0' score.del_flag = '0'
AND org_id = #{orgId} AND score.org_id = #{orgId}
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
AND customer_id = #{customerId} AND score.customer_id = #{customerId}
</if> </if>
<if test="orgType != null and orgType != '' "> <if test="orgType != null and orgType != '' ">
AND org_type = #{orgType} AND score.org_type = #{orgType}
</if> </if>
AND month_id = #{monthId} AND score.month_id = #{monthId}
</select> </select>
<select id="selectRankList" resultType="com.epmet.evaluationindex.screen.dto.result.IndexAdvanceBranchRankResultDTO"> <select id="selectRankList" resultType="com.epmet.evaluationindex.screen.dto.result.IndexAdvanceBranchRankResultDTO">

Loading…
Cancel
Save