Browse Source

街道分数计算修改 值,全区计算平均分加客户限制

dev_shibei_match
zxc 4 years ago
parent
commit
6517583486
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java
  2. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  3. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  4. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java

@ -94,7 +94,7 @@ public interface AgencyScoreDao extends BaseDao<AgencyScoreEntity> {
* @date 2021/1/18 上午9:09
*/
List<SubAgencyScoreAvgResultDTO> selectAgencyScoreAvgExistsSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode);
List<SubAgencyScoreAvgResultDTO> selectAgencyScoreAvgExistsSubNew(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId);
List<SubAgencyScoreAvgResultDTO> selectAgencyScoreAvgExistsSubNew(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId,@Param("customerId")String customerId);
List<SubAgencyScoreAvgResultDTO> selectAgencyScoreAvgByOrgIds(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("orgIds")List<String> orgIds);

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

@ -649,7 +649,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
Map<String, Integer> gridPartyScoreSampleCountMap = new HashMap<>();
indexDetailList.forEach(detail -> {
if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId);
List<SubAgencyScoreAvgResultDTO> subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId,customerId);
log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString());
subGridPartyAvgScore.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode()), s.getSampleCount());
@ -745,7 +745,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) {
// 治理能力平均值
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId);
List<SubAgencyScoreAvgResultDTO> districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId,customerId);
log.info("districtGovernAvgList:::"+districtGovernAvgList.toString());
districtGovernAvgList.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode()), s.getSampleCount());
@ -845,7 +845,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode();
if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) {
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId);
List<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSubNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId,customerId);
log.info("subStreetAvgList:::"+subStreetAvgList.toString());
subStreetAvgList.forEach(s -> {
gridPartyScoreSampleCountMap.put(s.getAgencyId().concat(":").concat(IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode()), s.getSampleCount());

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

@ -970,6 +970,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
avgScore.forEach(avg -> {
if (subScore.getAgencyId().equals(avg.getParentId())){
subScore.setScore(avg.getScore());
subScore.setSampleCount(avg.getSampleCount());
avg.setScoreStatus(true);
}
});
@ -990,6 +991,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
// 孔村单独处理
if (s.getAgencyId().equals(PingYinConstant.KONG_CUN_AGENCY_ID)){
s.setScore(divide);
// 党总支数量求平均数
s.setSampleCount(subAvgResultDTOS.size());
}
});
}

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

@ -263,7 +263,9 @@
(fics.agency_id = sca.agency_id
AND fics.del_flag = '0'
AND fics.month_id = #{monthId}
AND fics.index_code = #{indexCode})
AND fics.index_code = #{indexCode}
AND fics.CUSTOMER_ID = #{customerId}
)
WHERE sca.DEL_FLAG = '0'
AND sca.PARENT_AREA_CODE = #{areaCode}
GROUP BY parentId

Loading…
Cancel
Save