Fix: Search dicom from pacs by this week failed.

This commit is contained in:
sunwen
2025-07-14 11:30:27 +08:00
parent 5ec62095bc
commit 3a9aab21d2

View File

@@ -362,18 +362,22 @@ void ImportWidget::getDateIntervalForQuery(QString& startDate, QString& endDate)
else if(m_pDateComboBox->currentText() == tr("Yesterday")) else if(m_pDateComboBox->currentText() == tr("Yesterday"))
{ {
startDate_ = date.addDays(-1); startDate_ = date.addDays(-1);
endDate_ = date;
} }
else if (m_pDateComboBox->currentText() == tr("This week")) else if (m_pDateComboBox->currentText() == tr("This week"))
{ {
startDate_ = date.addDays(-date.dayOfWeek() + 1); startDate_ = date.addDays(-date.dayOfWeek() + 1);
endDate_ = date;
} }
else if (m_pDateComboBox->currentText() == tr("This month")) else if (m_pDateComboBox->currentText() == tr("This month"))
{ {
startDate_ = QDate(date.year(), date.month(), 1); startDate_ = QDate(date.year(), date.month(), 1);
endDate_ = date;
} }
else if (m_pDateComboBox->currentText() == tr("Custom date")) else if (m_pDateComboBox->currentText() == tr("Custom date"))
{ {
startDate_ = m_pStartDate->date(); startDate_ = m_pStartDate->date();
endDate_ = date;
} }
else if (m_pDateComboBox->currentText() == tr("Custom date range")) else if (m_pDateComboBox->currentText() == tr("Custom date range"))
{ {
@@ -382,7 +386,8 @@ void ImportWidget::getDateIntervalForQuery(QString& startDate, QString& endDate)
} }
else else
{ {
startDate_ = date; startDate_ = date;
endDate_ = date;
} }
startDate = QString::number(startDate_.year()); startDate = QString::number(startDate_.year());