Commit 81705c24 authored by 廖旭伟's avatar 廖旭伟

优化每日考勤导出

parent 429d5e1e
...@@ -108,9 +108,21 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -108,9 +108,21 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
throw new AppException("每日数据正在导出中,请稍后再试!"); throw new AppException("每日数据正在导出中,请稍后再试!");
} }
cacheService.set(RedisCacheKeys.getRecordExportLockKey(), "111", 120L); cacheService.set(RedisCacheKeys.getRecordExportLockKey(), "111", 120L);
if (query.getGroupId() != null) {
query.setAttendanceGroupId(query.getGroupId());
}
query.setOrderColList(Arrays.asList(new OrderCol("attendanceDate", OrderCol.DESCENDING), new OrderCol("staffName", OrderCol.DESCENDING))); if (ObjectUtils.isEmpty(query.getAttendanceDateStart())) {
query.setAttendanceDateStart(DateUtil.today());
query.setAttendanceDateEnd(DateUtil.today());
}
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("attendanceDate", OrderCol.DESCENDING), new OrderCol("staffName", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("attendanceDate", OrderCol.DESCENDING));
// query.getOrderColList().add(new OrderCol("staffName", OrderCol.DESCENDING));
}
if (!ObjectUtils.isEmpty(query.getProperties())) { if (!ObjectUtils.isEmpty(query.getProperties())) {
/* //通过属性转换为注解 /* //通过属性转换为注解
......
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