Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_318_wangc' into dev_temp

dev_shibei_match
jianjun 4 years ago
parent
commit
5a764820f0
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java
  2. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java
  3. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  5. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java
  6. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java

@ -199,7 +199,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);
}
try {
originProjectCategoryDailyService.extractProjectCategory(paramNew);

5
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<FactOr
//1.评价周期内结案了的项目
List<ProjectParticipatedAgencyResultDTO> projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, dimId);
Map<String, BigDecimal> efficiencyMap = new HashMap<>();
List<String> projects = new LinkedList<>();
if (!CollectionUtils.isEmpty(projectsHandledByAgency)) {
Map<String, List<String>> agencyProjectsMap = new HashMap<>();
@ -249,10 +249,9 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
}else{
agencyProjectsMap.get(agencyId).add(projectId);
}
projects.add(projectId);
});
List<String> projects = new LinkedList<>();
agencyProjectsMap.forEach((key,value) -> {projects.addAll(value);});
//2.结案项目的总耗时
List<ProjectParticipatedAgencyResultDTO> costTimes = baseDao.selectProjectCostTime(projects);

1
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 {

3
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<GridInfoDTO> gridList = customerGridService.queryGridInfoList(param.getCustomerId());
// list 转 map,以gridId为key,a = gridList,作为value,(o,n)->o 是遇到相同的gridId舍弃,(o,n)->n 是覆盖原来的gridId
Map<String,GridInfoDTO> 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<String, BigDecimal> scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId);
//剔除垃圾数据

3
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<ProjectExceedParamsResultDTO> 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<ProjectEntity> 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(),

1
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<ScreenUserTotalDataEntity> 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));
}

Loading…
Cancel
Save