|
@ -29,12 +29,13 @@ import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
* Created by Administrator on 2016.10.31.
|
|
|
* 每天的报表任务
|
|
|
*/
|
|
|
@Component
|
|
|
@Scope("prototype")
|
|
|
public class ReportAllLogJob implements Job {
|
|
|
public static String jobKey="Report_All_LOG_JOB";
|
|
|
public static String cron="*/5 * * * * ?";
|
|
|
public static String cron="0 55 0 * * ?";
|
|
|
|
|
|
@Autowired
|
|
|
private StringRedisTemplate redisTemplate;
|
|
@ -90,7 +91,7 @@ public class ReportAllLogJob implements Job {
|
|
|
count=jdbcTemplate.queryForObject(sqlCount,Integer.class);
|
|
|
sb.append("<tr><td>截止到"+date+" 的未缴费数</td><td>"+count+"个</td></tr>");
|
|
|
//今天实时统计执行的次数
|
|
|
sqlCount= " select count(a.id) from wlyy_job_log a where a.job_id=11 and a.job_start_time>= '"+getYesterday(-1)+ " 00:00:00'and a.job_start_time<= '"+getYesterday(-1)+" 00:00:00 '";
|
|
|
sqlCount= " select count(a.id) from wlyy_job_log a where a.job_id=11 and a.job_start_time>= '"+getYesterday(-1)+ " 00:00:00'and a.job_start_time<= '"+getYesterday(-1)+" 23:59:59 '";
|
|
|
count=jdbcTemplate.queryForObject(sqlCount,Integer.class);
|
|
|
sb.append("<tr><td>"+date+" 实时统计执行的次数</td><td>"+count+"次</td></tr>");
|
|
|
sb.append("<tr><td>最近执行的实时统计的时间:</td><td>"+DateUtil.dateToStrLong(new Date(Long.valueOf(timeKey)))+"</td></tr>");
|