Browse Source

数据统计程序优化

dev_shibei_match
sunyuchao 5 years ago
parent
commit
a856b92e42
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
  4. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  5. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java

@ -56,12 +56,12 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
List<IssueAgencyDTO> selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* @param customerId
* @param issueEntity
* @return
* @Author sun
* @Description 根据客户Id查询议题库已转项目的网格项目关系数据
**/
List<IssueEntity> selectGridProjectList(@Param("customerId") String customerId);
List<IssueEntity> selectGridProjectList(IssueEntity issueEntity);
/**
* 获取当前日期网格下议题统计结果
*

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java

@ -54,12 +54,12 @@ public interface IssueService {
List<IssueAgencyDTO> getAgencyClosedIssueInc(String customerId, String date);
/**
* @param customerId
* @param issueEntity
* @return
* @Author sun
* @Description 根据客户Id查询议题库已转项目的网格项目关系数据
**/
List<IssueEntity> getGridProjectList(String customerId);
List<IssueEntity> getGridProjectList(IssueEntity issueEntity);
/**
* 获取以网格为单位议题统计结果

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java

@ -66,14 +66,14 @@ public class IssueServiceImpl implements IssueService {
}
/**
* @param customerId
* @param issueEntity
* @return
* @Author sun
* @Description 根据客户Id查询议题库已转项目的网格项目关系数据
**/
@Override
public List<IssueEntity> getGridProjectList(String customerId) {
return statsIssueDao.selectGridProjectList(customerId);
public List<IssueEntity> getGridProjectList(IssueEntity issueEntity) {
return statsIssueDao.selectGridProjectList(issueEntity);
}
@Override

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -323,7 +323,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
monthlyEntity.setResolvedRatio(entity.getResolvedRatio());
monthlyEntity.setUnresolvedTotal(entity.getUnresolvedTotal());
monthlyEntity.setUnresolvedRatio(entity.getUnresolvedRatio());
monthlyEntity.setProjectIncr(pendingIncr + closedIncr);
monthlyEntity.setProjectIncr(pendingIncr);
monthlyEntity.setPendingIncr(pendingIncr);
monthlyEntity.setClosedIncr(closedIncr);
monthlyEntity.setResolvedIncr(resolvedIncr);
@ -440,7 +440,10 @@ public class StatsProjectServiceImpl implements StatsProjectService {
numberFormat.setMaximumFractionDigits(6);
//1:根据客户Id查询议题库已转项目的网格项目关系数据
List<IssueEntity> gridProjectList = issueService.getGridProjectList(customerId);
IssueEntity issueEntity = new IssueEntity();
issueEntity.setCustomerId(customerId);
issueEntity.setCreatedTime(date);
List<IssueEntity> gridProjectList = issueService.getGridProjectList(issueEntity);
//2:遍历网格维度数据,统计每个网格各项指标数据
for (DimGridEntity grid : dimGridList) {
@ -616,7 +619,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
monthlyEntity.setResolvedRatio(entity.getResolvedRatio());
monthlyEntity.setUnresolvedTotal(entity.getUnresolvedTotal());
monthlyEntity.setUnresolvedRatio(entity.getUnresolvedRatio());
monthlyEntity.setProjectIncr(pendingIncr + closedIncr);
monthlyEntity.setProjectIncr(pendingIncr);
monthlyEntity.setPendingIncr(pendingIncr);
monthlyEntity.setClosedIncr(closedIncr);
monthlyEntity.setResolvedIncr(resolvedIncr);

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml

@ -179,6 +179,7 @@
i.del_flag = '0'
AND ipr.del_flag = '0'
AND i.customer_id = #{customerId}
<![CDATA[AND DATE_FORMAT(ipr.created_time, "%Y-%m-%d") <= DATE_FORMAT(#{createdTime}, "%Y-%m-%d")]]>
</select>
</mapper>
Loading…
Cancel
Save