Browse Source

Merge branch 'dev'

dev_shibei_match
wxz 4 years ago
parent
commit
01aac6cc08
  1. 98
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
  2. 9
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

98
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java

@ -348,7 +348,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setSatisfactionRatio(ratio);
}
}));
}
@ -356,10 +360,14 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
List<OrgStatisticsResultDTO> gridList = factOriginProjectLogDailyService.getGridSelfDaily(customerId, dateId);
if (CollectionUtils.isNotEmpty(gridList)) {
list.forEach(entity -> gridList.stream().filter(gridAbility -> entity.getOrgId().equals(gridAbility.getOrgId())).forEach(grid -> {
if (grid.getSum() != NumConstant.ZERO) {
BigDecimal resolveCount = new BigDecimal(grid.getSum());
BigDecimal selfCount = new BigDecimal(grid.getCount());
if (grid.getSum() != NumConstant.ZERO) {
entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -371,7 +379,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -383,7 +395,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResolvedRatio(ratio);
}
}));
}
@ -422,7 +438,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setSatisfactionRatio(ratio);
}
}));
}
@ -434,7 +454,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -445,7 +469,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -457,7 +485,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResolvedRatio(ratio);
}
}));
}
@ -495,7 +527,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setSatisfactionRatio(ratio);
}
}));
}
@ -507,7 +543,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -518,7 +558,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -530,7 +574,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResolvedRatio(ratio);
}
}));
}
@ -568,7 +616,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setSatisfactionRatio(ratio);
}
}));
}
@ -580,7 +632,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResponseRatio(ratio);
}
}));
}
@ -591,7 +647,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setGovernRatio(ratio);
}
}));
}
@ -603,7 +663,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe
if (dto.getSum() != NumConstant.ZERO) {
BigDecimal sum = new BigDecimal(dto.getSum());
BigDecimal count = new BigDecimal(dto.getCount());
entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP);
if (ratio.compareTo(hundred) > 0) {
ratio = hundred;
}
entity.setResolvedRatio(ratio);
}
}));
}

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

@ -650,7 +650,10 @@
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
AND ( ACTION_CODE = 'response' OR ACTION_CODE = 'close' OR ACTION_CODE = 'transfer' OR ACTION_CODE = 'created' )
AND PROJECT_ID IN ( SELECT ID FROM fact_origin_project_main_daily WHERE DEL_FLAG = 0 AND PROJECT_STATUS = 'closed' AND ORIGIN = "issue")
AND PROJECT_ID IN (
SELECT ID FROM fact_origin_project_main_daily WHERE DEL_FLAG = 0 AND PROJECT_STATUS = 'closed' AND ORIGIN = 'issue'
AND CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId})
GROUP BY
PROJECT_ID
HAVING
@ -717,7 +720,9 @@
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
AND ( ACTION_CODE = 'response' OR ACTION_CODE = 'close' OR ACTION_CODE = 'transfer' OR ACTION_CODE = 'created' )
AND PROJECT_ID IN ( SELECT ID FROM fact_origin_project_main_daily WHERE DEL_FLAG = 0 AND PROJECT_STATUS = 'closed' AND ORIGIN = "issue" )
AND PROJECT_ID IN ( SELECT ID FROM fact_origin_project_main_daily WHERE DEL_FLAG = 0 AND PROJECT_STATUS = 'closed' AND ORIGIN = 'issue'
AND CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId})
GROUP BY
PROJECT_ID
HAVING

Loading…
Cancel
Save