From 36beefe80505fbbb60b84f02af5e908e6996dd12 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 26 Mar 2021 09:13:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenProjectSettleServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index 590f8c3df6..dfb64dfc01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -69,7 +69,9 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic */ @Override public void extractScreenData(ScreenCentralZoneDataFormDTO param) { + //screen_project_data表是否存在此客户数据 int rows = targetDbService.checkIfExisted(param.getCustomerId()); + //查找客户项目超期参数 List exceedParams = projectService.getProjectExceedParams(param.getCustomerId()); Integer exceedLimit = NumConstant.FIVE; Integer about2ExceedLimit = NumConstant.FIVE; @@ -92,6 +94,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic originMainService.initNewScreenProjectData(param.getCustomerId(), rows , param.getDateId(),exceedLimit,about2ExceedLimit); if(!CollectionUtils.isEmpty(metaData)) { + // 查询项目信息 List info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); if(!CollectionUtils.isEmpty(info)){ metaData = metaData.stream().flatMap(meta -> info.stream().filter(nature -> StringUtils.equals(meta.getProjectId(), From cc3e9d5586de8af112fda7e014d10e746baf9528 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 26 Mar 2021 17:18:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d8db277ec4..39501e53b4 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 @@ -78,6 +78,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //2.查询出客户下网格的相关信息 List gridList = customerGridService.queryGridInfoList(param.getCustomerId()); + // list 转 map,以gridId为key,a = gridList,作为value,(o,n)->o 是遇到相同的gridId舍弃,(o,n)->n 是覆盖原来的gridId Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); //3.查询出客户下用户的累计积分(累计值,没有时间概念,否则需要查询积分明细计算出评价周期末的得分) @@ -96,7 +97,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr } } final String finalDateId = dateId; - + // 查询党员积分 Map scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId); //剔除垃圾数据 From 8d00219d0349f33f9470b7f7cfdd793c69e1c939 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 29 Mar 2021 10:21:19 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/impl/ScreenCentralZoneDataExtractServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java index 99c45d2f95..feceadf83d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java @@ -67,6 +67,7 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon List result = factRegUserGridDailyDao.selectUserAndPartymemberByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(result)){ + // 根据dateId查询为空,先根据当前时间-1天是否和dateId相等,相等的话,查询往前推2天的数据 if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ result = factRegUserGridDailyDao.selectUserAndPartymemberByOrgLevel(ORG_LEVEL_AGENCY,customerId,DateUtils.getBeforeNDay(NumConstant.TWO)); } From 77aeed3fbc6fc6904cdd9571aa7a61a47b44fd76 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 29 Mar 2021 13:29:26 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/FactOriginExtractServiceImpl.java | 2 +- .../todata/impl/FactOriginProjectLogDailyServiceImpl.java | 5 ++--- .../extract/todata/impl/ProjectExtractServiceImpl.java | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java index f44eef01de..089be0c513 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java @@ -198,7 +198,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { try { projectExtractService.extractProjectPeriodData(paramNew); } catch (Exception e) { - log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + log.error("抽取【项目耗时数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } } else { try { 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 641b7efa03..b710d08af5 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 @@ -30,7 +30,6 @@ import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; import com.epmet.dto.extract.result.*; -import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import org.apache.commons.lang3.StringUtils; @@ -236,6 +235,7 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, dimId); Map efficiencyMap = new HashMap<>(); + List projects = new LinkedList<>(); if (!CollectionUtils.isEmpty(projectsHandledByAgency)) { Map> agencyProjectsMap = new HashMap<>(); @@ -249,10 +249,9 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl projects = new LinkedList<>(); - agencyProjectsMap.forEach((key,value) -> {projects.addAll(value);}); //2.结案项目的总耗时 List costTimes = baseDao.selectProjectCostTime(projects); 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 cbbaee19c9..8f1985b6be 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 @@ -104,6 +104,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { closeProjects.forEach(close -> finishOrgList.stream().filter(finish -> close.getId().equals(finish.getProjectId())).forEach(dto -> { String[] orgIds = dto.getPIdPath().split(StrConstant.COLON); String org = ""; + //取最短的ordIds中最后一个 则为最高级的那个orgIds if (orgIds.length > NumConstant.ONE) { org = orgIds[orgIds.length - 1]; } else {