Browse Source

Merge remote-tracking branch 'remotes/origin/dev_third_data' into dev_temp

dev_shibei_match
jianjun 4 years ago
parent
commit
b1c42d3bbe
  1. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java
  2. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
  4. 18
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
  5. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
  6. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java

@ -264,13 +264,13 @@ public class IndexExplainServiceImpl implements IndexExplainService {
List<String> threlodList = new ArrayList<>();
indexGroupDetailEntities.forEach(index -> {
IndexScoreDetailResult table = new IndexScoreDetailResult();
if (OrgLevelEnum.GRID.equals(orgLevel) && IndexConstant.ZI_SHEN.equals(type) && index.getAllIndexCodePath().contains(IndexConstant.XIA_JI)) {
if (OrgLevelEnum.GRID.getCode().equals(orgLevel) && IndexConstant.ZI_SHEN.equals(type) && index.getAllIndexCodePath().contains(IndexConstant.XIA_JI)) {
return;
}
if (OrgLevelEnum.DISTRICT.equals(orgLevel) && !index.getAllIndexCodePath().contains(type) && !index.getAllIndexCodePath().contains(IndexConstant.ZHI_LI_NENG_LI)) {
if (OrgLevelEnum.DISTRICT.getCode().equals(orgLevel) && !index.getAllIndexCodePath().contains(type) && !index.getAllIndexCodePath().contains(IndexConstant.ZHI_LI_NENG_LI)) {
return;
}
if (!OrgLevelEnum.GRID.equals(orgLevel) && !OrgLevelEnum.DISTRICT.equals(orgLevel) && !index.getAllIndexCodePath().contains(type)) {
if (!OrgLevelEnum.GRID.getCode().equals(orgLevel) && !OrgLevelEnum.DISTRICT.getCode().equals(orgLevel) && !index.getAllIndexCodePath().contains(type)) {
return;
}
table.setIndexCode(index.getIndexCode());

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java

@ -477,4 +477,14 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
*/
List<OrgStatisticsResultDTO> selectAgencyClosedProjectCount(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param(
"closedStatus") String closedStatus, @Param("origin") String origin);
/**
* 组织结案项目统计
* @author zhaoqifeng
* @date 2021/5/27 14:51
* @param customerId
* @param dateId
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> selectAgencyClosedProjectStaticDaily(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java

@ -448,4 +448,14 @@ public interface FactOriginProjectMainDailyService extends BaseService<FactOrigi
* @return java.util.Map<java.lang.String,com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
Map<String, OrgStatisticsResultDTO> getAgencyClosedProjectCount(String customerId, String dateId, String closedStatus, String origin);
/**
* 组织结案项目统计
* @author zhaoqifeng
* @date 2021/5/27 14:56
* @param customerId
* @param dateId
* @return java.util.Map<java.lang.String,java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>>
*/
Map<String, List<OrgStatisticsResultDTO>> getAgencyClosedProjectStatic(String customerId, String dateId);
}

18
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java

@ -678,5 +678,23 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
return list.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
}
/**
* 组织结案项目统计
*
* @param customerId
* @param dateId
* @return java.util.Map<java.lang.String, java.util.List < com.epmet.dto.extract.result.OrgStatisticsResultDTO>>
* @author zhaoqifeng
* @date 2021/5/27 14:56
*/
@Override
public Map<String, List<OrgStatisticsResultDTO>> getAgencyClosedProjectStatic(String customerId, String dateId) {
List<OrgStatisticsResultDTO> list = baseDao.selectAgencyClosedProjectStaticDaily(customerId, dateId);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.groupingBy(OrgStatisticsResultDTO::getAgencyId));
}
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java

@ -407,7 +407,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
}));
}
//自制率 自治项目数/办结项目数
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProject(customerId, dateId, OrgTypeConstant.COMMUNITY);
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProjectDaily(customerId, dateId, OrgTypeConstant.COMMUNITY);
if (CollectionUtils.isNotEmpty(selfList)) {
list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> {
if (dto.getSum() != NumConstant.ZERO) {
@ -480,7 +480,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
}));
}
//自制率 自治项目数/办结项目数
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProject(customerId, dateId, OrgTypeConstant.STREET);
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProjectDaily(customerId, dateId, OrgTypeConstant.STREET);
if (CollectionUtils.isNotEmpty(selfList)) {
list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> {
if (dto.getSum() != NumConstant.ZERO) {
@ -553,7 +553,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
}));
}
//自制率 自治项目数/办结项目数
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProject(customerId, dateId, OrgTypeConstant.DISTRICT);
List<OrgStatisticsResultDTO> selfList = factOriginProjectMainDailyService.getSelfProjectDaily(customerId, dateId, OrgTypeConstant.DISTRICT);
if (CollectionUtils.isNotEmpty(selfList)) {
list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> {
if (dto.getSum() != NumConstant.ZERO) {

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

@ -963,4 +963,23 @@
</if>
GROUP BY AGENCY_ID
</select>
<select id="selectAgencyClosedProjectStaticDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT
a.AGENCY_ID,
c.`LEVEL`,
COUNT(a.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'
GROUP BY
a.AGENCY_ID,
c.`LEVEL`
</select>
</mapper>

Loading…
Cancel
Save