Browse Source

indexstatistics

dev_shibei_match
yinzuomei 5 years ago
parent
commit
3b03299ef9
  1. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java

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

@ -22,6 +22,7 @@ import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -210,6 +211,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
return customerRelationService.getCustomerInfoMap(customerIds);
}
@Async
@Override
public Boolean indexStatistics(IndexStatisticsFormDTO formDTO) {
List<String> customerIds = new ArrayList<>();
@ -224,6 +226,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
List<String> monthIds = new ArrayList<>();
if (StringUtils.isNotEmpty(formDTO.getStartMonth()) && StringUtils.isNotEmpty(formDTO.getEndMonth())){
monthIds = DateUtils.getMonthBetween(formDTO.getStartMonth(),formDTO.getEndMonth());
log.info(JSON.toJSONString(monthIds));
}else {
if (StringUtils.isEmpty(formDTO.getMonthId())){
// 默认上月
@ -238,7 +241,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
extractFormDTO.setMonthId(monthId);
long start = System.currentTimeMillis();
boolean calFlag=this.indexCalculate(extractFormDTO);
HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ";monthId:" + formDTO.getMonthId() + ",calculateAll全部指标计算完成,是否成功:" + calFlag + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + extractFormDTO.getCustomerId() + ";monthId:" + extractFormDTO.getMonthId() + ",calculateAll全部指标计算完成,是否成功:" + calFlag + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
});
});
return true;

Loading…
Cancel
Save