|
@@ -17,6 +17,7 @@ import java.util.Map;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.qmth.exam.reserve.bean.applytask.CurrentApplyTaskVO;
|
|
import com.qmth.exam.reserve.bean.applytask.CurrentApplyTaskVO;
|
|
|
|
+import com.qmth.exam.reserve.entity.base.BaseEntity;
|
|
import com.qmth.exam.reserve.enums.Role;
|
|
import com.qmth.exam.reserve.enums.Role;
|
|
import com.qmth.exam.reserve.service.*;
|
|
import com.qmth.exam.reserve.service.*;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -74,8 +75,8 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
|
|
|
private final static Logger log = LoggerFactory.getLogger(StudentApplyServiceImpl.class);
|
|
private final static Logger log = LoggerFactory.getLogger(StudentApplyServiceImpl.class);
|
|
|
|
|
|
- private static final String[] EXCEL_HEADER = new String[] { "学号", "姓名", "证件号", "所属教学点", "预约考点1", "预约时段1", "预约考点2",
|
|
|
|
- "预约时段2", "预约考点3", "预约时段3", "预约考点4", "预约时段4" };
|
|
|
|
|
|
+ private static final String[] EXCEL_HEADER = new String[]{"学号", "姓名", "证件号", "所属教学点", "预约考点1", "预约时段1", "预约考点2",
|
|
|
|
+ "预约时段2", "预约考点3", "预约时段3", "预约考点4", "预约时段4"};
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private TimePeriodService timePeriodService;
|
|
private TimePeriodService timePeriodService;
|
|
@@ -192,7 +193,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public List<Map<String, Object>> importPreExam(LoginUser user, Long teachingId, Integer level,
|
|
public List<Map<String, Object>> importPreExam(LoginUser user, Long teachingId, Integer level,
|
|
- InputStream inputStream) {
|
|
|
|
|
|
+ InputStream inputStream) {
|
|
checkOpenTime(user.getOrgId());
|
|
checkOpenTime(user.getOrgId());
|
|
List<DataMap> lineList;
|
|
List<DataMap> lineList;
|
|
ExcelReader reader = ExcelReader.create(ExcelType.XLSX, inputStream, 0);
|
|
ExcelReader reader = ExcelReader.create(ExcelType.XLSX, inputStream, 0);
|
|
@@ -260,7 +261,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
if (user.getRole().equals(Role.TEACHING) && categoryId != null && !categoryId.equals(teachingId)) {
|
|
if (user.getRole().equals(Role.TEACHING) && categoryId != null && !categoryId.equals(teachingId)) {
|
|
msg.append(" 不是本教学点的考生");
|
|
msg.append(" 不是本教学点的考生");
|
|
- }
|
|
|
|
|
|
+ }
|
|
String agentName1 = trimAndNullIfBlank(line.get(EXCEL_HEADER[4]));
|
|
String agentName1 = trimAndNullIfBlank(line.get(EXCEL_HEADER[4]));
|
|
if (StringUtils.isBlank(agentName1)) {
|
|
if (StringUtils.isBlank(agentName1)) {
|
|
msg.append(" 预约考点1不能为空");
|
|
msg.append(" 预约考点1不能为空");
|
|
@@ -416,7 +417,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
Date startTime = new Date(task.getSelfApplyStartTime());
|
|
Date startTime = new Date(task.getSelfApplyStartTime());
|
|
Date endTime = new Date(task.getOpenApplyEndTime());
|
|
Date endTime = new Date(task.getOpenApplyEndTime());
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
- if(now.before(startTime) || now.after(endTime)) {
|
|
|
|
|
|
+ if (now.before(startTime) || now.after(endTime)) {
|
|
throw new StatusException("未到开放时间!");
|
|
throw new StatusException("未到开放时间!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -435,7 +436,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
private void checkAvailableTimePeriod(List<StudentImportVO> applyList) {
|
|
private void checkAvailableTimePeriod(List<StudentImportVO> applyList) {
|
|
for (StudentImportVO vo : applyList) {
|
|
for (StudentImportVO vo : applyList) {
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
- List<StudentApplyEntity> haveApplyList = listStudentApply(vo.getStudentId(), Boolean.FALSE);
|
|
|
|
|
|
+ List<StudentApplyEntity> haveApplyList = listStudentApply(vo.getStudentId());
|
|
int studentApplyFinishCount = cacheService.getStudentApplyFinishCount(vo.getStudentId());
|
|
int studentApplyFinishCount = cacheService.getStudentApplyFinishCount(vo.getStudentId());
|
|
if (studentApplyFinishCount == 0) {
|
|
if (studentApplyFinishCount == 0) {
|
|
studentApplyFinishCount = haveApplyList.size();
|
|
studentApplyFinishCount = haveApplyList.size();
|
|
@@ -465,7 +466,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private List<AgentAndTimeVO> listAvailableTime(List<StudentApplyEntity> haveApplyList,
|
|
private List<AgentAndTimeVO> listAvailableTime(List<StudentApplyEntity> haveApplyList,
|
|
- List<AgentAndTimeVO> agentTimeList) {
|
|
|
|
|
|
+ List<AgentAndTimeVO> agentTimeList) {
|
|
List<AgentAndTimeVO> availableList = new ArrayList<>();
|
|
List<AgentAndTimeVO> availableList = new ArrayList<>();
|
|
for (AgentAndTimeVO time : agentTimeList) {
|
|
for (AgentAndTimeVO time : agentTimeList) {
|
|
boolean flag = false;
|
|
boolean flag = false;
|
|
@@ -483,7 +484,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private void checkStudentApplyTime(List<StudentImportVO> applyList, Integer days,
|
|
private void checkStudentApplyTime(List<StudentImportVO> applyList, Integer days,
|
|
- List<Map<String, Object>> failRecords) {
|
|
|
|
|
|
+ List<Map<String, Object>> failRecords) {
|
|
for (int i = 0; i < applyList.size(); i++) {
|
|
for (int i = 0; i < applyList.size(); i++) {
|
|
StudentImportVO vo = applyList.get(i);
|
|
StudentImportVO vo = applyList.get(i);
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
@@ -517,7 +518,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private List<StudentApplyEntity> saveStdApply(int row, StudentImportVO vo, Long userId,
|
|
private List<StudentApplyEntity> saveStdApply(int row, StudentImportVO vo, Long userId,
|
|
- List<Map<String, Object>> failRecords) {
|
|
|
|
|
|
+ List<Map<String, Object>> failRecords) {
|
|
List<StudentApplyEntity> ApplyList = new ArrayList<>();
|
|
List<StudentApplyEntity> ApplyList = new ArrayList<>();
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, vo.getStudentId());
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, vo.getStudentId());
|
|
@@ -654,61 +655,62 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
@Override
|
|
@Override
|
|
public void autoAssign(Long taskId, Long userId) {
|
|
public void autoAssign(Long taskId, Long userId) {
|
|
checkAfterOpenTime();
|
|
checkAfterOpenTime();
|
|
|
|
+ // 未完成预约的考生
|
|
|
|
+ List<StudentEntity> studentList = studentService.listNoFinishStudent(taskId, Boolean.FALSE);
|
|
|
|
+ Map<Long, List<StudentEntity>> noFinishApplyMap = studentList.stream().collect(Collectors.groupingBy(StudentEntity::getCategoryId));
|
|
|
|
+ // 考位是否充足
|
|
|
|
+ List<TimePeriodEntity> timeList = listTimePeriod(taskId);
|
|
|
|
+ timeList = listNoCancelExamTimePeriod(timeList, taskId);
|
|
|
|
+ if (timeList == null || timeList.isEmpty()) {
|
|
|
|
+ throw new StatusException("可以取消预约的考试时段为0");
|
|
|
|
+ }
|
|
|
|
+ checkTeachingCapacity(noFinishApplyMap, timeList);
|
|
|
|
+ RLock lock = (RLock) concurrentService.getLock(CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
+ if (lock.isLocked()) {
|
|
|
|
+ throw new StatusException("其他老师正在执行自动分配,请不要重复执行!");
|
|
|
|
+ }
|
|
//异步执行
|
|
//异步执行
|
|
- studentAutoAssignService.autoAssign(taskId, userId);
|
|
|
|
-// RLock lock = (RLock) concurrentService.getLock(CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
-// try {
|
|
|
|
-// if (!lock.tryLock()) {
|
|
|
|
-// log.warn("获取锁失败,不允许同时执行自动分配!lockKey:{}", CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
-// throw new StatusException("其他老师正在执行自动分配,请不要重复执行!");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// log.warn("获取锁成功!lockKey:{}", CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
-//
|
|
|
|
-// // 1、未完成预约的考生
|
|
|
|
-// List<StudentEntity> studentList = studentService.listNoFinishStudent(taskId, Boolean.FALSE);
|
|
|
|
-// Map<Long, List<StudentEntity>> noFinishApplyMap = studentList.stream()
|
|
|
|
-// .collect(Collectors.groupingBy(StudentEntity::getCategoryId));
|
|
|
|
-// // 2、考位是否充足
|
|
|
|
-// List<TimePeriodEntity> timeList = listTimePeriod(taskId);
|
|
|
|
-// timeList = listNoCancelExamTimePeriod(timeList, taskId);
|
|
|
|
-// checkTeachingCapacity(noFinishApplyMap, timeList, taskId);
|
|
|
|
-// // 3、按照教学点安排考位。规则:不能和已预约的时间上有冲突
|
|
|
|
-// for (Long key : noFinishApplyMap.keySet()) {
|
|
|
|
-// List<ExamSiteEntity> siteList = listExamSite(key, null);
|
|
|
|
-// List<StudentEntity> teachingStudentList = noFinishApplyMap.get(key);
|
|
|
|
-// for (ExamSiteEntity site : siteList) {
|
|
|
|
-// for (TimePeriodEntity time : timeList) {
|
|
|
|
-// // 该时段已预约的考生
|
|
|
|
-// Integer haveApplyNum = cacheService.getApplyFinishCount(site.getId(), time.getId());
|
|
|
|
-// if (haveApplyNum == 0) {
|
|
|
|
-// haveApplyNum = getHaveApplyNum(site.getId(), time.getId());
|
|
|
|
-// }
|
|
|
|
-// // 剩余的考位
|
|
|
|
-// Integer remainNum = site.getCapacity() - haveApplyNum;
|
|
|
|
-//
|
|
|
|
-// assignStudentApply(userId, site.getId(), time.getId(), teachingStudentList, remainNum);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// // 4、判断是否还有剩余考生未完成预约,提醒考位不够
|
|
|
|
-// if (!teachingStudentList.isEmpty())
|
|
|
|
-// throw new StatusException("【" + categoryService.getById(key).getName() + "】教学点考位不足");
|
|
|
|
-// }
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
-// log.error(e.getMessage());
|
|
|
|
-// throw new StatusException(e.getMessage());
|
|
|
|
-// } finally {
|
|
|
|
-// try {
|
|
|
|
-// // 解锁前检查当前线程是否持有该锁
|
|
|
|
-// if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
|
|
|
-// lock.unlock();
|
|
|
|
-// log.info("解锁成功!lockKey:{}", CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
-// }
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
-// log.warn(e.getMessage());
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ studentAutoAssignService.autoAssign(taskId, userId, timeList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void checkTeachingCapacity(Map<Long, List<StudentEntity>> map, List<TimePeriodEntity> timeList) {
|
|
|
|
+ for (Long key : map.keySet()) {
|
|
|
|
+ List<ExamSiteEntity> siteList = listExamSite(key, null);
|
|
|
|
+ // 总考位数量
|
|
|
|
+ Integer total = siteList.stream().mapToInt(ExamSiteEntity::getCapacity).sum() * timeList.size();
|
|
|
|
+ // 已经预约的数量
|
|
|
|
+ List<Long> examSiteIds = siteList.stream().map(BaseEntity::getId).collect(Collectors.toList());
|
|
|
|
+ List<Long> timePeriodIds = timeList.stream().map(BaseEntity::getId).collect(Collectors.toList());
|
|
|
|
+ Integer haveApplyNum = baseMapper.getHaveApplyCount(examSiteIds, timePeriodIds, Boolean.FALSE);
|
|
|
|
+ // 未预约的数量
|
|
|
|
+ Integer noApplyNum = getNoApplyNum(map.get(key));
|
|
|
|
+ if (noApplyNum > total - haveApplyNum) {
|
|
|
|
+ CategoryEntity category = categoryService.getById(key);
|
|
|
|
+ throw new StatusException("【" + category.getName() + "】教学点考位不足!剩余的考位数量:【" + (total - haveApplyNum) + "】,实际需要的考位数量:【" + noApplyNum + "】");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ private Integer getNoApplyNum(List<StudentEntity> list) {
|
|
|
|
+ int noApplyNum = 0;
|
|
|
|
+ for (StudentEntity student : list) {
|
|
|
|
+ if (student.getApplyNumber() == 1) {
|
|
|
|
+ noApplyNum++;
|
|
|
|
+ } else if (student.getApplyNumber() > 1) {
|
|
|
|
+ int haveApplyNum = cacheService.getStudentApplyFinishCount(student.getId());
|
|
|
|
+ noApplyNum = noApplyNum + (student.getApplyNumber() - haveApplyNum);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return noApplyNum;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private List<TimePeriodEntity> listNoCancelExamTimePeriod(List<TimePeriodEntity> timeList, Long taskId) {
|
|
|
|
+ ApplyTaskEntity task = applyTaskService.getById(taskId);
|
|
|
|
+ Long longToday = DateUtil.getLongTimeByDate(DateUtil.formatShortSplitDateString(new Date()) + " 00:00:00");
|
|
|
|
+ Date today = new Date(longToday);
|
|
|
|
+ Date otherDay = DateUtil.addValues(today, Calendar.DAY_OF_MONTH, task.getAllowApplyCancelDays());
|
|
|
|
+ Long longOtherDay = DateUtil.getLongTimeByDate(DateUtil.formatShortSplitDateString(otherDay) + " 23:59:59");
|
|
|
|
+ return timeList.stream().filter(time -> time.getStartTime() > longOtherDay).collect(Collectors.toList());
|
|
}
|
|
}
|
|
|
|
|
|
private StudentApplyEntity findStudentApply(StudentApplyEntity studentApply) {
|
|
private StudentApplyEntity findStudentApply(StudentApplyEntity studentApply) {
|
|
@@ -729,10 +731,10 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private List<StudentApplyEntity> listStudentApply(Long stdId, Boolean cancel) {
|
|
|
|
|
|
+ private List<StudentApplyEntity> listStudentApply(Long stdId) {
|
|
LambdaQueryWrapper<StudentApplyEntity> lm = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<StudentApplyEntity> lm = new LambdaQueryWrapper<>();
|
|
lm.eq(StudentApplyEntity::getStudentId, stdId);
|
|
lm.eq(StudentApplyEntity::getStudentId, stdId);
|
|
- lm.eq(StudentApplyEntity::getCancel, cancel);
|
|
|
|
|
|
+ lm.eq(StudentApplyEntity::getCancel, Boolean.FALSE);
|
|
return this.baseMapper.selectList(lm);
|
|
return this.baseMapper.selectList(lm);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -817,7 +819,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private void layoutStudentByTimePeriod(Long taskId, ExamSiteEntity examSite, List<ExamRoomEntity> roomList,
|
|
private void layoutStudentByTimePeriod(Long taskId, ExamSiteEntity examSite, List<ExamRoomEntity> roomList,
|
|
- Map<Long, List<StudentApplyEntity>> timeLayoutStudentMap) {
|
|
|
|
|
|
+ Map<Long, List<StudentApplyEntity>> timeLayoutStudentMap) {
|
|
for (Long timePeriodId : timeLayoutStudentMap.keySet()) {
|
|
for (Long timePeriodId : timeLayoutStudentMap.keySet()) {
|
|
List<StudentApplyEntity> studentApplyList = timeLayoutStudentMap.get(timePeriodId);
|
|
List<StudentApplyEntity> studentApplyList = timeLayoutStudentMap.get(timePeriodId);
|
|
layoutStudentToRoom(taskId, examSite, roomList, studentApplyList, timePeriodService.getById(timePeriodId));
|
|
layoutStudentToRoom(taskId, examSite, roomList, studentApplyList, timePeriodService.getById(timePeriodId));
|
|
@@ -825,11 +827,11 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private void layoutStudentToRoom(Long taskId, ExamSiteEntity examSite, List<ExamRoomEntity> roomList,
|
|
private void layoutStudentToRoom(Long taskId, ExamSiteEntity examSite, List<ExamRoomEntity> roomList,
|
|
- List<StudentApplyEntity> studentApplyList, TimePeriodEntity timePeriod) {
|
|
|
|
|
|
+ List<StudentApplyEntity> studentApplyList, TimePeriodEntity timePeriod) {
|
|
Integer timePeriodOrder = getTimePeriodOrder(taskId, timePeriod);
|
|
Integer timePeriodOrder = getTimePeriodOrder(taskId, timePeriod);
|
|
for (ExamRoomEntity room : roomList) {
|
|
for (ExamRoomEntity room : roomList) {
|
|
int num = 0;
|
|
int num = 0;
|
|
- for (Iterator<StudentApplyEntity> iterator = studentApplyList.iterator(); iterator.hasNext();) {
|
|
|
|
|
|
+ for (Iterator<StudentApplyEntity> iterator = studentApplyList.iterator(); iterator.hasNext(); ) {
|
|
StudentApplyEntity student = iterator.next();
|
|
StudentApplyEntity student = iterator.next();
|
|
if (num >= room.getCapacity())
|
|
if (num >= room.getCapacity())
|
|
break;
|
|
break;
|
|
@@ -867,7 +869,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private String generateTicketNumber(Integer timePeriodOrder, String examSiteCode, String roomCode,
|
|
private String generateTicketNumber(Integer timePeriodOrder, String examSiteCode, String roomCode,
|
|
- String seatNumber) {
|
|
|
|
|
|
+ String seatNumber) {
|
|
return DateUtil.formatShortDateString(new Date()) + timePeriodOrder + examSiteCode + roomCode + seatNumber;
|
|
return DateUtil.formatShortDateString(new Date()) + timePeriodOrder + examSiteCode + roomCode + seatNumber;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -930,7 +932,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
public List<File> downloadByExamSite(ZipWriter writer, String taskName, ExamSiteEntity site,
|
|
public List<File> downloadByExamSite(ZipWriter writer, String taskName, ExamSiteEntity site,
|
|
- List<TimePeriodEntity> timeList) throws IOException {
|
|
|
|
|
|
+ List<TimePeriodEntity> timeList) throws IOException {
|
|
List<File> fileList = new ArrayList<>();
|
|
List<File> fileList = new ArrayList<>();
|
|
List<ExamRoomEntity> roomList = listExamRoom(site.getId());
|
|
List<ExamRoomEntity> roomList = listExamRoom(site.getId());
|
|
MaterialTitleInfo title = new MaterialTitleInfo();
|
|
MaterialTitleInfo title = new MaterialTitleInfo();
|
|
@@ -986,7 +988,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
String todayStr = DateUtil.formatShortSplitDateString(new Date());
|
|
String todayStr = DateUtil.formatShortSplitDateString(new Date());
|
|
Long longToday = DateUtil.getLongTimeByDate(todayStr + " 00:00:00");
|
|
Long longToday = DateUtil.getLongTimeByDate(todayStr + " 00:00:00");
|
|
Date today = new Date(longToday);
|
|
Date today = new Date(longToday);
|
|
- if (isInTimePeriod(today,timePeriodList)) {
|
|
|
|
|
|
+ if (isInTimePeriod(today, timePeriodList)) {
|
|
SignInVO vo = new SignInVO();
|
|
SignInVO vo = new SignInVO();
|
|
vo.setExamDate(longToday);
|
|
vo.setExamDate(longToday);
|
|
signInList.add(vo);
|
|
signInList.add(vo);
|
|
@@ -1006,9 +1008,9 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
}
|
|
}
|
|
|
|
|
|
private boolean isInTimePeriod(Date date, List<TimePeriodEntity> timePeriodList) {
|
|
private boolean isInTimePeriod(Date date, List<TimePeriodEntity> timePeriodList) {
|
|
- for(TimePeriodEntity timePeriod : timePeriodList) {
|
|
|
|
|
|
+ for (TimePeriodEntity timePeriod : timePeriodList) {
|
|
Date day = new Date(timePeriod.getStartTime());
|
|
Date day = new Date(timePeriod.getStartTime());
|
|
- if(DateUtils.isSameDay(day, date)) {
|
|
|
|
|
|
+ if (DateUtils.isSameDay(day, date)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|