Browse Source

Merge remote-tracking branch 'remotes/origin/dev_difficulty_data' into dev_wx_msg

dev_shibei_match
jianjun 5 years ago
parent
commit
68feb3d1fe
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java
  2. 9
      epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
  3. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  4. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
  5. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java
  6. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java
  7. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java
  8. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  9. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java
  10. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java
  11. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
  12. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  13. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
  14. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
  15. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  16. 41
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  17. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java

@ -35,4 +35,9 @@ public class DifficultyRankFormDTO implements Serializable {
@Min(value = 1, groups = {DifficultyRankInternalGroup.class}) @Min(value = 1, groups = {DifficultyRankInternalGroup.class})
private Integer pageNo; private Integer pageNo;
/**
* 组织类型: 网格grid 组织agency
*/
private String orgType;
} }

9
epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml

@ -242,14 +242,21 @@
diff.EVENT_STATUS_CODE AS statusCode, diff.EVENT_STATUS_CODE AS statusCode,
diff.EVENT_SOURCE AS gridName, diff.EVENT_SOURCE AS gridName,
diff.EVENT_IMG_URL AS imgUrl, 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_RE_ORG AS reOrg,
diff.EVENT_HANDLED_COUNT AS handledCount diff.EVENT_HANDLED_COUNT AS handledCount
FROM FROM
screen_difficulty_data diff screen_difficulty_data diff
WHERE WHERE
diff.DEL_FLAG = '0' diff.DEL_FLAG = '0'
<choose>
<when test="orgType != null and orgType == 'grid'">
AND diff.ORG_ID = #{agencyId,jdbcType=VARCHAR}
</when>
<otherwise>
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
</otherwise>
</choose>
<if test="status!= null and status != ''"> <if test="status!= null and status != ''">
AND diff.EVENT_STATUS_CODE = #{status} AND diff.EVENT_STATUS_CODE = #{status}
</if> </if>

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -7,7 +7,6 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant; import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcal.GridScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
@ -21,7 +20,7 @@ import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity;
@ -35,9 +34,7 @@ import com.epmet.entity.stats.DimDateEntity;
import com.epmet.entity.stats.DimMonthEntity; import com.epmet.entity.stats.DimMonthEntity;
import com.epmet.service.StatsDemoService; import com.epmet.service.StatsDemoService;
import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.evaluationindex.extract.dataToIndex.*;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.todata.ProjectExtractService;
import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.extract.toscreen.*;
import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimAgencyService;
@ -744,4 +741,12 @@ public class DemoController {
return new Result(); return new Result();
} }
@Autowired
private ScreenGrassrootsGovernDataAbsorptionService wc;
@PostMapping("wc")
public Result wc(@RequestBody ScreenCentralZoneDataFormDTO param){
wc.difficultyDataHub(param);
return new Result();
}
} }

