From ae6a7670aa11be856e9e845b7125d975997709cb Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 13 Oct 2020 13:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=9F=E8=AE=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/project/FinishOrgDTO.java | 3 +++ .../todata/impl/ProjectExtractServiceImpl.java | 16 ++++++++++++---- .../extract/FactOriginProjectMainDailyDao.xml | 12 ++++++------ .../mapper/project/ProjectProcessDao.xml | 9 ++++++--- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/FinishOrgDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/FinishOrgDTO.java index ab5c9ef2ce..9f1b3b3d36 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/FinishOrgDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/FinishOrgDTO.java @@ -13,6 +13,9 @@ import java.io.Serializable; public class FinishOrgDTO implements Serializable { private static final long serialVersionUID = -5684606755705833962L; + + private String departmentId; + private String gridId; private String projectId; private String orgIdPath; private String pIdPath; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index bf892c6a84..2b4abe37a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -88,7 +88,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); entity.setId(process.getProjectId()); - entity.setProjectStatus("close"); + entity.setProjectStatus("closed"); entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); entity.setUpdatedTime(process.getUpdatedTime()); entity.setIsResolved(process.getIsResolved()); @@ -98,11 +98,18 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { if (!CollectionUtils.isEmpty(finishOrgList)) { closeProjects.forEach(close -> finishOrgList.stream().filter(finish -> close.getId().equals(finish.getProjectId())).forEach(dto -> { String[] orgIds = dto.getPIdPath().split(StrConstant.COLON); + String org = ""; if (orgIds.length > NumConstant.ONE) { - close.setFinishOrgIds(orgIds[orgIds.length - 1]); + org = orgIds[orgIds.length - 1]; } else { - close.setFinishOrgIds(orgIds[0]); + org = orgIds[0]; } + if (StringUtils.isNotEmpty(dto.getGridId())) { + org = org + StrConstant.COLON + dto.getGridId(); + } else if (StringUtils.isNotEmpty(dto.getDepartmentId())) { + org = org + StrConstant.COLON + dto.getDepartmentId(); + } + close.setFinishOrgIds(org); })); } //更新状态 @@ -180,7 +187,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } } final List mainList = list; - //节点发起人 + //节点发起人 部门流转退回结案 List processList = projectProcessService.getProcessListByCustomer(customerId, dateString); if (!CollectionUtils.isEmpty(processList)) { List logList = processList.stream().map(process -> { @@ -230,6 +237,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList()); + //节点发起人 响应 List responseList = projectProcessService.getResponseProcessList(customerId, dateString); if (!CollectionUtils.isEmpty(responseList)) { logList.addAll(responseList.stream().map(process -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index 6e3e0c5628..2b64effbfd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -61,7 +61,7 @@ INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID AND da.`LEVEL` = 'community' WHERE - f.PROJECT_STATUS = 'closed' + f.PROJECT_STATUS = 'close' AND f.MONTH_ID = #{monthId} AND f.CUSTOMER_ID = #{customerId} GROUP BY @@ -79,7 +79,7 @@ AND da.`LEVEL` = 'community' WHERE f.IS_OVERDUE = 1 - AND f.PROJECT_STATUS = 'closed' + AND f.PROJECT_STATUS = 'close' AND f.MONTH_ID = #{monthId} AND f.CUSTOMER_ID = #{customerId} GROUP BY @@ -234,7 +234,7 @@ INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID AND da.`LEVEL` = #{level} WHERE - fm.PROJECT_STATUS = 'closed' + fm.PROJECT_STATUS = 'close' AND fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} GROUP BY @@ -248,7 +248,7 @@ INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID AND da.`LEVEL` = #{level} WHERE - fm.PROJECT_STATUS = 'closed' + fm.PROJECT_STATUS = 'close' AND fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} AND fm.IS_RESOLVED = 'resolved' @@ -268,7 +268,7 @@ FROM fact_origin_project_main_daily fm WHERE - fm.PROJECT_STATUS = 'closed' + fm.PROJECT_STATUS = 'close' AND fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} GROUP BY @@ -280,7 +280,7 @@ FROM fact_origin_project_main_daily fm WHERE - fm.PROJECT_STATUS = 'closed' + fm.PROJECT_STATUS = 'close' AND fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} AND fm.IS_RESOLVED = 'resolved' diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index 3e0b92ed5b..8d36696ccb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -20,7 +20,7 @@ ORDER BY pro.project_id,pro.CREATED_TIME ASC