4 changed files with 118 additions and 0 deletions
@ -0,0 +1,40 @@ |
|||||
|
package com.elink.esua.epdc.task.screen; |
||||
|
|
||||
|
import com.elink.esua.epdc.feign.AnalysisFeignClient; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @program: esua-epdc |
||||
|
* @description: 网格员事件管理 |
||||
|
* @author: syp |
||||
|
* @create: 2021-02-24 13:48 |
||||
|
**/ |
||||
|
@Component("screenGridManagerDataTask") |
||||
|
public class ScreenGridManagerDataTaskImpl implements ScreenIndexDataPushTask { |
||||
|
|
||||
|
private final Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private AnalysisFeignClient analysisFeignClient; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String param) { |
||||
|
// 网格员数据管理
|
||||
|
gridManagerUploadData(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void gridManagerUploadData() { |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|【网格员管理】网格员数据管理>定时任务开始执行"); |
||||
|
analysisFeignClient.selectGridManagerUploadData(); |
||||
|
logger.info("<" + methodName + "|【网格员管理】网格员数据管理>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
package com.elink.esua.epdc.task.screen; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.elink.esua.epdc.dto.ScreenGridManagerParamDTO; |
||||
|
import com.elink.esua.epdc.dto.screen.form.ScreenJobFormDTO; |
||||
|
import com.elink.esua.epdc.feign.AnalysisFeignClient; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @program: esua-epdc |
||||
|
* @description: 网格员事件管理 |
||||
|
* @author: syp |
||||
|
* @create: 2021-02-24 13:48 |
||||
|
**/ |
||||
|
@Component("screenGridManagerEventsTask") |
||||
|
public class ScreenGridManagerEventsTaskImpl implements ScreenIndexDataPushTask { |
||||
|
|
||||
|
private final Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private AnalysisFeignClient analysisFeignClient; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void run(String param) { |
||||
|
// 参数处理
|
||||
|
ScreenGridManagerParamDTO paramDto = new ScreenGridManagerParamDTO(); |
||||
|
if (StringUtils.isNotEmpty(param)) { |
||||
|
paramDto = JSONObject.parseObject(param, ScreenGridManagerParamDTO.class); |
||||
|
} |
||||
|
// 网格员事件管理
|
||||
|
gridManagerUploadEvent(paramDto.getGridManagerUploadEvent()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void gridManagerUploadEvent(String gridManagerUploadEvent) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(gridManagerUploadEvent); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|【网格员管理】网格员事件管理>定时任务开始执行"); |
||||
|
analysisFeignClient.selectGridManagerUploadEvent(formDto); |
||||
|
logger.info("<" + methodName + "|【网格员管理】网格员事件管理>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue