Browse Source

Merge remote-tracking branch 'origin/dev_third_data' into dev_third_data

dev_shibei_match
jianjun 4 years ago
parent
commit
3ab5420e86
  1. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java
  2. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java
  3. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java
  4. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java
  5. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java
  6. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  7. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  8. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  9. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  10. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__cpc_subscore_add_samplecount.sql
  11. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml
  12. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml
  13. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml
  14. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml
  15. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java

@ -86,6 +86,11 @@ public class AgencyScoreDTO implements Serializable {
*/ */
private BigDecimal score; private BigDecimal score;
/**
* 样本量
*/
private Integer sampleCount;
/** /**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan * 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan
*/ */

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java

@ -48,4 +48,9 @@ public class SubAgencyScoreAvgResultDTO implements Serializable {
* 分数 * 分数
*/ */
private BigDecimal score; private BigDecimal score;
/**
* 样本量
*/
private Integer sampleCount;
} }

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java

@ -50,6 +50,11 @@ public class SubCommunityAvgResultDTO implements Serializable {
*/ */
private BigDecimal score = NumConstant.ZERO_DECIMAL; private BigDecimal score = NumConstant.ZERO_DECIMAL;
/**
* 样本量
*/
private Integer sampleCount;
/** /**
* 赋值状态 * 赋值状态
*/ */

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java

@ -79,6 +79,11 @@ public class FactIndexCommunityScoreDTO implements Serializable {
*/ */
private String originValue; private String originValue;
/**
* 参与计算的样本量
*/
private Integer sampleCount;
/** /**
* 分值 * 分值
*/ */

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java

@ -49,4 +49,9 @@ public class SubGridAvgResultDTO implements Serializable {
*/ */
private BigDecimal score; private BigDecimal score;
/**
* 样本量
*/
private Integer sampleCount;
} }

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

@ -235,9 +235,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); // log.info("组织内党员的联系群众能力考评分(平均值) 单独处理");
//网格内党员的联系群众能力考评分(平均值) //网格内党员的联系群众能力考评分(平均值)
String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID);
String monthId = (String) recordMap.get(IndexCalConstant.MONTH_ID);
AvgOperationResultVO contactMassesAvgVo = getGridContactMassesAvgValue(formDTO, gridId); AvgOperationResultVO contactMassesAvgVo = getGridContactMassesAvgValue(formDTO, gridId);
gridAvgOpeResultMap.put(gridId.concat(":").concat(monthId), contactMassesAvgVo); gridAvgOpeResultMap.put(gridId.concat(":").concat(IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode()), contactMassesAvgVo);
SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgVo.getAvgValue()); SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgVo.getAvgValue());
value.getIndexValueVOs().add(contactMassesAblityValue); value.getIndexValueVOs().add(contactMassesAblityValue);
}else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) {
@ -252,7 +251,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
HashMap<String, CalculateResult> resultMap = calculate(indexMap); HashMap<String, CalculateResult> resultMap = calculate(indexMap);
resultMapList.add(resultMap); resultMapList.add(resultMap);
} }
// 保存中间表 //保存中间表
deleteBeforeDataList(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE); deleteBeforeDataList(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.GRID_DJ_ALL_PARENT_INDEX_CODE);
saveGridCorreLationResult(formDTO, saveGridCorreLationResult(formDTO,
resultMapList, resultMapList,
@ -479,7 +478,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
gridSubScoreEntity.setOriginValue(detail.getOriginValue()); gridSubScoreEntity.setOriginValue(detail.getOriginValue());
// 为平均值类型的指标赋值样本总量 // 为平均值类型的指标赋值样本总量
AvgOperationResultVO avgOperationResultVO = avgOpeResultVo.get(gridSubScoreEntity.getGridId().concat(":").concat(gridSubScoreEntity.getMonthId())); AvgOperationResultVO avgOperationResultVO = avgOpeResultVo.get(gridSubScoreEntity.getGridId().concat(":").concat(gridSubScoreEntity.getIndexCode()));
if (avgOperationResultVO != null) { if (avgOperationResultVO != null) {
gridSubScoreEntity.setSampleCount(avgOperationResultVO.getSampleCount()); gridSubScoreEntity.setSampleCount(avgOperationResultVO.getSampleCount());
} else { } else {
@ -662,9 +661,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) {
// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); // log.info("组织内党员的参与议事能力考评分(平均值) 单独处理");
String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID);
String monthId = (String) recordMap.get(IndexCalConstant.MONTH_ID);
AvgOperationResultVO joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); AvgOperationResultVO joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId);
avgOperationResultVo.put(gridId.concat(":").concat(monthId), joinAvgValue); avgOperationResultVo.put(gridId.concat(":").concat(IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode()), joinAvgValue);
SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue.getAvgValue()); SampleValue<BigDecimal> contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue.getAvgValue());
value.getIndexValueVOs().add(contactMassesAblityValue); value.getIndexValueVOs().add(contactMassesAblityValue);

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

