|
|
@ -42,43 +42,43 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
|
|
|
|
@Override |
|
|
|
public void run(String param) { |
|
|
|
for(int i = 0 ; i < 11 ; i++){ |
|
|
|
for (int i = 0; i < 11; i++) { |
|
|
|
createThread(i); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Integer createThread(Integer methodIndex){ |
|
|
|
public Integer createThread(Integer methodIndex) { |
|
|
|
Future<Integer> future = service.submit(new Callable<Integer>() { |
|
|
|
@Override |
|
|
|
public Integer call() throws Exception { |
|
|
|
Thread.sleep(200); |
|
|
|
if (methodIndex == 0) { |
|
|
|
projectGridDaily(); |
|
|
|
} else if (methodIndex == 1){ |
|
|
|
} else if (methodIndex == 1) { |
|
|
|
projectOrgDaily(); |
|
|
|
}else if (methodIndex == 2){ |
|
|
|
} else if (methodIndex == 2) { |
|
|
|
uploadProjectInfo(); |
|
|
|
} else if (methodIndex == 3){ |
|
|
|
} else if (methodIndex == 3) { |
|
|
|
uploadProjectProcess(); |
|
|
|
}else if (methodIndex == 4){ |
|
|
|
} else if (methodIndex == 4) { |
|
|
|
//001、基层党建-党员基本情况
|
|
|
|
customerCpcbasedata(); |
|
|
|
}else if (methodIndex == 5){ |
|
|
|
} else if (methodIndex == 5) { |
|
|
|
//002、党建引领-先锋模范数据
|
|
|
|
customerPioneerdata(); |
|
|
|
}else if (methodIndex == 6){ |
|
|
|
} else if (methodIndex == 6) { |
|
|
|
//003、党建引领-党员联系群众数据
|
|
|
|
customerPartylinkmassesdata(); |
|
|
|
}else if (methodIndex == 7){ |
|
|
|
} else if (methodIndex == 7) { |
|
|
|
//005、党建引领|基层治理-居民(党员)积分排行榜
|
|
|
|
customerPartyuserrankdata(); |
|
|
|
}else if (methodIndex == 8){ |
|
|
|
} else if (methodIndex == 8) { |
|
|
|
//006、基层治理-难点赌点项目上报
|
|
|
|
customerDifficultydata(); |
|
|
|
}else if (methodIndex == 9){ |
|
|
|
} else if (methodIndex == 9) { |
|
|
|
// 008、公众参与各类总数
|
|
|
|
customerPublicpartitotaldata(); |
|
|
|
}else if (methodIndex == 10){ |
|
|
|
} else if (methodIndex == 10) { |
|
|
|
// 010、中央区各类总数
|
|
|
|
// customerUsertotaldata();
|
|
|
|
} |
|
|
@ -88,39 +88,40 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
Integer isSuccess = 0; |
|
|
|
try { |
|
|
|
isSuccess = future.get(); |
|
|
|
}catch (Exception e){ |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return isSuccess; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 项目信息上报 |
|
|
|
* @return void |
|
|
|
* @Description 项目信息上报 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2021/2/24 |
|
|
|
* @Date 2021/2/24 |
|
|
|
* @Param [] |
|
|
|
* @return void |
|
|
|
**/ |
|
|
|
private void uploadProjectInfo() { |
|
|
|
// 方法名
|
|
|
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
|
|
|
logger.info("<" + methodName + "|项目信息上报>定时任务开始执行"); |
|
|
|
//获取上次统计时间
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
param.put("JOB_NAME","uploadProjectInfo"); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("JOB_NAME", "uploadProjectInfo"); |
|
|
|
List<ScreenRecordEntity> screenRecordEntities = screenRecordDao.selectByMap(param); |
|
|
|
ScreenRecordEntity screenRecordEntity = new ScreenRecordEntity(); |
|
|
|
ScreenProjectFormDTO screenProjectFormDTO = new ScreenProjectFormDTO(); |
|
|
|
if(screenRecordEntities==null || screenRecordEntities.size()==0){ |
|
|
|
if (screenRecordEntities == null || screenRecordEntities.size() == 0) { |
|
|
|
screenProjectFormDTO.setYearMonthDay("2020-01-01"); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
screenRecordEntity = screenRecordEntities.get(0); |
|
|
|
screenProjectFormDTO.setYearMonthDay(DateUtils.format(screenRecordEntity.getStatisticsTime(), DateUtils.DATE_PATTERN)); |
|
|
|
} |
|
|
|
//记录此次统计时间 并更新时间或者新增
|
|
|
|
screenRecordEntity.setStatisticsTime(DateUtils.addDateDays(new Date(),-1)); |
|
|
|
if(StringUtils.isNotBlank(screenRecordEntity.getId())){ |
|
|
|
screenRecordEntity.setStatisticsTime(DateUtils.addDateDays(new Date(), -1)); |
|
|
|
if (StringUtils.isNotBlank(screenRecordEntity.getId())) { |
|
|
|
screenRecordDao.updateById(screenRecordEntity); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
screenRecordEntity.setJobName("uploadProjectInfo"); |
|
|
|
screenRecordDao.insert(screenRecordEntity); |
|
|
|
} |
|
|
@ -129,33 +130,33 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 项目处理流程信息上报 |
|
|
|
* @return void |
|
|
|
* @Description 项目处理流程信息上报 |
|
|
|
* @Author songyunpeng |
|
|
|
* @Date 2021/2/24 |
|
|
|
* @Date 2021/2/24 |
|
|
|
* @Param [] |
|
|
|
* @return void |
|
|
|
**/ |
|
|
|
private void uploadProjectProcess() { |
|
|
|
// 方法名
|
|
|
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
|
|
|
logger.info("<" + methodName + "|项目处理流程信息上报>定时任务开始执行"); |
|
|
|
//获取上次统计时间
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
param.put("JOB_NAME","uploadProjectProcess"); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
param.put("JOB_NAME", "uploadProjectProcess"); |
|
|
|
List<ScreenRecordEntity> screenRecordEntities = screenRecordDao.selectByMap(param); |
|
|
|
ScreenRecordEntity screenRecordEntity = new ScreenRecordEntity(); |
|
|
|
ScreenProjectFormDTO screenProjectFormDTO = new ScreenProjectFormDTO(); |
|
|
|
if(screenRecordEntities==null || screenRecordEntities.size()==0){ |
|
|
|
if (screenRecordEntities == null || screenRecordEntities.size() == 0) { |
|
|
|
screenProjectFormDTO.setYearMonthDay("2020-01-01"); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
screenRecordEntity = screenRecordEntities.get(0); |
|
|
|
screenProjectFormDTO.setYearMonthDay(DateUtils.format(screenRecordEntity.getStatisticsTime(), DateUtils.DATE_PATTERN)); |
|
|
|
} |
|
|
|
//记录此次统计时间 并更新时间或者新增
|
|
|
|
screenRecordEntity.setStatisticsTime(DateUtils.addDateDays(new Date(),-1)); |
|
|
|
if(StringUtils.isNotBlank(screenRecordEntity.getId())){ |
|
|
|
screenRecordEntity.setStatisticsTime(DateUtils.addDateDays(new Date(), -1)); |
|
|
|
if (StringUtils.isNotBlank(screenRecordEntity.getId())) { |
|
|
|
screenRecordDao.updateById(screenRecordEntity); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
screenRecordEntity.setJobName("uploadProjectProcess"); |
|
|
|
screenRecordDao.insert(screenRecordEntity); |
|
|
|
} |
|
|
@ -164,12 +165,12 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @describe: 【事件/项目分析】网格内事件 |
|
|
|
* @author wangtong |
|
|
|
* @date 2021/2/24 13:57 |
|
|
|
* @params [] |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
* @return void |
|
|
|
* @describe: 【事件/项目分析】网格内事件 |
|
|
|
* @author wangtong |
|
|
|
* @date 2021/2/24 13:57 |
|
|
|
* @params [] |
|
|
|
*/ |
|
|
|
private void projectGridDaily() { |
|
|
|
// 方法名
|
|
|
|
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); |
|
|
@ -180,11 +181,11 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return void |
|
|
|
* @describe: 【事件/项目分析】组织内事件 |
|
|
|
* @author wangtong |
|
|
|
* @date 2021/2/24 13:57 |
|
|
|
* @params [] |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
private void projectOrgDaily() { |
|
|
|
// 方法名
|
|
|
@ -225,7 +226,6 @@ public class ScreenProjectDataPushDayTaskImpl implements ScreenProjectDataMonthP |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 006、基层治理-难点赌点项目上报 |
|
|
|
* |
|
|
|