From 4a1213d429acb4a1d2bc224653a5780d923584bb Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Mon, 9 Dec 2024 17:19:56 +0800 Subject: [PATCH] =?UTF-8?q?com.engine.kq=20=E6=97=A0=E9=9C=80=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=A4=87=E6=A1=88=20=E5=B1=9E=E4=BA=8E=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=96=87=E4=BB=B6=20=E4=B8=80=E6=AC=A1=E6=80=A7?= =?UTF-8?q?=E9=9C=80=E6=B1=82=20#3416012#=20=E8=A1=A5=E5=85=85=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E5=BC=82=E5=B8=B8=E6=8F=90=E9=86=922024.12.01=20-=202?= =?UTF-8?q?024.12.08=20=E4=B9=8B=E9=97=B4=E6=9C=AA=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E4=B8=A2=E5=A4=B1=E7=9A=84=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kq/biz/KQYesterdayAbnormalRemindJob.java | 5 +++++ src/test/MainTest.java | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/com/engine/kq/biz/KQYesterdayAbnormalRemindJob.java b/src/com/engine/kq/biz/KQYesterdayAbnormalRemindJob.java index b792afc..c79a2cf 100644 --- a/src/com/engine/kq/biz/KQYesterdayAbnormalRemindJob.java +++ b/src/com/engine/kq/biz/KQYesterdayAbnormalRemindJob.java @@ -32,8 +32,13 @@ public class KQYesterdayAbnormalRemindJob extends BaseCronJob { kqLog.info(">>>>>>>>>>>>>>>>KQYesterdayAbnormalRemindJob>>>>>>>>>>>>>>begin>>>>>>>>>>>>>>>>"); handleKqRemind(yesterDay); kqLog.info(">>>>>>>>>>>>>>>>KQYesterdayAbnormalRemindJob>>>>>>>>>>>>>>end>>>>>>>>>>>>>>>>"); + + // 一次性需求 #3416012# 补充考勤异常提醒2024.12.01 - 2024.12.08 之间未开启开关丢失的提醒 +// List supDates = Arrays.asList("2024-12-01","2024-12-02","2024-12-03","2024-12-04","2024-12-05","2024-12-06","2024-12-07","2024-12-08"); +// supDates.forEach(date -> handleKqRemind(date)); } + private void handleKqRemind(String date) { try { ResourceComInfo resourceComInfo = new ResourceComInfo(); diff --git a/src/test/MainTest.java b/src/test/MainTest.java index d85183b..d53a978 100644 --- a/src/test/MainTest.java +++ b/src/test/MainTest.java @@ -1,5 +1,8 @@ package test; +import weaver.common.DateUtil; +import weaver.hrm.common.Tools; + import java.time.LocalDate; import java.time.Period; import java.time.format.DateTimeFormatter; @@ -13,14 +16,8 @@ import java.time.format.DateTimeFormatter; public class MainTest { public static void main(String[] args) { - String birthDateString = "1997-11-09"; - // 定义日期格式 - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - // 解析生日字符串为 LocalDate 对象 - LocalDate birthDate = LocalDate.parse(birthDateString, formatter); - // 获取当前日期 - LocalDate currentDate = LocalDate.now(); - // 计算年龄 - System.out.println(Period.between(birthDate, currentDate).getYears()); + String currentDate = Tools.getCurrentDate(); + String yesterDay = DateUtil.addDate(currentDate, -1); + System.out.println(yesterDay); } }