Browse Source

增加暂停的统计,重新处理

master
wxz 5 years ago
parent
commit
bfa0bca476
  1. 7
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
  2. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
  3. 9
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java
  4. 19
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java
  5. 26
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java

7
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java

@ -173,4 +173,11 @@ public interface DataStatisticalOpenFeignClient {
@PostMapping("/data/stats/statstopic/execute")
Result execTopicStatistical(@RequestParam(value = "date",required = false) String date);
/**
* 处理暂停的计算
* @return
*/
@PostMapping("/data/stats/indexcalculate/process-pendding-cals")
Result processPenddingCalculate();
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java

@ -170,4 +170,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp
public Result execTopicStatistical(String date) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "execTopicStatistical",date);
}
@Override
public Result processPenddingCalculate() {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "processPenddingCalculate");
}
}

9
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DataStatsProcessPenddingCalService.java

@ -0,0 +1,9 @@
package com.epmet.service;
import com.epmet.commons.tools.utils.Result;
public interface DataStatsProcessPenddingCalService {
Result processPenddingCal();
}

19
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DataStatsProcessPenddingCalServiceImpl.java

@ -0,0 +1,19 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.DataStatisticalOpenFeignClient;
import com.epmet.service.DataStatsProcessPenddingCalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DataStatsProcessPenddingCalServiceImpl implements DataStatsProcessPenddingCalService {
@Autowired
private DataStatisticalOpenFeignClient feignClient;
@Override
public Result processPenddingCal() {
return feignClient.processPenddingCalculate();
}
}

26
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DataStatsProcessPenddingCalTask.java

@ -0,0 +1,26 @@
package com.epmet.task;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.DataStatsProcessPenddingCalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Slf4j
@Component("dataStatsProcessPenddingCalTask")
public class DataStatsProcessPenddingCalTask implements ITask {
@Autowired
private DataStatsProcessPenddingCalService dataStatsProcessPenddingCalService;
@Override
public void run(String params) {
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行,参数为:{}", params);
Result result = dataStatsProcessPenddingCalService.processPenddingCal();
if (result.success()){
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行成功");
}else {
log.debug("DataStatsProcessPenddingCalTask定时任务正在执行定时任务执行失败:" + result.getMsg());
}
}
}
Loading…
Cancel
Save