Browse Source

Merge branch 'dev_bugfix_ljj' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev

master
jianjun 4 years ago
parent
commit
459bad9116
  1. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  2. 40
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java

@ -232,7 +232,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
return new ArrayList<>(); return new ArrayList<>();
} }
for (CategoryTopAppealResultDTO r : result) { for (CategoryTopAppealResultDTO r : result) {
CustomerProjectCategoryDTO projectCategoryDTO = screenProjectCategoryOrgDailyDao.selectProjectCategory(r.getCategoryId(), r.getCategoryOriginCustomerId()); CustomerProjectCategoryDTO projectCategoryDTO = screenProjectCategoryOrgDailyDao.selectProjectCategory(r.getCategoryId(), customerId);
if (null == projectCategoryDTO || StringUtils.isBlank(projectCategoryDTO.getCategoryName())) { if (null == projectCategoryDTO || StringUtils.isBlank(projectCategoryDTO.getCategoryName())) {
log.warn(String.format("查询分类名称失败,当前客户:%s, categoryCode:%s", r.getCategoryId(), r.getCategoryOriginCustomerId())); log.warn(String.format("查询分类名称失败,当前客户:%s, categoryCode:%s", r.getCategoryId(), r.getCategoryOriginCustomerId()));
continue; continue;

40
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -488,30 +488,32 @@
</select> </select>
<select id="selectGridClosed" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectGridClosed" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT
a.ORG_ID, a.GRID_ID AS "orgId",
a.count AS "sum", a.count AS "sum",
IFNULL( b.count, 0 ) AS "count" IFNULL( b.count, 0 ) AS "count"
FROM FROM
(SELECT ORG_ID, ( SELECT
COUNT(DISTINCT PROJECT_ID) AS "count" GRID_ID,
FROM fact_origin_project_log_daily COUNT( ID ) AS "count"
WHERE( ACTION_CODE = 'created' OR ACTION_CODE = 'transfer') FROM
AND IS_ACTIVE = 0 fact_origin_project_main_daily
AND ORG_TYPE = 'grid' WHERE
AND CUSTOMER_ID = #{customerId} CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
GROUP BY ORG_ID) a AND GRID_ID != ''
GROUP BY GRID_ID ) a
LEFT JOIN LEFT JOIN
(SELECT fl.ORG_ID, ( SELECT
COUNT(DISTINCT fl.PROJECT_ID) AS "count" GRID_ID,
FROM fact_origin_project_log_daily fl COUNT( ID ) AS "count"
INNER JOIN fact_origin_project_main_daily fm ON fl.PROJECT_ID = fm.ID AND fm.PROJECT_STATUS = 'closed' FROM fact_origin_project_main_daily
WHERE( fl.ACTION_CODE = 'created' OR fl.ACTION_CODE = 'transfer') WHERE
AND fl.IS_ACTIVE = 0 PROJECT_STATUS = 'closed'
AND fl.ORG_TYPE = 'grid' AND CUSTOMER_ID = #{customerId}
AND fl.CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId}
AND fl.MONTH_ID = #{monthId} AND GRID_ID != ''
GROUP BY fl.ORG_ID) b ON a.ORG_ID = b.ORG_ID GROUP BY GRID_ID ) b
ON a.GRID_ID = b.GRID_ID
</select> </select>
<select id="selectNotReturn" resultType="com.epmet.dto.extract.result.TransferRightRatioResultDTO"> <select id="selectNotReturn" resultType="com.epmet.dto.extract.result.TransferRightRatioResultDTO">

Loading…
Cancel
Save