Browse Source

查询下级等级指标分数关联组织

dev_shibei_match
jianjun 4 years ago
parent
commit
49c461ecee
  1. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  2. 44
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -116,10 +116,10 @@ public class GovProjectServiceImpl implements GovProjectService {
List<ProjectDistributionResultDTO> resultDTOList = new ArrayList<>(); List<ProjectDistributionResultDTO> resultDTOList = new ArrayList<>();
List<IssueInfoDTO> issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId(),formDTO.getPageNo(),formDTO.getPageSize()); List<IssueInfoDTO> issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId(),formDTO.getPageNo(),formDTO.getPageSize());
if (CollectionUtils.isNotEmpty(issueInfoDTOList)) { if (CollectionUtils.isNotEmpty(issueInfoDTOList)) {
List<String> topicIds = issueInfoDTOList.stream().map(data -> data.getTopicId()).collect(Collectors.toList()); List<String> topicIds = issueInfoDTOList.stream().map(IssueInfoDTO::getTopicId).collect(Collectors.toList());
// log.info("话题id集合:" + JSON.toJSONString(topicIds, true)); // log.info("话题id集合:" + JSON.toJSONString(topicIds, true));
List<ResiTopicDTO> topicInfoDTOList = resiGroupService.selectTopicInfoByIds(topicIds); List<ResiTopicDTO> topicInfoDTOList = resiGroupService.selectTopicInfoByIds(topicIds);
List<String> issueIds = issueInfoDTOList.stream().map(data -> data.getIssueId()).collect(Collectors.toList()); List<String> issueIds = issueInfoDTOList.stream().map(IssueInfoDTO::getIssueId).collect(Collectors.toList());
// log.info("议题id集合:" + JSON.toJSONString(issueIds, true)); // log.info("议题id集合:" + JSON.toJSONString(issueIds, true));
resultDTOList = projectDao.selectList(formDTO.getCustomerId(),issueIds); resultDTOList = projectDao.selectList(formDTO.getCustomerId(),issueIds);
for (ProjectDistributionResultDTO project : resultDTOList) { for (ProjectDistributionResultDTO project : resultDTOList) {

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

@ -230,46 +230,60 @@
<select id="getSingleIndexRank" resultType="com.epmet.evaluationindex.screen.dto.result.PeerComparisonResultDTO"> <select id="getSingleIndexRank" resultType="com.epmet.evaluationindex.screen.dto.result.PeerComparisonResultDTO">
SELECT SELECT
ORG_ID, score.ORG_ID,
ORG_NAME, score.ORG_NAME,
<choose> <choose>
<when test="indexCode == 'dangjiannengli'"> <when test="indexCode == 'dangjiannengli'">
round(party_dev_ablity,1) as score round(score.party_dev_ablity,1) as score
</when> </when>
<when test="indexCode == 'zhilinengli'"> <when test="indexCode == 'zhilinengli'">
round(govern_ablity,1) as score round(score.govern_ablity,1) as score
</when> </when>
<when test="indexCode == 'fuwunengli'"> <when test="indexCode == 'fuwunengli'">
round(service_ablity,1) as score round(score.service_ablity,1) as score
</when> </when>
</choose> </choose>
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'
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND score.CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</if> </if>
AND PARENT_ID = #{agencyId,jdbcType=VARCHAR} AND score.PARENT_ID = #{agencyId,jdbcType=VARCHAR}
AND MONTH_ID = #{monthId,jdbcType=VARCHAR} AND score.MONTH_ID = #{monthId,jdbcType=VARCHAR}
<choose> <choose>
<when test="orgType != null and orgType != ''"> <when test="orgType != null and orgType != ''">
AND ORG_TYPE = #{orgType,jdbcType=VARCHAR} AND score.ORG_TYPE = #{orgType,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
AND ORG_TYPE != 'department' AND score.ORG_TYPE != 'department'
</otherwise> </otherwise>
</choose> </choose>
ORDER BY ORDER BY
<choose> <choose>
<when test="indexCode == 'dangjiannengli'"> <when test="indexCode == 'dangjiannengli'">
party_dev_ablity score.party_dev_ablity
</when> </when>
<when test="indexCode == 'zhilinengli'"> <when test="indexCode == 'zhilinengli'">
govern_ablity score.govern_ablity
</when> </when>
<when test="indexCode == 'fuwunengli'"> <when test="indexCode == 'fuwunengli'">
service_ablity score.service_ablity
</when> </when>
</choose> </choose>
${sort} ${sort}

Loading…
Cancel
Save