|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
package com.shxy.xymanager_common.model;
|
|
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.dto.ScheduleDetailsDto;
|
|
|
|
|
import com.shxy.xymanager_common.util.DateUtil;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -16,15 +16,31 @@ public class StatPreset {
|
|
|
|
|
List<Date> timeList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
public void addPhoto(TerminalPhotoSelectListModel.PhotoBean photo) {
|
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
|
|
calendar.setTime(photo.getPhotoTime());
|
|
|
|
|
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
|
|
|
|
int minute = calendar.get(Calendar.MINUTE);
|
|
|
|
|
minute = hour * 60 + minute;
|
|
|
|
|
for (ScheduleDetailsDto detail : scheduleList) {
|
|
|
|
|
if (detail.match(minute, delay)) {
|
|
|
|
|
detail.getTimeList().add(photo.getPhotoTime());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
timeList.add(photo.getPhotoTime());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getTotal() {
|
|
|
|
|
public int getRedundant() {
|
|
|
|
|
return timeList.size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getWrongCount() {
|
|
|
|
|
int count = 0;
|
|
|
|
|
for (ScheduleDetailsDto detail : scheduleList) {
|
|
|
|
|
if (detail.isWrong()) {
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|