Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public TestResult toModel(TestResultEntity entity) {
*/
public TestResultEntity toEntity(TestResult model) {
if (model.getSc() == null) {
log.info("Set Sc during concertion to Entity for Lab {}", model.getLabId());
model.setSc(LocalDateTime.now().toEpochSecond(ZoneOffset.UTC));
}
return new TestResultEntity()
Expand Down Expand Up @@ -95,6 +96,7 @@ public TestResult createOrUpdate(final TestResult result) {
log.info("Updating test result in database.");
LocalDateTime sc = LocalDateTime.now();
if (result.getSc() != null) {
log.warn("Set Sc for Lab {}",result.getLabId());
sc = LocalDateTime.ofEpochSecond(result.getSc(),0, ZoneOffset.UTC);
}
entity.setResult(result.getResult())
Expand Down Expand Up @@ -130,6 +132,7 @@ public TestResult getOrCreate(final String id, boolean quicktest, Long sc) {
resultEntity.setResultId(id);
}
if (sc == null) {
log.info("Set Sc during get or create");
resultEntity.setResultDate(LocalDateTime.now());
} else {
resultEntity.setResultDate(LocalDateTime.ofEpochSecond(sc, 0, ZoneOffset.UTC));
Expand Down