|
@ -5,9 +5,12 @@ import com.epmet.constant.ProjectConstant; |
|
|
import com.epmet.dto.project.form.MonthProjectListFormDTO; |
|
|
import com.epmet.dto.project.form.MonthProjectListFormDTO; |
|
|
import com.epmet.dto.stats.DimAgencyDTO; |
|
|
import com.epmet.dto.stats.DimAgencyDTO; |
|
|
import com.epmet.dto.stats.DimDateDTO; |
|
|
import com.epmet.dto.stats.DimDateDTO; |
|
|
|
|
|
import com.epmet.dto.stats.DimGridDTO; |
|
|
|
|
|
import com.epmet.entity.issue.IssueEntity; |
|
|
import com.epmet.entity.project.ProjectEntity; |
|
|
import com.epmet.entity.project.ProjectEntity; |
|
|
import com.epmet.entity.project.ProjectProcessEntity; |
|
|
import com.epmet.entity.project.ProjectProcessEntity; |
|
|
import com.epmet.entity.stats.DimDateEntity; |
|
|
import com.epmet.entity.stats.DimDateEntity; |
|
|
|
|
|
import com.epmet.entity.stats.DimGridEntity; |
|
|
import com.epmet.entity.stats.FactAgencyProjectDailyEntity; |
|
|
import com.epmet.entity.stats.FactAgencyProjectDailyEntity; |
|
|
import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; |
|
|
import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; |
|
|
import com.epmet.service.StatsProjectService; |
|
|
import com.epmet.service.StatsProjectService; |
|
@ -37,6 +40,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private DimAgencyService dimAgencyService; |
|
|
private DimAgencyService dimAgencyService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private DimGridService dimGridService; |
|
|
|
|
|
@Autowired |
|
|
private DimDateService dimDateService; |
|
|
private DimDateService dimDateService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private DimWeekService dimWeekService; |
|
|
private DimWeekService dimWeekService; |
|
@ -94,10 +99,13 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(yesterDay()); |
|
|
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(yesterDay()); |
|
|
|
|
|
|
|
|
//2:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的)
|
|
|
//2:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的)
|
|
|
List<ProjectEntity> projectList = projectService.getProjectList(customerId); |
|
|
ProjectEntity projectEntity = new ProjectEntity(); |
|
|
|
|
|
projectEntity.setCustomerId(customerId); |
|
|
|
|
|
projectEntity.setCreatedTime(yesterDay()); |
|
|
|
|
|
List<ProjectEntity> projectList = projectService.getProjectList(projectEntity); |
|
|
|
|
|
|
|
|
//3:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的)
|
|
|
//3:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的)
|
|
|
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(customerId); |
|
|
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity); |
|
|
|
|
|
|
|
|
//4:遍历统计每个机关各项指标数
|
|
|
//4:遍历统计每个机关各项指标数
|
|
|
//批量机关日统计新增对象
|
|
|
//批量机关日统计新增对象
|
|
@ -153,7 +161,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
AtomicInteger unResolvedIncr = new AtomicInteger(0); |
|
|
AtomicInteger unResolvedIncr = new AtomicInteger(0); |
|
|
//遍历项目进展列表数据,统计日增量数据
|
|
|
//遍历项目进展列表数据,统计日增量数据
|
|
|
processList.forEach(process -> { |
|
|
processList.forEach(process -> { |
|
|
if (date.equals(process.getCreatedTime())) { |
|
|
if (map.containsKey(process.getAgencyId()) && date.equals(process.getCreatedTime())) { |
|
|
if (ProjectConstant.CREATED.equals(process.getOperation())) { |
|
|
if (ProjectConstant.CREATED.equals(process.getOperation())) { |
|
|
pendingIncr.addAndGet(1); |
|
|
pendingIncr.addAndGet(1); |
|
|
} |
|
|
} |
|
@ -299,42 +307,54 @@ public class StatsProjectServiceImpl implements StatsProjectService { |
|
|
@Override |
|
|
@Override |
|
|
public void statsGridProject(String customerId) { |
|
|
public void statsGridProject(String customerId) { |
|
|
//1:根据客户Id查询网格维度表数据
|
|
|
//1:根据客户Id查询网格维度表数据
|
|
|
|
|
|
List<DimGridEntity> dimGridList = dimGridService.getGridListByCustomerId(customerId); |
|
|
|
|
|
|
|
|
if (true) { |
|
|
if (null != dimGridList && dimGridList.size() > NumConstant.ZERO) { |
|
|
//2:执行机关日数据统计
|
|
|
//2:执行机关日数据统计
|
|
|
gridDateProjectStats(customerId); |
|
|
gridDateProjectStats(customerId, dimGridList); |
|
|
|
|
|
|
|
|
//3:执行机关月数据统计
|
|
|
//3:执行机关月数据统计
|
|
|
if (Calendar.getInstance().get(Calendar.DATE) == 1) { |
|
|
if (Calendar.getInstance().get(Calendar.DATE) == 1) { |
|
|
gridMonthProjectStats(customerId); |
|
|
gridMonthProjectStats(customerId, dimGridList); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @return |
|
|
* @return |
|
|
* @Author sun |
|
|
* @Author sun |
|
|
* @Description 数据-项目-网格日统计 |
|
|
* @Description 数据-项目-网格日统计 |
|
|
**/ |
|
|
**/ |
|
|
private String gridDateProjectStats(String customerId){ |
|
|
private String gridDateProjectStats(String customerId, List<DimGridEntity> dimGridList) { |
|
|
//1:查询各维度表Id,方便使用
|
|
|
//1:查询各维度表Id,方便使用
|
|
|
//2:根据客户Id查询网格维度表数据
|
|
|
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(yesterDay()); |
|
|
//3:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的)
|
|
|
|
|
|
//4:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的)
|
|
|
//2:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的)
|
|
|
//5:根据客户Id查询议题表已转项目的网格项目关系数据
|
|
|
ProjectEntity projectEntity = new ProjectEntity(); |
|
|
//6:遍历统计每个网格各项指标数据
|
|
|
projectEntity.setCustomerId(customerId); |
|
|
//7:批量保存网格日统计数据
|
|
|
projectEntity.setCreatedTime(yesterDay()); |
|
|
//8:判断当前日期是否为当月首日,执行网格月数据统计
|
|
|
List<ProjectEntity> projectList = projectService.getProjectList(projectEntity); |
|
|
|
|
|
|
|
|
|
|
|
//3:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的)
|
|
|
|
|
|
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity); |
|
|
|
|
|
|
|
|
|
|
|
//4:根据客户Id查询议题表已转项目的网格项目关系数据
|
|
|
|
|
|
List<IssueEntity> gridProjectList = null; |
|
|
|
|
|
//5:遍历统计每个网格各项指标数据
|
|
|
|
|
|
//6:批量保存网格日统计数据
|
|
|
|
|
|
//7:判断当前日期是否为当月首日,执行网格月数据统计
|
|
|
|
|
|
|
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @return |
|
|
* @return |
|
|
* @Author sun |
|
|
* @Author sun |
|
|
* @Description 数据-项目-网格月统计 |
|
|
* @Description 数据-项目-网格月统计 |
|
|
**/ |
|
|
**/ |
|
|
private String gridMonthProjectStats(String customerId){ |
|
|
private String gridMonthProjectStats(String customerId, List<DimGridEntity> dimGridList) { |
|
|
|
|
|
|
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|