You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-ningbojinghua/interface/FormatDingTalkSignTime.jsp

36 lines
1.7 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ page import="weaver.common.DateUtil" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="com.engine.kq.biz.KQFormatData" %>
<%@ page import="weaver.general.Util" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%
RecordSet rs1 = new RecordSet();
rs1.writeLog("begin do FormatDingTalkSignTime invoke ...");
try {
// 当前日期
String today = DateUtil.getCurrentDate();
String startDate = "2024-03-01";
// 格式化期间的考勤时间
rs1.writeLog("开始处理时间格式,处理范围【" + startDate + "到" + today + "】");
rs1.executeUpdate("update hrmschedulesign set signtime = left(signtime, 5) + ':00' where belongdate >= '" + startDate + "' and belongdate <= '" + today + "'");
rs1.writeLog("结束处理时间格式,处理范围【" + startDate + "到" + today + "】");
// 处理当前日期到2024-03-01的考勤数据
for (String date = startDate; DateUtil.timeInterval(date, today) >= 0; date = DateUtil.addDate(date, 1)) {
String sql = "select id from hrmresource where status in (0,1,2,3)";
rs1.execute(sql);
while (rs1.next()) {
String resourceId = Util.null2String(rs1.getString("id"));
rs1.writeLog("KQFormatData当前人员Id==" + resourceId);
for (int i = 0; i < 22; i++) {
new KQFormatData().formatKqDate(resourceId, DateUtil.addDate(date, i));
}
}
}
rs1.writeLog("end do FormatDingTalkSignTime invoke ...");
} catch (Exception e) {
rs1.writeLog("考勤格式化异常", e);
}
out.println("数据处理完成...");
%>