Commit e37ec907 by ilal

提交

parent 3d9c3db7
...@@ -120,7 +120,8 @@ public class AttendanceTaskTiming{ ...@@ -120,7 +120,8 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
@Scheduled(cron = "0 0 19 * * ?") // @Scheduled(cron = "0 47 8 * * ?")
@Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -156,7 +157,8 @@ public class AttendanceTaskTiming{ ...@@ -156,7 +157,8 @@ public class AttendanceTaskTiming{
String str = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString();// String str = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString();//
String ttstr = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();// String ttstr = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();//
String yesterday = ClockInTool.requires_extra_times(str,-1,3,1);//前一天 // String yesterday = ClockInTool.requires_extra_times(str,-1,3,1);//前一天
String yesterday = str;
String[] rangeArray=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),yesterday)).split(";");//目前为止所有日期 String[] rangeArray=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),yesterday)).split(";");//目前为止所有日期
String[] range=rangeArray[0].split(","); String[] range=rangeArray[0].split(",");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment