Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

master
wangchao 5 years ago
parent
commit
aa40040837
  1. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java
  4. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java
  5. 22
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java

@ -114,6 +114,18 @@ public interface FactOriginProjectLogDailyDao extends BaseDao<FactOriginProjectL
* @date 2020.09.20 23:46
**/
List<ProjectParticipatedAgencyResultDTO> selectProjectParticipatedAgency(@Param("agencies") List<String> agencies, @Param("customerId") String customerId,@Param("dimId") String dimId);
/***
* @Description 评价周期内被吹哨次数
* @param agencies
* @param customerId
* @param dimId
* @return java.util.List<com.epmet.dto.extract.result.ProjectParticipatedAgencyResultDTO>
* @author wangc
* @date 2020.10.15 11:20
*/
List<ProjectParticipatedAgencyResultDTO> selectAgencyWhistledCount(@Param("agencies") List<String> agencies, @Param("customerId") String customerId,@Param("dimId") String dimId);
/***
* @Description 查询机关办结次数
* @param agencies

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

@ -137,13 +137,13 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
//办结数
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> agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month");
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month");
list.forEach(entity ->{
entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId()));
BigDecimal element = new BigDecimal(entity.getClosedProjectCount());
//分母,即机关参与过的项目数(去重)
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId());
//“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数”
Integer denominator = entity.getTransferedCount();
if (null != denominator && denominator != NumConstant.ZERO) {
//办结率
entity.setClosedProjectRatio(

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

@ -130,13 +130,14 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService {
//办结数
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> agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month");
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month");
list.forEach(entity ->{
entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId()));
BigDecimal element = new BigDecimal(entity.getClosedProjectCount());
//分母,即机关参与过的项目数(去重)
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId());
//“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数”
Integer denominator = entity.getTransferedCount();
if (null != denominator && denominator != NumConstant.ZERO) {
//办结率
entity.setClosedProjectRatio(

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

@ -128,15 +128,16 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
//办结数
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> agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month");
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month");
list.forEach(entity ->{
entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId()));
BigDecimal element = new BigDecimal(entity.getClosedProjectCount());
//分母,即机关参与过的项目数(去重)
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId());
//分母,吹哨次数
Integer denominator = entity.getTransferedCount();
if (null != denominator && denominator != NumConstant.ZERO) {
//办结率
//“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数”
entity.setClosedProjectRatio(
element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP)
);

22
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -160,6 +160,26 @@
GROUP BY AGENCY_ID
</select>
<!-- 评价周期内被吹哨次数 -->
<select id="selectAgencyWhistledCount" resultType="com.epmet.dto.extract.result.ProjectParticipatedAgencyResultDTO">
SELECT
AGENCY_ID,
COUNT(ID) AS count
FROM
fact_origin_project_log_daily
WHERE DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND IS_ACTIVE = '0'
<if test='null != dimId and "" != dimId.trim()'>
AND MONTH_ID = #{dimId}
</if>
<if test="agencies != null and agencies.size() > 0">
<foreach collection="agencies" item="agencyId" open="AND (" close=" )" separator=" OR ">
AGENCY_ID = #{agencyId}
</foreach>
</if>
GROUP BY AGENCY_ID
</select>
<!-- 查询机关办结次数 -->
<select id="selectAgencyHandledProjectCount" resultType="com.epmet.dto.extract.result.ProjectParticipatedAgencyResultDTO">
SELECT
@ -177,7 +197,7 @@
</if>
<if test='null != dimId and "" != dimId.trim()'>
AND ((log.ID IS NOT NULL AND log.MONTH_ID <![CDATA[>=]]> #{dimId}) OR log.ID IS NULL )
AND log.ID IS NOT NULL AND log.MONTH_ID = #{dimId}
</if>
GROUP BY SUBSTRING_INDEX(main.FINISH_ORG_IDS,':',1)
</select>

Loading…
Cancel
Save