@ -226,9 +226,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
//下属所有网格的党建能力平均值 //下属所有网格的党建能力平均值
// 计算党建能力平均分时候的样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridAvgResultDTO> subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List<SubGridAvgResultDTO> subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
subGridPartyAvgScore.stream().forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { if (CollectionUtils.isEmpty(subGridPartyAvgScore)) {
log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL);
} else { } else {
@ -281,6 +287,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
deleteOldRecord(customerId,monthId); deleteOldRecord(customerId,monthId);
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? 0 : sampleCount);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }
@ -300,9 +310,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<SubGridAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
subGridGovernAvg.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subGridGovernAvg)){ if (CollectionUtils.isEmpty(subGridGovernAvg)){
log.warn("社区下级治理能力平均分集合为空"); log.warn("社区下级治理能力平均分集合为空");
}else{ }else{
@ -353,6 +369,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? 0 : sampleCount);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }
@ -372,10 +392,16 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode(); String indexCode = detail.getIndexCode();
if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) {
List<SubGridAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<SubGridAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
subGridServiceAvg.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subGridServiceAvg)) { if (CollectionUtils.isEmpty(subGridServiceAvg)) {
log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); log.warn("查询社区下级所有网格服务能力得分平均值集合为空");
} else { } else {
@ -425,6 +451,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? 0 : sampleCount);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }
@ -662,6 +692,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
log.info("communityPartyCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityPartyCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
deleteOldRecord(form.getCustomerId(),form.getMonthId()); deleteOldRecord(form.getCustomerId(),form.getMonthId());
result.getFiveLevel().forEach(s->{
s.setSampleCount(0);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }
@ -734,6 +767,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityGovernAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
result.getFiveLevel().forEach(s->{
s.setSampleCount(0);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }
@ -806,6 +842,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("communityServiceAbilityCalculateExistsSub getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid); CommunityCalResultDTO result = getResultB(scoreTotalOfSampleId, form.getCustomerId(), form.getMonthId(), NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
result.getFiveLevel().forEach(s->{
s.setSampleCount(0);
});
deleteAndInsert(result); deleteAndInsert(result);
return true; return true;
} }

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

@ -222,10 +222,16 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
//党建能力平均值 //党建能力平均值
indexDetailList.forEach(detail -> { indexDetailList.forEach(detail -> {
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL);
subGridPartyAvgScore.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount());
});
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString());
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { if (CollectionUtils.isEmpty(subGridPartyAvgScore)) {
log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL);
@ -282,6 +288,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("districtPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid);
deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL); deleteOldRecord(customerId,monthId,IndexCalConstant.DISTRICT_LEVEL);
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
return true; return true;
} }
@ -301,9 +312,14 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL);
districtGovernAvgList.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount());
});
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); log.info("districtGovernAvgList:::"+districtGovernAvgList.toString());
for (int i = 0; i < districtGovernAvgList.size(); i++) { for (int i = 0; i < districtGovernAvgList.size(); i++) {
if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){
@ -363,6 +379,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("districtGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid);
// 赋值样本量
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
return true; return true;
} }
@ -382,10 +403,16 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode(); String indexCode = detail.getIndexCode();
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) {
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL);
subStreetAvgList.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getParentId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount());
});
log.info("subStreetAvgList:::"+subStreetAvgList.toString()); log.info("subStreetAvgList:::"+subStreetAvgList.toString());
for (int i = 0; i < subStreetAvgList.size(); i++) { for (int i = 0; i < subStreetAvgList.size(); i++) {
if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){
@ -421,6 +448,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("districtServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("districtServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), pid);
// 赋值样本量
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
} }
return true; return true;

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

