From bdfc40f1089a07b8bac576cf0e7246351a332a54 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 4 Nov 2020 18:14:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IndexCollCommunityServiceImpl.java | 10 ++--- .../impl/IndexCollDistrictServiceImpl.java | 12 +++--- .../impl/IndexCollStreetServiceImpl.java | 12 +++--- .../impl/IndexOriginExtractServiceImpl.java | 6 +-- .../FactOriginProjectLogDailyService.java | 12 +++--- .../FactOriginProjectLogDailyServiceImpl.java | 41 +++++++++---------- 6 files changed, 46 insertions(+), 47 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java index 062990b4ed..13a3103e83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java @@ -135,14 +135,14 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService } - List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); + List agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); //办结数 - Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); + Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId()); //办结率 - Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); + Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); - list.forEach(entity ->{ + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + list.forEach(entity -> { //办结数 entity.setClosedProjectCount(Optional.ofNullable(agencyHandleCount.get(entity.getAgencyId())).orElse(NumConstant.ZERO)); //办结率 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java index aeaa04000c..494f8f51c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java @@ -128,16 +128,16 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { })); } - List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); + List agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); //办结数 - Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); + Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId()); //办结率 - Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); + Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); - list.forEach(entity ->{ + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + list.forEach(entity -> { //办结数 - entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); + entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null ? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); //办结率 entity.setClosedProjectRatio(Optional.ofNullable(handlingRatioMap.get(entity.getAgencyId())).orElse(BigDecimal.ZERO)); //办结效率 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java index 8331905d41..4d21057556 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java @@ -126,16 +126,16 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { })); } - List agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); + List agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); //办结数 - Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); + Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId()); //办结率 - Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); + Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); - list.forEach(entity ->{ + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + list.forEach(entity -> { //办结数 - entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); + entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null ? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); //办结率 entity.setClosedProjectRatio(Optional.ofNullable(handlingRatioMap.get(entity.getAgencyId())).orElse(BigDecimal.ZERO)); //办结效率 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java index 77ac5f2fc7..80e087bc3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java @@ -2,11 +2,9 @@ package com.epmet.service.evaluationindex.extract.dataToIndex.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.extract.form.ExtractIndexFormDTO; import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.stats.DimCustomerService; -import com.epmet.util.DimIdGenerator; import com.google.common.util.concurrent.ThreadFactoryBuilder; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -16,7 +14,6 @@ import org.springframework.util.CollectionUtils; import java.time.LocalDate; import java.util.ArrayList; -import java.util.Date; import java.util.List; import java.util.concurrent.*; @@ -107,16 +104,19 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService log.error("抽取【网格服务能力数据】发生异常,参数:" + JSON.toJSONString(param), e); } try{ + //dimAgency indexCollStreetService.saveStreetAbility(customerId, monthId); }catch (Exception e){ log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); } try{ + //dimAgency indexCollCommunityService.saveCommunityAbility(customerId, monthId); }catch (Exception e){ log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); } try{ + //dimAgency indexCollDistrictService.saveDistrictAbility(customerId, monthId); }catch (Exception e){ log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java index d473e0aabe..2a3c3ab304 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java @@ -168,13 +168,13 @@ public interface FactOriginProjectLogDailyService extends BaseService getDepTransferCount(String customerId, String monthId, String level); /** - * @Description 查询各机关办结(办结的含义指每个项目的结点中最高的机关)了多少项目 * @param agencies * @return + * @Description 查询各机关办结(办结的含义指每个项目的结点中最高的机关)了多少项目 * @author wangc * @date 2020.09.20 23:46 **/ - Map getProjectHandledAgency(List agencies, String customerId, String dimId,String dateType); + Map getProjectHandledAgency(List agencies, String customerId, String dimId); /** * @Description 办结率 @@ -184,8 +184,8 @@ public interface FactOriginProjectLogDailyService extends BaseService getHandlingRatio(List agencies, String customerId,String dimId,String dateType); + **/ + Map getHandlingRatio(List agencies, String customerId, String dimId); /** * @Description 计算机关办结项目效率 @@ -193,8 +193,8 @@ public interface FactOriginProjectLogDailyService extends BaseService getAgencyWorkPieceRatio( String customerId,String dimId,String dateType); + **/ + Map getAgencyWorkPieceRatio(String customerId, String dimId); /** * 网格项目响应度 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index ec1429618d..7b3f127cd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -38,7 +38,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.naming.LinkLoopException; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; @@ -171,43 +170,43 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getProjectHandledAgency(List agencies, String customerId,String dimId, String dateType) { + public Map getProjectHandledAgency(List agencies, String customerId, String dimId) { Map result = new HashMap<>(); - List countList = baseDao.selectAgencyHandledProjectCount(agencies,customerId,dimId); - if(!CollectionUtils.isEmpty(countList)){ - result = countList.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId,ProjectParticipatedAgencyResultDTO::getCount)); + List countList = baseDao.selectAgencyHandledProjectCount(agencies, customerId, dimId); + if (!CollectionUtils.isEmpty(countList)) { + result = countList.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId, ProjectParticipatedAgencyResultDTO::getCount)); } return result; } /** - * @Description 办结率 * @param agencies * @param dimId * @param dateType - 日期维度类型 month date week quarter year * @return + * @Description 办结率 * @author wangc * @date 2020.09.23 10:06 **/ @Override - public Map getHandlingRatio(List agencies, String customerId,String dimId, String dateType) { + public Map getHandlingRatio(List agencies, String customerId, String dimId) { //计算方式:“评价周期内被吹哨且办结(无论是哪一级办结)的项目数”/“评价周期内被吹哨的所有项目数” - Map result = new HashMap<>(); - List projectAgencyCount = baseDao.selectWhistledAgencyClosedProjectCount(agencies,customerId,dimId); - if(!CollectionUtils.isEmpty(projectAgencyCount)){ - Map whistledAndHandledProjectTotalMap = projectAgencyCount.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId,ProjectParticipatedAgencyResultDTO::getCount)); - List whistledProjectTotal = baseDao.selectAgencyWhistledCount(agencies,customerId,dimId); - Map whistledProjectTotalMap = whistledProjectTotal.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId,ProjectParticipatedAgencyResultDTO::getCount)); - whistledAndHandledProjectTotalMap.forEach((agencyId,count) -> { + Map result = new HashMap<>(); + List projectAgencyCount = baseDao.selectWhistledAgencyClosedProjectCount(agencies, customerId, dimId); + if (!CollectionUtils.isEmpty(projectAgencyCount)) { + Map whistledAndHandledProjectTotalMap = projectAgencyCount.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId, ProjectParticipatedAgencyResultDTO::getCount)); + List whistledProjectTotal = baseDao.selectAgencyWhistledCount(agencies, customerId, dimId); + Map whistledProjectTotalMap = whistledProjectTotal.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getAgencyId, ProjectParticipatedAgencyResultDTO::getCount)); + whistledAndHandledProjectTotalMap.forEach((agencyId, count) -> { //分母 被吹哨项目数 Integer denominator = whistledProjectTotalMap.get(agencyId); if(null == denominator || NumConstant.ZERO == denominator){ @@ -222,22 +221,22 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getAgencyWorkPieceRatio(String customerId,String dimId, String dateType) { + public Map getAgencyWorkPieceRatio(String customerId, String dimId) { //计算方法 : 评价周期内办结项目的平均处理时长的倒数 //1.评价周期内结案了的项目 - List projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId,dimId); - Map efficiencyMap = new HashMap<>(); - if(!CollectionUtils.isEmpty(projectsHandledByAgency)){ - Map> agencyProjectsMap = new HashMap<>(); + List projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, dimId); + Map efficiencyMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(projectsHandledByAgency)) { + Map> agencyProjectsMap = new HashMap<>(); projectsHandledByAgency.forEach(o -> { String agencyId = o.getAgencyId(); From a28bcd4add42600308aabb57f64bbfdd55671a5d Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 6 Nov 2020 15:04:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E5=A0=B5=E7=82=B9=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20=E5=A6=82=E6=9E=9C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=B8=BAgrid=20=E5=88=99=E6=9F=A5=E8=AF=A2or?= =?UTF-8?q?gId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/dto/form/DifficultyRankFormDTO.java | 7 ++++++- .../main/resources/mapper/project/ProjectDao.xml | 15 +++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java index d043180705..5a3936db6a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java @@ -26,7 +26,7 @@ public class DifficultyRankFormDTO implements Serializable { /** * 排序类型 耗时最长:timelongest;涉及部门最多:mostdepts;处理次数:mosthandled */ - @NotBlank(message = "排序类型不能为空",groups = {DifficultyRankInternalGroup.class}) + @NotBlank(message = "排序类型不能为空", groups = {DifficultyRankInternalGroup.class}) private String type; /** * 获取数据个数 默认前10 @@ -35,4 +35,9 @@ public class DifficultyRankFormDTO implements Serializable { @Min(value = 1, groups = {DifficultyRankInternalGroup.class}) private Integer pageNo; + + /** + * 组织类型: 网格:grid ; 组织:agency + */ + private String orgType; } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml index 8e5bace8d8..6369d52db7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -249,10 +249,17 @@ screen_difficulty_data diff WHERE diff.DEL_FLAG = '0' - AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') - - AND diff.EVENT_STATUS_CODE = #{status} - + + + AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR} + + + AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') + + + + AND diff.EVENT_STATUS_CODE = #{status} + ORDER BY CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT From 63af3a1a67c429ca977315f6d153df1356e71805 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 6 Nov 2020 15:08:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=88=E5=80=BC=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/project/ProjectDao.java | 12 +++++- ...srootsGovernDataAbsorptionServiceImpl.java | 8 +++- .../epmet/service/project/ProjectService.java | 11 +++++ .../project/impl/ProjectServiceImpl.java | 20 ++++++++- .../resources/mapper/project/ProjectDao.xml | 41 +++++++++++++++++++ 5 files changed, 88 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java index df6da92b0b..2e15e2aea1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -21,7 +21,6 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; -import com.epmet.dto.project.ProjectInfoDTO; import com.epmet.entity.project.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -103,4 +102,15 @@ public interface ProjectDao extends BaseDao { * @return java.lang.String */ String selectParameterValueByKey(@Param("customerId") String customerId); + + /** + * @Description 得到超过阈值滞留的项目Id集合 + * 规定只要项目的任何一个负责人(被流转到的,自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点 + * @param customerId + * @param exclude + * @return java.util.List + * @author wangc + * @date 2020.11.06 14:14 + */ + List selectOvertimeProjectIds(@Param("customerId") String customerId,@Param("exclude") List exclude,@Param("value") Integer value); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index b5e717f713..d791fb239e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -17,6 +17,7 @@ import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; import com.epmet.service.org.CustomerGridService; import com.epmet.service.point.UserPointService; import com.epmet.service.project.ProjectProcessService; +import com.epmet.service.project.ProjectService; import com.epmet.service.topic.TopicService; import com.epmet.service.user.UserService; import lombok.extern.slf4j.Slf4j; @@ -62,6 +63,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr private ProjectProcessService projectProcessService; @Autowired private TopicService topicService; + @Autowired + private ProjectService projectService; /** * @Description 用户积分、党员分值数据中转站 * @param param @@ -135,8 +138,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr @Override public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) { + //查询难点赌点中有无已结案的项目,若有则保留 + List existed = screenDifficultyDataService.selectExistedInfo(param.getCustomerId()); + //查询数据 - List difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),screenDifficultyDataService.selectExistedInfo(param.getCustomerId())); + List difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed)); if(CollectionUtils.isEmpty(difficulties)) return; List projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); //最近一次操作 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index 0b0692ba21..e707c0a64c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -99,4 +99,15 @@ public interface ProjectService extends BaseService { * @return java.lang.String */ String getParameterValueByKey(String customerId); + + /** + * @Description 得到超过阈值滞留的项目Id集合 + * 规定只要项目的任何一个负责人(被流转到的,自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点 + * @param customerId + * @param exclude + * @return java.util.List + * @author wangc + * @date 2020.11.06 14:14 + */ + List getOvertimeProjectByParameter(String customerId,List exclude); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index fa22e2090e..23461db970 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -19,15 +19,15 @@ package com.epmet.service.project.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.project.ProjectDao; import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; -import com.epmet.dto.project.ProjectInfoDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.service.project.ProjectService; -import org.springframework.beans.factory.annotation.Autowired; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import java.util.List; @@ -82,4 +82,20 @@ public class ProjectServiceImpl extends BaseServiceImpl + * @author wangc + * @date 2020.11.06 14:14 + */ + @Override + public List getOvertimeProjectByParameter(String customerId, List exclude) { + String parameter = baseDao.selectParameterValueByKey(customerId); + if(StringUtils.isBlank(parameter)) parameter = baseDao.selectParameterValueByKey("default"); + return baseDao.selectOvertimeProjectIds(customerId, exclude, StringUtils.isBlank(parameter) ? NumConstant.FIVE : Integer.parseInt(parameter)); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index 08c8d78d5b..6369800a70 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -106,4 +106,45 @@ and PARAMETER_KEY ='detention_days' + + \ No newline at end of file From 27b90866d74a985ddf700bf409cbd7cd8ddf2ee3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 6 Nov 2020 15:22:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=80=97=E6=97=B6=20=E5=90=91=E4=B8=8B?= =?UTF-8?q?=E5=8F=96=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/project/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml index 6369d52db7..2b9fba6e2d 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -242,7 +242,7 @@ diff.EVENT_STATUS_CODE AS statusCode, diff.EVENT_SOURCE AS gridName, diff.EVENT_IMG_URL AS imgUrl, - ROUND(diff.EVENT_COST_TIME/60,0) AS totalHours, + floor(diff.EVENT_COST_TIME/60) AS totalHours, diff.EVENT_RE_ORG AS reOrg, diff.EVENT_HANDLED_COUNT AS handledCount FROM