Browse Source

得分说明 保留分数保留一位小数,权重保留整数

master
jianjun 4 years ago
parent
commit
4fddf998fb
  1. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java
  2. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml
  3. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml
  4. 5
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCpcSubScoreDao.xml
  5. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexDeptSubScoreDao.xml
  6. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java

@ -214,7 +214,7 @@ public class IndexExplainServiceImpl implements IndexExplainService {
if (StringUtils.isNotBlank(score.getQuantity())) {
tb.setQuantity(score.getQuantity());
}
tb.setWeight(score.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP) + "%");
tb.setWeight(score.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)) + "%");
}
}
}

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml

@ -45,7 +45,7 @@
SELECT
fact.index_code,
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS origin_value,
round(fact.score,2) AS score,
round(fact.score,1) AS score,
round(fact.WEIGHT,2) AS weight
FROM
fact_index_agency_sub_score fact

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml

@ -46,7 +46,7 @@
fact.index_code,
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS origin_value,
IF(fact.SAMPLE_COUNT='',0,IFNULL(fact.SAMPLE_COUNT,0)) AS quantity,
round(fact.score,2) AS score,
round(fact.score,1) AS score,
round(fact.WEIGHT,2) AS weight
FROM
fact_index_community_sub_score fact

5
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCpcSubScoreDao.xml

@ -30,8 +30,9 @@
SELECT
id, customer_id, agency_id, grid_id, year_id, month_id, user_id,
COUNT(*) quantity,
ROUND(AVG(score),2) score,
index_code, all_parent_index_code, weight
ROUND(AVG(score),1) score,
index_code, all_parent_index_code,
ROUND(weight,2) weight
FROM fact_index_cpc_sub_score
WHERE ALL_PARENT_INDEX_CODE = #{allParentIndexCode}
AND CUSTOMER_ID = #{customerId}

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexDeptSubScoreDao.xml

@ -11,7 +11,8 @@
origin_value,
index_code, all_parent_index_code, weight,
COUNT(*) quantity,
ROUND(AVG(score),2) score
ROUND(AVG(score),1) score,
round(weight,2) AS weight
FROM fact_index_dept_sub_score
WHERE
ALL_PARENT_INDEX_CODE = #{allParentIndexCode}

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml

@ -45,7 +45,7 @@
SELECT
fact.index_code,
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS origin_value,
round(fact.score,2) AS score,
round(fact.score,1) AS score,
round(fact.WEIGHT,2) AS weight
FROM
fact_index_grid_sub_score fact

Loading…
Cancel
Save