Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_screen_data_2.0

dev_shibei_match
yinzuomei 5 years ago
parent
commit
7a393c3cb8
  1. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  2. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  3. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  4. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  5. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  6. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -53,4 +53,13 @@ public interface ProjectConstant {
*/
String STATS_FAILED_PREFIX = "统计数据执行失败:%s 客户ID:%s,统计日期:%s";
/**
* 自身
*/
String ZI_SHEN = "zishen";
/**
* 下级
*/
String XIA_JI = "xiaji";
}

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

@ -26,6 +26,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao;
import com.epmet.dao.evaluationindex.indexcal.DeptSelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao;
@ -137,14 +138,14 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
return;
}
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put("zishen", new HashSet<>());
selfSubParentMap.put("xiaji", new HashSet<>());
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
selfSubParentMap.get("xiaji").add(o.getIndexCode());
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
selfSubParentMap.get("zishen").add(o.getIndexCode());
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map<String, DeptSelfSubScoreEntity> insertMap = new HashMap<>();
@ -160,8 +161,8 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
BigDecimal partScore = score.getScore();
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {

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

@ -9,6 +9,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao;
import com.epmet.dao.evaluationindex.indexcal.GridScoreDao;
import com.epmet.dao.evaluationindex.indexcal.GridSelfSubScoreDao;
@ -126,14 +127,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
return;
}
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put("zishen", new HashSet<>());
selfSubParentMap.put("xiaji", new HashSet<>());
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
selfSubParentMap.get("xiaji").add(o.getIndexCode());
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
selfSubParentMap.get("zishen").add(o.getIndexCode());
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map<String, GridSelfSubScoreEntity> insertMap = new HashMap<>();
@ -150,9 +151,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
BigDecimal partWeight = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
BigDecimal partScore = score.getScore();
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {

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

@ -10,6 +10,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao;
import com.epmet.dao.evaluationindex.indexcal.CommunitySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.CommunitySubScoreDao;
@ -135,14 +136,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return;
}
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put("zishen", new HashSet<>());
selfSubParentMap.put("xiaji", new HashSet<>());
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
selfSubParentMap.get("xiaji").add(o.getIndexCode());
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
selfSubParentMap.get("zishen").add(o.getIndexCode());
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map<String, CommunitySelfSubScoreEntity> insertMap = new HashMap<>();
@ -158,8 +159,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
BigDecimal partScore = score.getScore();
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {

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

@ -11,6 +11,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao;
@ -133,14 +134,14 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
return;
}
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put("zishen", new HashSet<>());
selfSubParentMap.put("xiaji", new HashSet<>());
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
selfSubParentMap.get("xiaji").add(o.getIndexCode());
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
selfSubParentMap.get("zishen").add(o.getIndexCode());
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map<String, AgencySelfSubScoreEntity> insertMap = new HashMap<>();
@ -156,8 +157,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
BigDecimal partScore = score.getScore();
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {

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

@ -11,6 +11,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao;
@ -136,14 +137,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
return;
}
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put("zishen", new HashSet<>());
selfSubParentMap.put("xiaji", new HashSet<>());
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
selfSubParentMap.get("xiaji").add(o.getIndexCode());
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
selfSubParentMap.get("zishen").add(o.getIndexCode());
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map<String, AgencySelfSubScoreEntity> insertMap = new HashMap<>();
@ -159,8 +160,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
BigDecimal partScore = score.getScore();
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {

Loading…
Cancel
Save