Browse Source

数据中乘以权重

master
jianjun 5 years ago
parent
commit
ce6613c174
  1. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
  2. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
  3. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
  4. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  5. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml
  6. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml
  7. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java

@ -39,10 +39,10 @@ public interface FactIndexAgencyScoreDao {
/**
* @param formDTO
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月各项乘以权重后的得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAblityIndex(AblityIndexFormDTO formDTO);
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAgencyAblityWeightScoreIndex(AblityIndexFormDTO formDTO);
/**
* @param formDTO
@ -56,5 +56,5 @@ public interface FactIndexAgencyScoreDao {
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectMonthScoreList(MonthScoreListFormDTO formDTO);
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectAgencyMonthWeightScoreList(MonthScoreListFormDTO formDTO);
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java

@ -42,7 +42,7 @@ public interface FactIndexCommunityScoreDao {
* @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityIndex(AblityIndexFormDTO formDTO);
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityWeightScore(AblityIndexFormDTO formDTO);
/**
* @param formDTO
@ -56,5 +56,5 @@ public interface FactIndexCommunityScoreDao {
* @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthScoreList(MonthScoreListFormDTO formDTO);
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthWeightScoreList(MonthScoreListFormDTO formDTO);
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java

@ -42,7 +42,7 @@ public interface FactIndexGridScoreDao {
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityIndex(AblityIndexFormDTO formDTO);
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityWeightScore(AblityIndexFormDTO formDTO);
/**
* @param formDTO
@ -56,5 +56,5 @@ public interface FactIndexGridScoreDao {
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthScoreList(MonthScoreListFormDTO formDTO);
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthWeightScoreList(MonthScoreListFormDTO formDTO);
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java

@ -79,12 +79,12 @@ public class FactIndexServiceImpl implements FactIndexService {
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分数据
list = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
list = factIndexAgencyScoreDao.selectAgencyAblityWeightScoreIndex(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
list = factIndexCommunityScoreDao.selectCommunityAblityWeightScore(formDTO);
} else {
//throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
return resultList;
@ -92,7 +92,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询网格过去12个月党建能力、治理能力、服务能力每月总分数据
list = factIndexGridScoreDao.selectGridAblityIndex(formDTO);
list = factIndexGridScoreDao.selectGridAblityWeightScore(formDTO);
} else {
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
@ -229,12 +229,12 @@ public class FactIndexServiceImpl implements FactIndexService {
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexAgencyScoreDao.selectMonthScoreList(formDTO);
list = factIndexAgencyScoreDao.selectAgencyMonthWeightScoreList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO);
list = factIndexCommunityScoreDao.selectCommunityMonthWeightScoreList(formDTO);
} else {
//throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
return resultList;
@ -242,7 +242,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexGridScoreDao.selectGridMonthScoreList(formDTO);
list = factIndexGridScoreDao.selectGridMonthWeightScoreList(formDTO);
} else {
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}

12
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexAgencyScoreDao">
<select id="selectAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
<select id="selectAgencyAblityWeightScoreIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode"
FROM
fact_index_agency_score fact
@ -41,12 +41,12 @@
AND fact.month_id = #{monthId}
</select>
<select id="selectMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
<select id="selectAgencyMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode"
FROM
fact_index_agency_score fact

12
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexCommunityScoreDao">
<select id="selectCommunityAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
<select id="selectCommunityAblityWeightScore" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode"
FROM
fact_index_community_score fact
@ -41,12 +41,12 @@
AND fact.month_id = #{monthId}
</select>
<select id="selectCommunityMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
<select id="selectCommunityMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode"
FROM
fact_index_community_score fact

12
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexGridScoreDao">
<select id="selectGridAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
<select id="selectGridAblityWeightScore" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode"
FROM
fact_index_grid_score fact
@ -42,12 +42,12 @@
AND fact.month_id = #{monthId}
</select>
<select id="selectGridMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
<select id="selectGridMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore",
ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score*self.SELF_WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score*self.SUB_WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode"
FROM
fact_index_grid_score fact

Loading…
Cancel
Save