|
|
@ -2,6 +2,8 @@ package com.elink.esua.epdc.task.screen; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.elink.esua.epdc.dto.ScreenJobBasicDataParamDTO; |
|
|
|
import com.elink.esua.epdc.dto.ScreenJobMonthDataParamDTO; |
|
|
|
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; |
|
|
@ -33,26 +35,33 @@ public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { |
|
|
|
@Override |
|
|
|
public void run(String param) { |
|
|
|
// 参数处理
|
|
|
|
ScreenJobBasicDataParamDTO paramDto = new ScreenJobBasicDataParamDTO(); |
|
|
|
ScreenJobMonthDataParamDTO paramDto = new ScreenJobMonthDataParamDTO(); |
|
|
|
if (StringUtils.isNotEmpty(param)) { |
|
|
|
paramDto = JSONObject.parseObject(param, ScreenJobBasicDataParamDTO.class); |
|
|
|
paramDto = JSONObject.parseObject(param, ScreenJobMonthDataParamDTO.class); |
|
|
|
} |
|
|
|
for(int i = 0 ; i < 3 ; i++){ |
|
|
|
createThread(i, paramDto); |
|
|
|
for(int i = 0 ; i < 5 ; i++){ |
|
|
|
createThread(i,paramDto); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Integer createThread(Integer methodIndex, ScreenJobBasicDataParamDTO paramDto){ |
|
|
|
public Integer createThread(Integer methodIndex, ScreenJobMonthDataParamDTO paramDto){ |
|
|
|
Future<Integer> future = service.submit(new Callable<Integer>() { |
|
|
|
@Override |
|
|
|
public Integer call() throws Exception { |
|
|
|
Thread.sleep(200); |
|
|
|
if (methodIndex == 0) { |
|
|
|
customerAgency(); |
|
|
|
quantityGridMonthly(paramDto.getGridMonthDataMonthId()); |
|
|
|
} else if (methodIndex == 1){ |
|
|
|
customerGrid(); |
|
|
|
} else if (methodIndex == 2){ |
|
|
|
customerDept(); |
|
|
|
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()); |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
@ -80,7 +89,41 @@ 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、网格信息上传 |
|
|
|
* |
|
|
@ -110,4 +153,59 @@ 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 + "|基层治理-治理能力数据>定时任务执行结束"); |
|
|
|
} |
|
|
|
} |
|
|
|