Browse Source

指标字典项-说明

master
jianjun 4 years ago
parent
commit
c2ca0073a7
  1. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java
  2. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java
  3. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/IndexExplainService.java
  4. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java
  5. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml
  6. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml
  7. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml
  8. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/index/IndexDictDao.xml

7
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java

@ -36,6 +36,13 @@ public class AblityListResultDTO implements Serializable {
*/
private BigDecimal weight;
/**
* 原始分数
*/
private Double score;
/**
* 加权分数乘以权重后得分
*/
private BigDecimal weightedScore;
}

15
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java

@ -20,7 +20,9 @@ package com.epmet.datareport.controller.index;
import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.service.evaluationindex.index.IndexExplainService;
import com.epmet.evaluationindex.index.form.IndexExplainFormDTO;
import com.epmet.evaluationindex.index.form.IndexScoreFormDTO;
import com.epmet.evaluationindex.index.result.IndexExplainResult;
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -58,5 +60,18 @@ public class IndexExplainController {
return ok;
}
/**
* desc: 指标字典项
*
* @param formDTO
* @author LiuJanJun
* @date 2021/5/12 4:12 下午
*/
@PostMapping("indexdict")
public Result<IndexDictResultDTO> getIndexMeaning(@RequestBody IndexScoreFormDTO formDTO){
IndexDictResultDTO result = indexExplainService.getIndexMeaning(formDTO);
return new Result<IndexDictResultDTO>().ok(result);
}
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/IndexExplainService.java

@ -18,7 +18,9 @@
package com.epmet.datareport.service.evaluationindex.index;
import com.epmet.evaluationindex.index.form.IndexExplainFormDTO;
import com.epmet.evaluationindex.index.form.IndexScoreFormDTO;
import com.epmet.evaluationindex.index.result.IndexExplainResult;
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO;
import java.util.List;
@ -39,4 +41,14 @@ public interface IndexExplainService {
* @date 2021/5/12 4:38 下午
*/
List<IndexExplainResult> getScoreDetail(IndexExplainFormDTO formDTO);
/**
* desc: 条件获取指标
*
* @param formDTO
* @return com.epmet.evaluationindex.index.result.IndexDictResultDTO
* @author LiuJanJun
* @date 2021/5/20 10:20 上午
*/
IndexDictResultDTO getIndexMeaning(IndexScoreFormDTO formDTO);
}

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

@ -24,10 +24,7 @@ import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.constant.IndexConstant;
import com.epmet.datareport.dao.evaluationindex.index.IndexExplainDao;
import com.epmet.datareport.dao.evaluationindex.index.IndexGroupDetailDao;
import com.epmet.datareport.dao.fact.FactIndexAgencySubScoreDao;
import com.epmet.datareport.dao.fact.FactIndexCommunitySubScoreDao;
import com.epmet.datareport.dao.fact.FactIndexCpcSubScoreDao;
import com.epmet.datareport.dao.fact.FactIndexGridSubScoreDao;
import com.epmet.datareport.dao.fact.*;
import com.epmet.datareport.service.evaluationindex.index.IndexExplainService;
import com.epmet.evaluationindex.index.dto.IndexExplainTreeDTO;
import com.epmet.evaluationindex.index.form.IndexExplainFormDTO;
@ -36,6 +33,7 @@ import com.epmet.evaluationindex.index.result.IndexExplainResult;
import com.epmet.evaluationindex.index.result.IndexGroupDetailResult;
import com.epmet.evaluationindex.index.result.IndexScoreDetailResult;
import com.epmet.evaluationindex.index.result.IndexScoreResult;
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -58,7 +56,8 @@ import java.util.stream.Collectors;
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class IndexExplainServiceImpl implements IndexExplainService {
@Autowired
private IndexDictDao indexDictDao;
@Autowired
private IndexExplainDao indexExplainDao;
@Autowired
@ -106,6 +105,11 @@ public class IndexExplainServiceImpl implements IndexExplainService {
return results;
}
@Override
public IndexDictResultDTO getIndexMeaning(IndexScoreFormDTO formDTO) {
return indexDictDao.selectIndexDict(formDTO.getIndexCode());
}
private void setTableData(IndexExplainFormDTO formDTO, Map<String, List<IndexGroupDetailResult>> detailEntityMap, IndexExplainTreeDTO explainDTO, IndexExplainResult result) {
if (NumConstant.ONE == explainDTO.getIsSearch()) {
List<IndexScoreResult> realScoreList = null;

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

@ -9,7 +9,8 @@
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
fact.score AS score,
dict.index_name AS "name",
round(fact.WEIGHT,2) AS weight
round(fact.WEIGHT,2) AS weight,
(fact.SCORE * fact.WEIGHT) AS weightedScore
FROM
fact_index_agency_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

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

@ -9,7 +9,8 @@
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
dict.index_name AS "name",
fact.score AS score,
round(fact.WEIGHT,2) AS weight
round(fact.WEIGHT,2) AS weight,
(fact.SCORE * fact.WEIGHT) AS weightedScore
FROM
fact_index_community_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

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

@ -9,7 +9,8 @@
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
dict.index_name AS "name",
fact.score AS score,
round(fact.WEIGHT,2) AS weight
round(fact.WEIGHT,2) AS weight,
(fact.SCORE * fact.WEIGHT) AS weightedScore
FROM
fact_index_grid_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/index/IndexDictDao.xml

@ -18,7 +18,8 @@
SELECT
index_name AS "indexName",
index_code AS "indexCode",
value_type AS "valueType"
value_type AS "valueType",
INDEX_DESC
FROM
index_dict
WHERE

Loading…
Cancel
Save