Browse Source

指标计算rediskey

dev_shibei_match
jianjun 5 years ago
parent
commit
515652ea81
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java
  2. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java

@ -13,5 +13,5 @@ public interface IndexCodeFieldReService {
* desc获取指标code对应的字段值
* @return
*/
Map<String,String> getIndexCodeFieldReList();
Map<String,String> getIndexCodeFieldReMap();
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java

@ -7,6 +7,7 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.entity.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum;
import com.epmet.service.indexcal.CpcIndexCalculateService;
import com.epmet.service.indexcal.IndexCodeFieldReService;
import com.epmet.service.screen.IndexGroupDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -26,6 +27,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
private IndexCodeFieldReDao indexCodeFieldReDao;
@Autowired
private IndexGroupDetailService getDetailListByParentCode;
@Autowired
private IndexCodeFieldReService indexCodeFieldReService;
@Override
public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) {
//计算最大最小值
@ -40,7 +43,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId());
return false;
}
Map<String, String> indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap();
if (CollectionUtils.isEmpty(indexCodeFieldReList))
indexDetails.forEach(indexDetail->{
});
log.info(JSON.toJSONString(minAndMaxList));
Map<String, BigDecimal> list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId());

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java

@ -17,7 +17,7 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService {
@Autowired
private IndexCodeFieldReRedis indexCodeFieldReRedis;
@Override
public Map<String, String> getIndexCodeFieldReList() {
public Map<String, String> getIndexCodeFieldReMap() {
Map<String, String> indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap();
if (CollectionUtils.isEmpty(indexCodeFiledReMap)){
indexCodeFiledReMap = indexCodeFieldReDao.getAllData();

Loading…
Cancel
Save