12
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.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectGridDTO; import com.epmet.dto.project.ProjectGridDTO;
import com.epmet.dto.project.ProjectInfoDTO;
import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -103,4 +102,15 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @return java.lang.String * @return java.lang.String
*/ */
String selectParameterValueByKey(@Param("customerId") String customerId); String selectParameterValueByKey(@Param("customerId") String customerId);
/**
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
List<String> selectOvertimeProjectIds(@Param("customerId") String customerId,@Param("exclude") List<String> exclude,@Param("value") Integer value);
} }

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java

@ -137,11 +137,11 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList());
//办结数 //办结数
Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId());
//办结率 //办结率
Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId());
//处理效率 //处理效率
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId());
list.forEach(entity -> { list.forEach(entity -> {
//办结数 //办结数
entity.setClosedProjectCount(Optional.ofNullable(agencyHandleCount.get(entity.getAgencyId())).orElse(NumConstant.ZERO)); entity.setClosedProjectCount(Optional.ofNullable(agencyHandleCount.get(entity.getAgencyId())).orElse(NumConstant.ZERO));

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java

@ -130,11 +130,11 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService {
List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList());
//办结数 //办结数
Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId());
//办结率 //办结率
Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId());
//处理效率 //处理效率
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId());
list.forEach(entity -> { 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()));

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java

@ -128,11 +128,11 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList()); List<String> agencies = agencyList.stream().map(DimAgencyDTO::getId).distinct().collect(Collectors.toList());
//办结数 //办结数
Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies, customerId, dimId.getMonthId());
//办结率 //办结率
Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies,customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId());
//处理效率 //处理效率
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId,dimId.getMonthId(),"month"); Map<String, BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId());
list.forEach(entity -> { 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()));

6
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.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.extract.form.ExtractIndexFormDTO; import com.epmet.dto.extract.form.ExtractIndexFormDTO;
import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.evaluationindex.extract.dataToIndex.*;
import com.epmet.service.stats.DimCustomerService; import com.epmet.service.stats.DimCustomerService;
import com.epmet.util.DimIdGenerator;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -16,7 +14,6 @@ import org.springframework.util.CollectionUtils;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.*; import java.util.concurrent.*;
@ -107,16 +104,19 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
log.error("抽取【网格服务能力数据】发生异常,参数:" + JSON.toJSONString(param), e); log.error("抽取【网格服务能力数据】发生异常,参数:" + JSON.toJSONString(param), e);
} }
try{ try{
//dimAgency
indexCollStreetService.saveStreetAbility(customerId, monthId); indexCollStreetService.saveStreetAbility(customerId, monthId);
}catch (Exception e){ }catch (Exception e){
log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
} }
try{ try{
//dimAgency
indexCollCommunityService.saveCommunityAbility(customerId, monthId); indexCollCommunityService.saveCommunityAbility(customerId, monthId);
}catch (Exception e){ }catch (Exception e){
log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
} }
try{ try{
//dimAgency
indexCollDistrictService.saveDistrictAbility(customerId, monthId); indexCollDistrictService.saveDistrictAbility(customerId, monthId);
}catch (Exception e){ }catch (Exception e){
log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e); log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);

8
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<FactOrigin
List<OrgStatisticsResultDTO> getDepTransferCount(String customerId, String monthId, String level); List<OrgStatisticsResultDTO> getDepTransferCount(String customerId, String monthId, String level);
/** /**
* @Description 查询各机关办结(办结的含义指每个项目的结点中最高的机关)了多少项目
* @param agencies * @param agencies
* @return * @return
* @Description 查询各机关办结(办结的含义指每个项目的结点中最高的机关)了多少项目
* @author wangc * @author wangc
* @date 2020.09.20 23:46 * @date 2020.09.20 23:46
**/ **/
Map<String,Integer> getProjectHandledAgency(List<String> agencies, String customerId, String dimId,String dateType); Map<String, Integer> getProjectHandledAgency(List<String> agencies, String customerId, String dimId);
/** /**
* @Description 办结率 * @Description 办结率
@ -185,7 +185,7 @@ public interface FactOriginProjectLogDailyService extends BaseService<FactOrigin
* @author wangc * @author wangc
* @date 2020.09.23 10:06 * @date 2020.09.23 10:06
**/ **/
Map<String,BigDecimal> getHandlingRatio(List<String> agencies, String customerId,String dimId,String dateType); Map<String, BigDecimal> getHandlingRatio(List<String> agencies, String customerId, String dimId);
/** /**
* @Description 计算机关办结项目效率 * @Description 计算机关办结项目效率
@ -194,7 +194,7 @@ public interface FactOriginProjectLogDailyService extends BaseService<FactOrigin
* @author wangc * @author wangc
* @date 2020.09.21 02:16 * @date 2020.09.21 02:16
**/ **/
Map<String, BigDecimal> getAgencyWorkPieceRatio( String customerId,String dimId,String dateType); Map<String, BigDecimal> getAgencyWorkPieceRatio(String customerId, String dimId);
/** /**
* 网格项目响应度 * 网格项目响应度

13
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.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.naming.LinkLoopException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.*; import java.util.*;
@ -171,14 +170,14 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
} }
/** /**
* @Description 查询各机关办结的项目数
* @param agencies * @param agencies
* @return * @return
* @Description 查询各机关办结的项目数
* @author wangc * @author wangc
* @date 2020.09.20 23:46 * @date 2020.09.20 23:46
**/ **/
@Override @Override
public Map<String, Integer> getProjectHandledAgency(List<String> agencies, String customerId,String dimId, String dateType) { public Map<String, Integer> getProjectHandledAgency(List<String> agencies, String customerId, String dimId) {
Map<String, Integer> result = new HashMap<>(); Map<String, Integer> result = new HashMap<>();
List<ProjectParticipatedAgencyResultDTO> countList = baseDao.selectAgencyHandledProjectCount(agencies, customerId, dimId); List<ProjectParticipatedAgencyResultDTO> countList = baseDao.selectAgencyHandledProjectCount(agencies, customerId, dimId);
if (!CollectionUtils.isEmpty(countList)) { if (!CollectionUtils.isEmpty(countList)) {
@ -189,16 +188,16 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
/** /**
* @Description 办结率
* @param agencies * @param agencies
* @param dimId * @param dimId
* @param dateType - 日期维度类型 month date week quarter year * @param dateType - 日期维度类型 month date week quarter year
* @return * @return
* @Description 办结率
* @author wangc * @author wangc
* @date 2020.09.23 10:06 * @date 2020.09.23 10:06
**/ **/
@Override @Override
public Map<String, BigDecimal> getHandlingRatio(List<String> agencies, String customerId,String dimId, String dateType) { public Map<String, BigDecimal> getHandlingRatio(List<String> agencies, String customerId, String dimId) {
//计算方式:“评价周期内被吹哨且办结(无论是哪一级办结)的项目数”/“评价周期内被吹哨的所有项目数” //计算方式:“评价周期内被吹哨且办结(无论是哪一级办结)的项目数”/“评价周期内被吹哨的所有项目数”
Map<String, BigDecimal> result = new HashMap<>(); Map<String, BigDecimal> result = new HashMap<>();
@ -222,14 +221,14 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
} }
/** /**
* @Description 计算机关办结项目效率
* @param * @param
* @return * @return
* @Description 计算机关办结项目效率
* @author wangc * @author wangc
* @date 2020.09.21 02:16 * @date 2020.09.21 02:16
**/ **/
@Override @Override
public Map<String, BigDecimal> getAgencyWorkPieceRatio(String customerId,String dimId, String dateType) { public Map<String, BigDecimal> getAgencyWorkPieceRatio(String customerId, String dimId) {
//计算方法 : 评价周期内办结项目的平均处理时长的倒数 //计算方法 : 评价周期内办结项目的平均处理时长的倒数

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

@ -244,6 +244,7 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
*/ */
@Override @Override
public List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId, List<String> list) { public List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId, List<String> list) {
if(CollectionUtils.isEmpty(list)) return null;
return baseDao.selectDifficultyBaseInfo(customerId,list); return baseDao.selectDifficultyBaseInfo(customerId,list);
} }

8
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.org.CustomerGridService;
import com.epmet.service.point.UserPointService; import com.epmet.service.point.UserPointService;
import com.epmet.service.project.ProjectProcessService; import com.epmet.service.project.ProjectProcessService;
import com.epmet.service.project.ProjectService;
import com.epmet.service.topic.TopicService; import com.epmet.service.topic.TopicService;
import com.epmet.service.user.UserService; import com.epmet.service.user.UserService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -62,6 +63,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
private ProjectProcessService projectProcessService; private ProjectProcessService projectProcessService;
@Autowired @Autowired
private TopicService topicService; private TopicService topicService;
@Autowired
private ProjectService projectService;
/** /**
* @Description 用户积分党员分值数据中转站 * @Description 用户积分党员分值数据中转站
* @param param * @param param
@ -135,8 +138,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
@Override @Override
public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) { public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) {
//查询难点赌点中有无已结案的项目,若有则保留
List<String> existed = screenDifficultyDataService.selectExistedInfo(param.getCustomerId());
//查询数据 //查询数据
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),screenDifficultyDataService.selectExistedInfo(param.getCustomerId())); List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed));
if(CollectionUtils.isEmpty(difficulties)) return; if(CollectionUtils.isEmpty(difficulties)) return;
List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList());
//最近一次操作 //最近一次操作

11
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<ProjectEntity> {
* @return java.lang.String * @return java.lang.String
*/ */
String getParameterValueByKey(String customerId); String getParameterValueByKey(String customerId);
/**
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
List<String> getOvertimeProjectByParameter(String customerId,List<String> exclude);
} }

20
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.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.project.ProjectDao; import com.epmet.dao.project.ProjectDao;
import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectGridDTO; import com.epmet.dto.project.ProjectGridDTO;
import com.epmet.dto.project.ProjectInfoDTO;
import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectEntity;
import com.epmet.service.project.ProjectService; 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 org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -82,4 +82,20 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.selectParameterValueByKey(customerId); return baseDao.selectParameterValueByKey(customerId);
} }
/**
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
@Override
public List<String> getOvertimeProjectByParameter(String customerId, List<String> 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));
}
} }

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -406,8 +406,8 @@
project.DEL_FLAG = '0' project.DEL_FLAG = '0'
AND project.CUSTOMER_ID = #{customerId} AND project.CUSTOMER_ID = #{customerId}
<if test="null != list and list.size() != 0"> <if test="null != list and list.size() != 0">
<foreach collection="list" item="projectId" open="AND " separator=" AND " > <foreach collection="list" item="projectId" open="AND " separator=" OR " >
project.ID <![CDATA[<>]]> #{projectId} project.ID = #{projectId}
</foreach> </foreach>
</if> </if>
</select> </select>

41
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -106,4 +106,45 @@
and PARAMETER_KEY ='detention_days' and PARAMETER_KEY ='detention_days'
</select> </select>
<select id="selectOvertimeProjectIds" resultType="string">
SELECT
DISTINCT
project.ID
FROM
project project
WHERE
project.del_flag = '0'
AND project.customer_id = #{customerId}
<if test="null != exclude and exclude.size() > 0">
<foreach collection="exclude" item="id" open="AND ( " separator=" OR " close=" ) ">
project.ID <![CDATA[ <> ]]> #{id}
</foreach>
</if>
AND EXISTS (
SELECT
stff.ID
FROM
project_staff stff
LEFT JOIN project_org_relation period ON stff.ID = period.PROJECT_STAFF_ID
AND period.DEL_FLAG = '0'
WHERE
stff.DEL_FLAG = '0'
AND stff.CUSTOMER_ID = #{customerId}
AND project.ID = stff.PROJECT_ID
AND ABS(
TIMESTAMPDIFF(
DAY,
period.INFORMED_DATE,
IF
(
period.HANDLED_DATE IS NULL,
IF
( project.`STATUS` = 'closed', project.UPDATED_TIME, NOW( ) ),
period.HANDLED_DATE
)
)
) > #{value}
)
</select>
</mapper> </mapper>

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -1002,6 +1002,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
} }
//获取工作人员未处理的节点 //获取工作人员未处理的节点
List<StaffUnHandledDTO> unHandledList = projectStaffService.getStaffUnHandledList(customerId); List<StaffUnHandledDTO> unHandledList = projectStaffService.getStaffUnHandledList(customerId);
if (CollectionUtils.isNotEmpty(unHandledList)) {
List<CostDayFormDTO> form = unHandledList.stream().map(item -> { List<CostDayFormDTO> form = unHandledList.stream().map(item -> {
CostDayFormDTO dto = new CostDayFormDTO(); CostDayFormDTO dto = new CostDayFormDTO();
dto.setId(item.getId()); dto.setId(item.getId());
@ -1056,6 +1057,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
setMessage(customerId, overdueList, delayList, list); setMessage(customerId, overdueList, delayList, list);
} }
} }
}
/** /**
* @Description 项目节点耗时数据补齐 * @Description 项目节点耗时数据补齐

Loading…
Cancel
Save