4 changed files with 278 additions and 2 deletions
@ -0,0 +1,21 @@ |
|||||
|
package com.elink.esua.epdc.task.screen; |
||||
|
|
||||
|
/** |
||||
|
* 大屏数据采集接口共 (17) 个 |
||||
|
* |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:42 |
||||
|
*/ |
||||
|
public interface ScreenBaseReportPushTask { |
||||
|
|
||||
|
/** |
||||
|
* 大屏数据推送 |
||||
|
* |
||||
|
* @param param 入参 |
||||
|
* 参数格式:{'gridPartyMemberData':'2020-08','gridPartyAbility':'2020-08','orgPartyAbility':'2020-08','gridServiceAbility':'2020-08','orgServiceAbility':'2020-08','gridGovernAbility':'2020-08','orgGovernAbility':'2020-08','deptGovernAbility':'2020-08','all':'2020-08'} |
||||
|
* @return void |
||||
|
* @author Liuchuang |
||||
|
* @since 2020/9/9 15:21 |
||||
|
*/ |
||||
|
void run(String param); |
||||
|
} |
@ -0,0 +1,157 @@ |
|||||
|
package com.elink.esua.epdc.task.screen; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.elink.esua.epdc.dto.ScreenIndexBasicDataParamDTO; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 大屏数据采集接口共 (17) 个 |
||||
|
* |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:42 |
||||
|
*/ |
||||
|
@Component("screenBaseReportPushTask") |
||||
|
public class ScreenBaseReportPushTaskImpl implements ScreenBaseReportPushTask { |
||||
|
|
||||
|
private final Logger logger = LoggerFactory.getLogger(getClass()); |
||||
|
|
||||
|
@Autowired |
||||
|
private AnalysisFeignClient analysisFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String param) { |
||||
|
// 参数处理
|
||||
|
ScreenIndexBasicDataParamDTO paramDto = new ScreenIndexBasicDataParamDTO(); |
||||
|
if (StringUtils.isNotEmpty(param)) { |
||||
|
paramDto = JSONObject.parseObject(param, ScreenIndexBasicDataParamDTO.class); |
||||
|
} |
||||
|
// 01、网格热议话题数据
|
||||
|
gridHotTopic(paramDto.getGridPartyMemberData()); |
||||
|
// 02、组织热议话题数据
|
||||
|
agencyHotTopic(paramDto.getGridPartyAbility()); |
||||
|
// 03、网格议题数据
|
||||
|
gridIssue(paramDto.getOrgPartyAbility()); |
||||
|
// 04、组织议题数据
|
||||
|
agencyIssue(paramDto.getGridServiceAbility()); |
||||
|
// 05、网格注册用户数据
|
||||
|
gridRegUser(paramDto.getOrgServiceAbility()); |
||||
|
// 06、组织注册用户数据
|
||||
|
agencyRegUser(paramDto.getGridGovernAbility()); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 01、网格热议话题数据 |
||||
|
* |
||||
|
* @param yearMonth 统计月份 |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:47 |
||||
|
*/ |
||||
|
public void gridHotTopic(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|网格热议话题数据>定时任务开始执行" + yearMonth); |
||||
|
analysisFeignClient.gridHotTopic(formDto); |
||||
|
logger.info("<" + methodName + "|网格热议话题数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 02、组织热议话题数据 |
||||
|
* |
||||
|
* @param yearMonth |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:47 |
||||
|
*/ |
||||
|
public void agencyHotTopic(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|组织热议话题数据>定时任务开始执行"); |
||||
|
analysisFeignClient.agencyHotTopic(formDto); |
||||
|
logger.info("<" + methodName + "|组织热议话题数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 03、网格议题数据 |
||||
|
* |
||||
|
* @param yearMonth |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:47 |
||||
|
*/ |
||||
|
public void gridIssue(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|网格议题数据>定时任务开始执行"); |
||||
|
analysisFeignClient.gridIssue(formDto); |
||||
|
logger.info("<" + methodName + "|网格议题数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 04、组织议题数据 |
||||
|
* |
||||
|
* @param yearMonth |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:48 |
||||
|
*/ |
||||
|
public void agencyIssue(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|组织议题数据>定时任务开始执行"); |
||||
|
analysisFeignClient.agencyIssue(formDto); |
||||
|
logger.info("<" + methodName + "|组织议题数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 05、网格注册用户数据 |
||||
|
* |
||||
|
* @param yearMonth |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:48 |
||||
|
*/ |
||||
|
public void gridRegUser(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|网格注册用户数据>定时任务开始执行"); |
||||
|
analysisFeignClient.gridRegUser(formDto); |
||||
|
logger.info("<" + methodName + "|网格注册用户数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 06、组织注册用户数据 |
||||
|
* |
||||
|
* @param yearMonth |
||||
|
* @return void |
||||
|
* @author zhy |
||||
|
* @date 2021/6/28 10:48 |
||||
|
*/ |
||||
|
public void agencyRegUser(String yearMonth) { |
||||
|
ScreenJobFormDTO formDto = new ScreenJobFormDTO(); |
||||
|
formDto.setYearMonth(yearMonth); |
||||
|
// 方法名
|
||||
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
||||
|
logger.info("<" + methodName + "|组织注册用户数据>定时任务开始执行"); |
||||
|
analysisFeignClient.agencyRegUser(formDto); |
||||
|
logger.info("<" + methodName + "|组织注册用户数据>定时任务执行结束"); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue