Commit bca80897 authored by 赵啸非's avatar 赵啸非

添加用户钉钉主动拉取请假记录

parent 8f21fc49
......@@ -53,16 +53,16 @@ public class AddAttendThread implements Runnable {
Long compare = DateUtil.between(attendEnd, attendStart, DateUnit.DAY);
StopWatch stopWatch = new StopWatch("stopwatch attend");
log.info("考勤计算天数区间:{}", compare);
stopWatch.start("执行本地方法");
for (int i = 0; i <= compare.intValue(); i++) {
DateTime curDate = DateUtil.offsetDay(attendStart, i);
log.info("考勤计算日期:{}", curDate.toDateStr());
stopWatch.start("执行本地方法");
//log.info("考勤计算日期:{}", curDate.toDateStr());
hikEntity.setAttendanceDateStart(curDate.toDateStr());
hikEntity.setAttendanceDateEnd(curDate.toDateStr());
hikService.addAttendanceRecordByQuery(hikEntity, context);
stopWatch.stop();
log.info("考勤计算日期:{} 完成,耗时:{}ms", curDate.toDateStr(), stopWatch.getLastTaskTimeMillis());
}
stopWatch.stop();
log.info("完成,耗时:{}ms", stopWatch.getLastTaskTimeMillis());
//生成汇总信息
log.info("生成考勤汇总消息开始。。。");
AttendanceSummaryQuery query = new AttendanceSummaryQuery();
......
......@@ -127,7 +127,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
AttendanceRecordHikQuery attendanceRecordHikQuery = new AttendanceRecordHikQuery();
attendanceRecordHikQuery.setStaffId(entity.getLeavePersonId());
//判断请假的开始日期与结束日期
boolean in = DateUtil.isIn(new Date(), entity.getEndTime(), new Date());
boolean in = DateUtil.isIn(new Date(), entity.getStartTime(),entity.getEndTime());
if (in) {
//当前日期在请假期间,计算考勤结束时间为当前时间;
attendanceRecordHikQuery.setAttendanceDateStart(DateUtil.formatDate(entity.getStartTime()));
......
......@@ -110,7 +110,7 @@ Content-Type: application/json
{
"startTimeStart":"2023-11-01",
"endTimeEnd":"2023-11-01"
"endTimeEnd":"2023-11-10"
}
......
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