|
@@ -482,14 +482,15 @@ public class ClockRecordServiceImpl implements IClockRecordService {
|
|
|
public AjaxResult details(ClockRecord clockRecord) {
|
|
|
List<Map<String, Object>> listMap = new ArrayList<>();
|
|
|
//查询人员打卡数据
|
|
|
- List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
|
|
|
+ clockRecord.setRecordDate(clockRecord.getRecordDate()+"-01");
|
|
|
+ List<ClockRecord> clockRecords = clockRecordMapper.selectOrderFoodListRl(clockRecord);
|
|
|
//按日期分类
|
|
|
Map<String, List<ClockRecord>> clockTime = new HashMap<>();
|
|
|
if (clockRecords != null && clockRecords.size() > 0) {
|
|
|
clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
|
|
|
}
|
|
|
//查询传入两个日期的所有日期
|
|
|
- List<Date> dayList = DateUtils.getDatesBetween(clockRecord.getStartTime(), clockRecord.getEndTime());
|
|
|
+ List<String> dayList = DateUtils.getDay(DateUtils.parseDate(clockRecord.getRecordDate()));
|
|
|
//查询本年度所有节假日时间
|
|
|
ClockHolidays clockHoliday = new ClockHolidays();
|
|
|
clockHoliday.setYear(DateUtils.getYear());
|
|
@@ -504,20 +505,19 @@ public class ClockRecordServiceImpl implements IClockRecordService {
|
|
|
bbList.add(clockHolidays.getHolidayDate());
|
|
|
}
|
|
|
}
|
|
|
- for (Date day : dayList) {
|
|
|
+ for (String day : dayList) {
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- boolean bl = (DateUtils.dayForWeek(format.format(day))==6 || DateUtils.dayForWeek(format.format(day))==7);
|
|
|
- if(jjrList.contains(format.format(day)) || (bl && !bbList.contains(format.format(day)))){
|
|
|
+ boolean bl = (DateUtils.dayForWeek(day)==6 || DateUtils.dayForWeek(day)==7);
|
|
|
+ if(jjrList.contains(day) || (bl && !bbList.contains(day))){
|
|
|
continue;
|
|
|
}
|
|
|
- List<ClockRecord> clockRecordList = clockTime.get(format.format(day));
|
|
|
+ List<ClockRecord> clockRecordList = clockTime.get(day);
|
|
|
if(clockRecordList==null || clockRecordList.size()<=0){
|
|
|
- resultMap.put("time",format.format(day));
|
|
|
+ resultMap.put("time",day);
|
|
|
resultMap.put("details","全天未打卡");
|
|
|
listMap.add(resultMap);
|
|
|
}else{
|
|
|
- resultMap.put("time",format.format(day));
|
|
|
+ resultMap.put("time",day);
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
if(clockRecordList.size()>2){
|
|
|
if ("1".equals(clockRecordList.get(0).getType())) {
|