Commit 492cbe44 authored by 赵啸非's avatar 赵啸非

修改 请假记录 每人考勤显示

parent e77f992e
...@@ -122,6 +122,20 @@ public abstract class AttendanceWorkAbstract { ...@@ -122,6 +122,20 @@ public abstract class AttendanceWorkAbstract {
} }
protected Long getWeekWorkDayClassId(AttendanceGroupFixedworkEntity attendanceGroupFixedworkEntity, String week) {
Long weekClassId = -1L;
switch (week) {
case "星期六":
weekClassId = attendanceGroupFixedworkEntity.getSaturdayClassId();
break;
case "星期日":
weekClassId = attendanceGroupFixedworkEntity.getSundayClassId();
break;
}
return weekClassId;
}
public AttendanceWorkAbstract(int type) { public AttendanceWorkAbstract(int type) {
this.type = type; this.type = type;
......
...@@ -98,6 +98,9 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -98,6 +98,9 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
if (!checkWorkByHoliday) { if (!checkWorkByHoliday) {
// log.info("当前日期不在考勤时间范围内,不做处理!"); // log.info("当前日期不在考勤时间范围内,不做处理!");
return; return;
}else{
//工作日要上班 获取配置的周六 周日班次 默认周一
weekClassId=this.getWeekClassId(attendanceGroupFixedworkEntity, "星期一");
} }
} else { } else {
if (checkHolidayByWorkDay) { if (checkHolidayByWorkDay) {
......
...@@ -66,8 +66,6 @@ import java.util.stream.Collectors; ...@@ -66,8 +66,6 @@ import java.util.stream.Collectors;
@RequestMapping("attendance/record") @RequestMapping("attendance/record")
public class AttendanceRecordController extends BaseCRUDJsonBodyMappingController<AttendanceRecordService, AttendanceRecordEntity, Long> { public class AttendanceRecordController extends BaseCRUDJsonBodyMappingController<AttendanceRecordService, AttendanceRecordEntity, Long> {
@Autowired
private ParamService paramService;
@Autowired @Autowired
private UploadService uploadService; private UploadService uploadService;
...@@ -80,8 +78,6 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -80,8 +78,6 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
@Autowired @Autowired
private AttendanceClassService attendanceClassService; private AttendanceClassService attendanceClassService;
@Autowired @Autowired
private StaffService staffService;
@Autowired
private AttendanceExportRecordService attendanceExportRecordService; private AttendanceExportRecordService attendanceExportRecordService;
@Autowired @Autowired
private AttendanceGroupService groupService; private AttendanceGroupService groupService;
...@@ -371,37 +367,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle ...@@ -371,37 +367,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
.filter(distinctByKey(f -> f.getOrderNum())) .filter(distinctByKey(f -> f.getOrderNum()))
.sorted(Comparator.comparingInt(AttendanceRecordDetailEntity::getOrderNum)) .sorted(Comparator.comparingInt(AttendanceRecordDetailEntity::getOrderNum))
.collect(Collectors.toList()); .collect(Collectors.toList());
//list.parallelStream().collect(Collectors.groupingBy())
List<AttDsyncColumn> dsyncColumns = new ArrayList<>(); List<AttDsyncColumn> dsyncColumns = new ArrayList<>();
/* for (int i = 1; i <= collect.size(); i++) {
AttDsyncColumn attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡时间", i));
attDsyncColumn.setProperty("goWorkDate");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡结果", i));
attDsyncColumn.setProperty("goWorkResult");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("下班%s打卡时间", i));
attDsyncColumn.setProperty("offWorkDate");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("下班%s打卡结果",i));
attDsyncColumn.setProperty("offWorkResult");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
}*/
collect.forEach(item -> { collect.forEach(item -> {
AttDsyncColumn attDsyncColumn = new AttDsyncColumn(); AttDsyncColumn attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡时间", item.getOrderNum())); attDsyncColumn.setName(String.format("上班%s打卡时间", item.getOrderNum()));
......
...@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord ...@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json Content-Type: application/json
{ {
"attendanceDateStart": "2024-03-01", "attendanceDateStart": "2024-05-11",
"attendanceDateEnd": "2024-03-31" "attendanceDateEnd": "2024-05-11"
} }
###海康考勤打卡记录计算1 ###海康考勤打卡记录计算1
...@@ -46,8 +46,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord ...@@ -46,8 +46,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json Content-Type: application/json
{ {
"attendanceDateStart": "2023-12-04", "attendanceDateStart": "2024-05-11",
"attendanceDateEnd": "2023-12-08", "attendanceDateEnd": "2024-05-11",
"staffId": 322 "staffId": 322
} }
......
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