diff --git a/epdc-cloud-job/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java b/epdc-cloud-job/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java index efe7ced..7d3ca38 100644 --- a/epdc-cloud-job/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java +++ b/epdc-cloud-job/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java @@ -25,6 +25,8 @@ import java.util.concurrent.Future; @Component("screenPublicDataPushTask") public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { + + private final Logger logger = LoggerFactory.getLogger(getClass()); private static final ExecutorService service = Executors.newFixedThreadPool(100); @@ -35,37 +37,27 @@ public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { @Override public void run(String param) { // 参数处理 - ScreenJobMonthDataParamDTO paramDto = new ScreenJobMonthDataParamDTO(); + ScreenJobBasicDataParamDTO paramDto = new ScreenJobBasicDataParamDTO(); if (StringUtils.isNotEmpty(param)) { - paramDto = JSONObject.parseObject(param, ScreenJobMonthDataParamDTO.class); + paramDto = JSONObject.parseObject(param, ScreenJobBasicDataParamDTO.class); } - for(int i = 0 ; i < 5 ; i++){ - createThread(i,paramDto); + for(int i = 0 ; i < 13 ; i++){ + createThread(i, paramDto); } } - public Integer createThread(Integer methodIndex, ScreenJobMonthDataParamDTO paramDto){ + public Integer createThread(Integer methodIndex, ScreenJobBasicDataParamDTO paramDto){ Future future = service.submit(new Callable() { @Override public Integer call() throws Exception { Thread.sleep(200); if (methodIndex == 0) { - quantityGridMonthly(paramDto.getGridMonthDataMonthId()); + customerAgency(); } else if (methodIndex == 1){ - quantityOrgMonthly(paramDto.getOrgMonthDataMonthId()); - }else if (methodIndex == 2){ - //004、党建引领-先进排行榜单-先进支部排行 -- - customerOrgrankdata(paramDto.getCustomerOrgRankDataMonthId()); - }else if (methodIndex == 3){ - //007、基层治理-公众参与 -- - customerUserjoin(paramDto.getCustomerUserJoinMonthId()); - }else if (methodIndex == 4){ - //009、基层治理-治理能力数据 -- - customerGovernrankdata(paramDto.getCustomerGovernRankData()); + customerGrid(); + } else if (methodIndex == 2){ + customerDept(); } - customerAgency(); - customerGrid(); - customerDept(); return 0; } }); @@ -77,7 +69,6 @@ public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { } return isSuccess; } - /** * 014、组织层级 * @@ -92,41 +83,7 @@ public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { analysisFeignClient.customerAgency(); logger.info("<" + methodName + "|组织层级上传>定时任务执行结束"); } - /** - * @describe: 【事件/项目分析】网格内月度数量统计 - * @author wangtong - * @date 2021/2/24 13:57 - * @params [] - * @return void - * @param gridMonthDataMonthId - */ - private void quantityGridMonthly(String gridMonthDataMonthId) { - ScreenJobFormDTO formDto = new ScreenJobFormDTO(); - formDto.setYearMonth(gridMonthDataMonthId); - // 方法名 - String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); - logger.info("<" + methodName + "|【事件/项目分析】网格内月度数量统计>定时任务开始执行"); - analysisFeignClient.quantityGridMonthly(formDto); - logger.info("<" + methodName + "|【事件/项目分析】网格内月度数量统计>定时任务执行结束"); - } - /** - * @describe: 【事件/项目分析】组织内月度数量统计 - * @author wangtong - * @date 2021/2/24 13:57 - * @params [] - * @return void - * @param orgMonthDataMonthId - */ - private void quantityOrgMonthly(String orgMonthDataMonthId) { - ScreenJobFormDTO formDto = new ScreenJobFormDTO(); - formDto.setYearMonth(orgMonthDataMonthId); - // 方法名 - String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); - logger.info("<" + methodName + "|事件/项目分析】组织内月度数量统计>定时任务开始执行"); - analysisFeignClient.quantityOrgMonthly(formDto); - logger.info("<" + methodName + "|事件/项目分析】组织内月度数量统计>定时任务执行结束"); - } /** * 015、网格信息上传 * @@ -156,59 +113,4 @@ public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { analysisFeignClient.customerDept(); logger.info("<" + methodName + "|部门信息上传>定时任务执行结束"); } - - /** - * 004、党建引领-先进排行榜单-先进支部排行 - * - * @return void - * @author WK - * @since 2020/9/17 14:01 - * @param customerOrgRankDataMonthId - */ - private void customerOrgrankdata(String customerOrgRankDataMonthId) { - ScreenJobFormDTO formDto = new ScreenJobFormDTO(); - formDto.setYearMonth(customerOrgRankDataMonthId); - // 方法名 - String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); - logger.info("<" + methodName + "|党建引领-先进排行榜单-先进支部排行>定时任务开始执行"); - analysisFeignClient.orgrankdata(formDto); - logger.info("<" + methodName + "|党建引领-先进排行榜单-先进支部排行>定时任务执行结束"); - } - - /** - * 007、基层治理-公众参与 - * - * @return void - * @author WK - * @since 2020/9/17 14:01 - * @param customerUserJoinMonthId - */ - private void customerUserjoin(String customerUserJoinMonthId) { - ScreenJobFormDTO formDto = new ScreenJobFormDTO(); - formDto.setYearMonth(customerUserJoinMonthId); - // 方法名 - String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); - logger.info("<" + methodName + "|基层治理-公众参与>定时任务开始执行"); - analysisFeignClient.userjoin(formDto); - logger.info("<" + methodName + "|基层治理-公众参与>定时任务执行结束"); - } - - - /** - * 009、基层治理-治理能力数据 - * - * @return void - * @author WK - * @since 2020/9/17 14:01 - * @param customerGovernRankData - */ - private void customerGovernrankdata(String customerGovernRankData) { - ScreenJobFormDTO formDto = new ScreenJobFormDTO(); - formDto.setYearMonth(customerGovernRankData); - // 方法名 - String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); - logger.info("<" + methodName + "|基层治理-治理能力数据>定时任务开始执行"); - analysisFeignClient.governrankdata(formDto); - logger.info("<" + methodName + "|基层治理-治理能力数据>定时任务执行结束"); - } }