|
@@ -1563,14 +1563,26 @@ public class MarkServiceImpl implements MarkService {
|
|
|
MarkLibrarySearchQuery query = new MarkLibrarySearchQuery();
|
|
|
query.setPageNumber(1);
|
|
|
query.setPageSize(1);
|
|
|
- query.setSort(new Sort(Sort.Direction.DESC, "markerTime", "examNumber"));
|
|
|
+ query.setSort(new Sort(Sort.Direction.DESC,"markerTime", "examNumber"));
|
|
|
Set<LibraryStatus> statusSet = new HashSet<>();
|
|
|
statusSet.add(LibraryStatus.MARKED);
|
|
|
- statusSet.add(LibraryStatus.ARBITRATED);
|
|
|
List<MarkLibrary> list = libraryDao.findByMarkerIdAndStatus(marker.getId(),statusSet, query);
|
|
|
+
|
|
|
+ MarkLibrarySearchQuery queryH = new MarkLibrarySearchQuery();
|
|
|
+ queryH.setPageNumber(1);
|
|
|
+ queryH.setPageSize(1);
|
|
|
+ queryH.setSort(new Sort(Sort.Direction.DESC,"headerTime", "examNumber"));
|
|
|
+ Set<LibraryStatus> statusSetH = new HashSet<>();
|
|
|
+ statusSetH.add(LibraryStatus.ARBITRATED);
|
|
|
+ List<MarkLibrary> listH = libraryDao.findByMarkerIdAndStatus(marker.getId(),statusSetH, query);
|
|
|
+
|
|
|
MarkLibrary library = list.isEmpty() ? null : list.get(0);
|
|
|
+ MarkLibrary libraryH = listH.isEmpty() ? null : listH.get(0);
|
|
|
if (library != null && library.getMarkerTime() != null) {
|
|
|
- long lastMarkTime = library.getHeaderTime()==null? library.getMarkerTime().getTime(): library.getHeaderTime().getTime();
|
|
|
+ long lastMarkTime = library.getMarkerTime().getTime();
|
|
|
+ if (libraryH != null && libraryH.getHeaderTime() != null && libraryH.getHeaderTime().getTime()>lastMarkTime) {
|
|
|
+ lastMarkTime = library.getHeaderTime().getTime();
|
|
|
+ }
|
|
|
if (lastUpdateTime != null && lastUpdateTime > lastMarkTime) {
|
|
|
return false;
|
|
|
} else {
|