SHA256
StayExport Tracking - New Stay Export mode: UploadPending
Added a new stay export mode to export pending stays. A date range can be used as optional parameter.
This commit is contained in:
1 parent
b515f18ca9
commit
f87d6303ea
5 files changed
+83
-20
No files matched your search
@@ -194,6 +194,8 @@ public class StayExportService(
|
||||
|
||||
private async Task<IEnumerable<StayEntryDTO>> GetStaysToExportByParamsAsync(StayExportParamsDTO exportParams)
|
||||
{
|
||||
StayEntryFilterDTO? filter = null;
|
||||
|
||||
//Todo - Improve type selection (when there are more types).
|
||||
if (exportParams.ExportType == StayExportParamType.PeriodDateIn)
|
||||
{
|
||||
@@ -203,11 +205,27 @@ public class StayExportService(
|
||||
}
|
||||
|
||||
//Get Stays in period -> Local time should be used so it match with entities local-time.
|
||||
StayEntryFilterDTO filter = new()
|
||||
filter = new()
|
||||
{
|
||||
DateInStart = exportParams.ExportPeriodStart,
|
||||
DateInEnd = exportParams.ExportPeriodEnd
|
||||
};
|
||||
}
|
||||
|
||||
if (exportParams.ExportType == StayExportParamType.UploadPending)
|
||||
{
|
||||
//Get Stays in period -> Local time should be used so it match with entities local-time.
|
||||
filter = new()
|
||||
{
|
||||
//Start-End dates may be null
|
||||
DateInStart = exportParams.ExportPeriodStart,
|
||||
DateInEnd = exportParams.ExportPeriodEnd,
|
||||
StayUploadStatus = UploadStatus.Pending,
|
||||
};
|
||||
}
|
||||
|
||||
if (filter != null)
|
||||
{
|
||||
return await stayEntityService.GetDtoListByFilterAsync(filter, limit: 0, queryConfig: queryConfig);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user