Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
cf23c6ec40
  1. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java
  2. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  3. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  4. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  5. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java

@ -77,6 +77,17 @@ public interface GridScoreDao extends BaseDao<GridScoreEntity> {
* @date 2020/8/28 3:20 下午 * @date 2020/8/28 3:20 下午
*/ */
List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode);
/**
* @Description 社区-community下级三大能力平均值
* @Param customerId
* @Param monthId
* @Param indexCode
* @Param quarterId
* @Param yearId
* @author zxc
* @date 2021/5/31 9:34 上午
*/
List<SubGridAvgResultDTO> selectSubGridAvgScoreNew(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); List<SubGridAvgResultDTO> selectSubGridAvgScoreNew(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId);
/** /**

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

@ -400,6 +400,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}); });
} }
} else { } else {
// 活动组织次数
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL,quarterId,yearId); List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL,quarterId,yearId);
if (CollectionUtils.isEmpty(communityActivityCountList)) { if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL);

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

@ -237,11 +237,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
subPartyAvgList.forEach(party -> { subPartyAvgList.forEach(party -> {
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
party.forEach(c -> { party.forEach(c -> {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getAgencyId(), c.getParentId());
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s);
index1SampleValues.add(s);
}
}); });
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
@ -322,11 +320,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
governAvg.forEach(avg -> { governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> { avg.forEach(c -> {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getAgencyId(), c.getParentId());
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s);
index1SampleValues.add(s);
}
}); });
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
@ -407,11 +403,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
serviceAvg.forEach(c -> { serviceAvg.forEach(c -> {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getAgencyId(), c.getParentId());
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s);
index1SampleValues.add(s);
}
}); });
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -403,6 +403,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
}); });
} }
} else { } else {
// 活动组织次数
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId); List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId);
if (CollectionUtils.isEmpty(communityActivityCountList)) { if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL);

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

@ -201,6 +201,8 @@
AND sca.AREA_CODE != #{areaCode} AND sca.AREA_CODE != #{areaCode}
GROUP BY figc.agency_id GROUP BY figc.agency_id
</select> </select>
<!-- 【社区-community】下级三大能力平均值 -->
<select id="selectSubGridAvgScoreNew" resultType="com.epmet.dto.screen.result.SubGridAvgResultDTO"> <select id="selectSubGridAvgScoreNew" resultType="com.epmet.dto.screen.result.SubGridAvgResultDTO">
SELECT SELECT
sca.agency_id AS agencyId, sca.agency_id AS agencyId,
@ -221,7 +223,7 @@
WHERE sca.DEL_FLAG = '0' WHERE sca.DEL_FLAG = '0'
AND sca.level = 'community' AND sca.level = 'community'
AND sca.customer_id = #{customerId} AND sca.customer_id = #{customerId}
GROUP BY figc.agency_id GROUP BY sca.agency_id
</select> </select>
<select id="selectSubGridAvgScoreByAreaCodeNew" resultType="com.epmet.dto.screen.result.SubGridAvgResultDTO"> <select id="selectSubGridAvgScoreByAreaCodeNew" resultType="com.epmet.dto.screen.result.SubGridAvgResultDTO">

Loading…
Cancel
Save