Commit 50826fb2 authored by 姬鋆屾's avatar 姬鋆屾
parents deaa8e0d da1ce3ed
......@@ -721,7 +721,7 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
@Override
public void buildCustomHikRecord(AttendanceRecordHikQuery recordHikQuery, Context context) {
Set<Long> attendStaffSet = this.find(recordHikQuery).stream().map(i -> i.getStaffId()).distinct().collect(Collectors.toSet());
Set<Long> attendStaffSet = this.find(recordHikQuery).stream().map(i -> i.getStaffId()).collect(Collectors.toSet());
Map<Long, List<AttendanceGroupStaffEntity>> groupStaffCollect = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery()).stream().collect(Collectors.groupingBy(x -> x.getGroupId()));
Iterator<Map.Entry<Long, List<AttendanceGroupStaffEntity>>> iterator = groupStaffCollect.entrySet().iterator();
while (iterator.hasNext()) {
......@@ -759,7 +759,6 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
StaffEntity staffCache = staffService.getCache(staffId.toString());
if (!ObjectUtils.isEmpty(staffCache) && StaffSatusEnum.离职.getValue() != staffCache.getStatus()) {
//构建考勤记录 判断当前人是否离职,如果非离职 构建记录
AttendanceRecordHikEntity recordHikEntity = new AttendanceRecordHikEntity();
recordHikEntity.initAttrValue();
recordHikEntity.setStaffId(staffCache.getId());
......@@ -772,10 +771,10 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
recordHikEntity.setPositionId(staffCache.getPositionId());
recordHikEntity.setPositionName(staffCache.getPositionName());
recordHikEntity.setAttendanceGroupId(groupId);
recordHikEntity.setAttendanceDate(DateUtil.parseDate(DateUtil.today()).toJdkDate());
recordHikEntity.setAttendanceDate(DateUtil.parseDate(recordHikQuery.getAttendanceDateStart()).toJdkDate());
recordHikEntity.setAttendanceAddress("自定义地点");
recordHikEntity.setEventSource("当日未有记录虚增考勤记录!");
recordHikEntity.setCreateTime(new Date());
recordHikEntity.setCreateTime((DateUtil.parseDate(recordHikQuery.getAttendanceDateStart()).toJdkDate()));
recordHikEntity.setCreateUserId(1L);
try {
this.getDao().insert(recordHikEntity);
......
......@@ -52,8 +52,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2023-12-31"
"attendanceDateStart":"2023-12-20",
"attendanceDateEnd":"2023-12-20"
}
......
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