@ -227,10 +227,16 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
//下属所有社区的党建能力平均值 //下属所有社区的党建能力平均值
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
subCommPartyAvgScore.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { if (CollectionUtils.isEmpty(subCommPartyAvgScore)) {
log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL);
} else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) {
@ -283,6 +289,13 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("streetPartyAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid);
deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL); deleteOldRecord(customerId, monthId, IndexCalConstant.STREET_LEVEL);
// 赋值样本量
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
return true; return true;
} }
@ -302,9 +315,15 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
subGridGovernAvg.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subGridGovernAvg)){ if (CollectionUtils.isEmpty(subGridGovernAvg)){
log.warn("查询街道下属所有社区治理能力汇总为空"); log.warn("查询街道下属所有社区治理能力汇总为空");
}else if (subGridGovernAvg.size() > NumConstant.ZERO) { }else if (subGridGovernAvg.size() > NumConstant.ZERO) {
@ -355,6 +374,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetGovernAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("streetGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid);
// 赋值样本量
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
return true; return true;
} }
@ -374,10 +398,19 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
// key:agencyId,value:sampleCount样本量
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode(); String indexCode = detail.getIndexCode();
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) {
List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
subCommServiceAvg.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode()), s.getSampleCount());
});
if (CollectionUtils.isEmpty(subCommServiceAvg)) { if (CollectionUtils.isEmpty(subCommServiceAvg)) {
log.warn("查询街道下属社区服务能力得分平均值为空"); log.warn("查询街道下属社区服务能力得分平均值为空");
} else if (subCommServiceAvg.size() > NumConstant.ZERO) { } else if (subCommServiceAvg.size() > NumConstant.ZERO) {
@ -427,6 +460,11 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("streetServiceAbilityCalculate getScoreTotalOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId)); log.info("streetServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid); AgencyCalResultDTO result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), pid);
// 赋值样本量
result.getFiveLevel().forEach(s -> {
Integer sampleCount = gridPartyScoreSampleCountMap.get(s.getAgencyId().concat(":").concat(s.getIndexCode()));
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount);
});
insertDetail(result); insertDetail(result);
return true; return true;
} }

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.14__cpc_subscore_add_samplecount.sql

@ -1 +1,5 @@
alter table fact_index_grid_sub_score add column SAMPLE_COUNT int(10) comment '样本量' after ORIGIN_VALUE; alter table fact_index_grid_sub_score add column SAMPLE_COUNT int(10) comment '参与统计的样本个数' after ORIGIN_VALUE;
alter table fact_index_community_sub_score
add column SAMPLE_COUNT int(10) comment '参与统计的样本个数' after ORIGIN_VALUE;
alter table fact_index_agency_sub_score
add column SAMPLE_COUNT int(10) comment '参与统计的样本个数' after ORIGIN_VALUE;

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml

@ -97,6 +97,7 @@
fics.quarter_id, fics.quarter_id,
fics.year_id, fics.year_id,
ROUND(AVG( fics.score ),6) AS score, ROUND(AVG( fics.score ),6) AS score,
COUNT(1) AS sample_count,
fics.customer_id, fics.customer_id,
PARENT_AGENCY_ID AS parentId PARENT_AGENCY_ID AS parentId
FROM FROM

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml

@ -5,7 +5,7 @@
<!-- 【街道】中间表插入 --> <!-- 【街道】中间表插入 -->
<insert id="insertStreetRecord"> <insert id="insertStreetRecord">
INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, ORIGIN_VALUE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, ORIGIN_VALUE, SCORE, SAMPLE_COUNT, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES VALUES
<foreach collection="lists" item="item" separator=","> <foreach collection="lists" item="item" separator=",">
@ -20,6 +20,7 @@
#{item.dataType}, #{item.dataType},
#{item.originValue}, #{item.originValue},
#{item.score}, #{item.score},
#{item.sampleCount},
#{item.indexCode}, #{item.indexCode},
#{item.allParentIndexCode}, #{item.allParentIndexCode},
#{item.weight}, #{item.weight},

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml

@ -75,6 +75,7 @@
fics.quarter_id, fics.quarter_id,
fics.year_id, fics.year_id,
ROUND(AVG( fics.score ),6) AS score, ROUND(AVG( fics.score ),6) AS score,
COUNT(1) AS sampleCount,
fics.customer_id, fics.customer_id,
sca.pid AS parentId sca.pid AS parentId
FROM FROM

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml

@ -5,7 +5,7 @@
<!-- 党建能力【社区】中间表插入 --> <!-- 党建能力【社区】中间表插入 -->
<insert id="insertCommunityPartyRecord"> <insert id="insertCommunityPartyRecord">
INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, ORIGIN_VALUE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, ORIGIN_VALUE, SAMPLE_COUNT, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES VALUES
<foreach collection="lists" item="item" separator=","> <foreach collection="lists" item="item" separator=",">
@ -18,6 +18,7 @@
#{item.quarterId}, #{item.quarterId},
#{item.monthId}, #{item.monthId},
#{item.originValue}, #{item.originValue},
#{item.sampleCount},
#{item.score}, #{item.score},
#{item.indexCode}, #{item.indexCode},
#{item.allParentIndexCode}, #{item.allParentIndexCode},

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

@ -131,6 +131,7 @@
figc.quarter_id as quarterId, figc.quarter_id as quarterId,
figc.year_id as yearId, figc.year_id as yearId,
ROUND(AVG( figc.score ),6) AS score, ROUND(AVG( figc.score ),6) AS score,
COUNT(1) AS sampleCount,
figc.customer_id as customerId, figc.customer_id as customerId,
sca.pid AS parentId sca.pid AS parentId
FROM FROM

Loading…
Cancel
Save