Pull request #336: updated flag correct sets
Merge in RED/persistence-service from master-ports-2 to master * commit '25391040fffd761260c4689888b42fd655184797': updated flag correct sets
This commit is contained in:
commit
8847a67ea2
@ -337,13 +337,13 @@ public class FileStatusPersistenceService {
|
||||
@Transactional
|
||||
public void setLastRedactionModificationDateForFile(String fileId, OffsetDateTime changeDate) {
|
||||
|
||||
fileRepository.setLastRedactionModificationDateForFile(fileId, changeDate);
|
||||
fileRepository.setLastRedactionModificationDateForFile(fileId, changeDate, OffsetDateTime.now());
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void setLastManualChangeDate(String fileId, OffsetDateTime lastManualChangeDate) {
|
||||
|
||||
fileRepository.setLastManualChangeDate(fileId, lastManualChangeDate);
|
||||
fileRepository.setLastManualChangeDate(fileId, lastManualChangeDate, OffsetDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -132,12 +132,12 @@ public interface FileRepository extends JpaRepository<FileEntity, String> {
|
||||
List<String> findDossierChangeByLastUpdatedIsAfter(OffsetDateTime since);
|
||||
|
||||
@Modifying(clearAutomatically = true)
|
||||
@Query("update FileEntity f set f.redactionModificationDate = :redactionModificationDate where f.id = :fileId")
|
||||
void setLastRedactionModificationDateForFile(String fileId, OffsetDateTime redactionModificationDate);
|
||||
@Query("update FileEntity f set f.redactionModificationDate = :redactionModificationDate, f.lastUpdated = :lastUpdated where f.id = :fileId")
|
||||
void setLastRedactionModificationDateForFile(String fileId, OffsetDateTime redactionModificationDate, OffsetDateTime lastUpdated);
|
||||
|
||||
@Modifying(clearAutomatically = true)
|
||||
@Query("update FileEntity f set f.lastManualChangeDate = :lastManualChangeDate where f.id = :fileId")
|
||||
void setLastManualChangeDate(String fileId, OffsetDateTime lastManualChangeDate);
|
||||
@Query("update FileEntity f set f.lastManualChangeDate = :lastManualChangeDate, f.lastUpdated = :lastUpdated where f.id = :fileId")
|
||||
void setLastManualChangeDate(String fileId, OffsetDateTime lastManualChangeDate, OffsetDateTime lastUpdated);
|
||||
|
||||
@Query("select f from FileEntity f join DossierEntity d on d.id = f.dossierId where f.workflowStatus <> 'APPROVED' and f.excludedFromAutomaticAnalysis = false " +
|
||||
"and ( f.processingStatus = 'PROCESSED' or f.processingStatus = 'UNPROCESSED' or f.processingStatus = 'DELETED' or f.processingStatus = 'ERROR' )" +
|
||||
|
||||
@ -126,7 +126,7 @@ public class AnalysisFlagsCalculationService {
|
||||
if (lastRedactionModification != null && (file.getRedactionModificationDate() == null || file.getRedactionModificationDate().isBefore(lastRedactionModification))) {
|
||||
fileStatusPersistenceService.setLastRedactionModificationDateForFile(fileId, lastRedactionModification);
|
||||
}
|
||||
if (lastManualChangeDate != null) {
|
||||
if (lastManualChangeDate != null && (file.getLastManualChangeDate() == null || file.getLastManualChangeDate().isBefore(lastManualChangeDate))) {
|
||||
fileStatusPersistenceService.setLastManualChangeDate(fileId, lastManualChangeDate);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user