Browse Source

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

dev_shibei_match
jianjun 4 years ago
parent
commit
db2d03b10d
  1. 26
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  2. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
  3. 46
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

26
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -42,7 +42,8 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
private IndexCollCommunityService indexCollCommunityService;
@Autowired
private IndexCollDistrictService indexCollDistrictService;
@Autowired
private IndexCollDistrictDepartmentService indexCollDistrictDepartmentService;
/**
* desc从统计库对象抽取指标数据
*
@ -87,7 +88,7 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
threadPool.submit(() -> {
try {
long startCpc = System.currentTimeMillis();
calCpcIndexService.calCpcPartyAbility(customerId, monthId);
//calCpcIndexService.calCpcPartyAbility(customerId, monthId);
log.error("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCpc, param.getCustomerId());
} catch (Exception e) {
log.error("抽取【党员相关数据】发生异常,参数:" + JSON.toJSONString(param), e);
@ -117,6 +118,15 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
} catch (Exception e) {
log.error("抽取【网格服务能力数据】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startCommunity = System.currentTimeMillis();
indexCollCommunityService.saveCommunityAbility(customerId, monthId);
log.error("社区相关-三大能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCommunity, param.getCustomerId());
}catch (Exception e){
log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startStreet = System.currentTimeMillis();
@ -125,14 +135,18 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
}catch (Exception e){
log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startCommunity = System.currentTimeMillis();
indexCollCommunityService.saveCommunityAbility(customerId, monthId);
log.error("街道相关-三大能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCommunity, param.getCustomerId());
long startDept = System.currentTimeMillis();
indexCollDistrictDepartmentService.saveDepartmentAbility(customerId, monthId);
log.error("区直部门相关-治理能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startDept, param.getCustomerId());
}catch (Exception e){
log.error("抽取【区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
log.error("抽取【区直部门治理能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
//dimAgency
long startDistrict = System.currentTimeMillis();

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml

@ -167,13 +167,15 @@
<!-- 查询议题转项目总数 -->
<select id="selectIssueTotalShiftProject" resultType="com.epmet.dto.extract.form.GridIssueCountResultDTO">
SELECT
GRID_ID,
COUNT(ISSUE_ID) AS issueTotal
FROM fact_origin_issue_log_daily
WHERE DEL_FLAG = '0'
AND MONTH_ID = #{monthId}
AND CUSTOMER_ID = #{customerId}
AND ACTION_CODE = 'shift_project'
m.GRID_ID,
COUNT(m.ID) AS issueTotal
FROM
fact_origin_issue_main_daily m INNER JOIN
fact_origin_issue_log_daily l ON m.ID = l.ISSUE_ID
WHERE m.DEL_FLAG = '0'
AND m.MONTH_ID = #{monthId}
AND m.CUSTOMER_ID = #{customerId}
AND l.ACTION_CODE = 'shift_project'
GROUP BY GRID_ID
</select>
@ -376,4 +378,4 @@
GROUP BY
a.ID
</select>
</mapper>
</mapper>

46
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -979,35 +979,29 @@
</select>
<select id="selectAgencyClosedProjectStaticDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT
a.ID AS AGENCY_ID,
b.`LEVEL`,
COUNT( b.ID ) AS "sum",
SUM(
IF
( b.ORG_TYPE = 'department', 1, 0 )) AS "count"
FROM
dim_agency a
INNER JOIN (
SELECT
a.ID,
a.PIDS,
c.`LEVEL`,
b.ORG_TYPE
a.ID AS AGENCY_ID,
a.`LEVEL`,
COUNT( b.PROJECT_ID ) AS "sum",
SUM(IF( b.ORG_TYPE = 'department', 1, 0 )) AS "count"
FROM
fact_origin_project_main_daily a
INNER JOIN fact_origin_project_log_daily b ON a.ID = b.PROJECT_ID
AND b.ACTION_CODE = 'close'
INNER JOIN dim_agency c ON b.AGENCY_ID = c.ID
WHERE
a.CUSTOMER_ID = #{customerId}
AND a.DATE_ID &lt;= #{dateId}
AND a.PROJECT_STATUS = 'closed'
) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
dim_agency a
INNER JOIN (
SELECT
PROJECT_ID,
PIDS,
ORG_TYPE
FROM
fact_origin_project_log_daily
WHERE
CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
AND ACTION_CODE = 'close'
) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
WHERE
a.CUSTOMER_ID = #{customerId}
a.CUSTOMER_ID = #{customerId}
GROUP BY
a.ID,
b.`LEVEL`
a.ID,
a.`LEVEL`
</select>

Loading…
Cancel
Save