|
|
@ -2,7 +2,9 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.enums.EnvEnum; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.HttpClientManager; |
|
|
|
import com.epmet.dto.extract.form.ExtractOriginFormDTO; |
|
|
|
import com.epmet.dto.extract.form.ExtractScreenFormDTO; |
|
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
|
@ -167,6 +169,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("基层治理-难点赌点抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); |
|
|
|
} |
|
|
|
log.info("===== extractDaily method end ======"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -245,14 +248,17 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { |
|
|
|
//此方法保持在最后即可 计算指标分数 todo 优化 手动创建线程池 控制任务数量
|
|
|
|
ExecutorService pool = Executors.newSingleThreadExecutor(); |
|
|
|
pool.submit(() -> { |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
CalculateCommonFormDTO formDTO1 = new CalculateCommonFormDTO(); |
|
|
|
try { |
|
|
|
formDTO1.setMonthId(monthId); |
|
|
|
formDTO1.setCustomerId(customerId); |
|
|
|
indexCalculateService.indexCalculate(formDTO1); |
|
|
|
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO1); |
|
|
|
HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() + "客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒"); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1)); |
|
|
|
} |
|
|
|
}); |
|
|
|
log.info("===== extractMonthly method end ======"); |
|
|
|
} |
|
|
|
} |
|
|
|