Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+3
-2
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_dynamic_participant_data.h"
|
||||
#include <utility>
|
||||
#include "rep_db.h"
|
||||
#include "settings.h"
|
||||
#include <ngldb/nsqlquery.h>
|
||||
@@ -915,7 +916,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
|
||||
// Has Turm/Wanne Map been filled?
|
||||
for (Database::RepChargeResupplyData turmWanneCrData : qAsConst(turmWanneMap))
|
||||
for (Database::RepChargeResupplyData turmWanneCrData : std::as_const(turmWanneMap))
|
||||
{
|
||||
QPair<int, int> pair;
|
||||
pair.first = turmWanneCrData.gearTypeId;
|
||||
@@ -974,7 +975,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
DEBUG_LOG(m_logger) << "Qualification = " << sanData.qualification;
|
||||
|
||||
for ( ParticipantManagement::SanitationMaterial sanMat : qAsConst(data.sanitationMaterialStock()))
|
||||
for ( ParticipantManagement::SanitationMaterial sanMat : std::as_const(data.sanitationMaterialStock()))
|
||||
{
|
||||
sanData.materialId = sanMat.materialId();
|
||||
sanData.materialAmount = sanMat.materialCount();
|
||||
|
||||
@@ -40,7 +40,7 @@ NGL_TARGET_LINK_LIBRARIES(svcRepCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
NGLLogger
|
||||
ngldb
|
||||
@@ -116,8 +116,8 @@ CODEGEN_SQL(SHARED_SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_LIBRARY(AAR SV svcRepCommonExecutable STATIC ${SHARED_SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcRepCommonExecutable
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Sql
|
||||
Qt6::Core
|
||||
Qt6::Sql
|
||||
svcRepCommon
|
||||
)
|
||||
|
||||
@@ -140,7 +140,7 @@ SET(ANALYZER_SRCS_exe
|
||||
NGL_ADD_SVC_ICON(ANALYZER_SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcReportAnalyzer ${ANALYZER_SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcReportAnalyzer
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
svcRepCommonExecutable
|
||||
svcRepCommon
|
||||
svcRepServer
|
||||
@@ -200,7 +200,7 @@ SET(GENERATOR_SRCS_exe
|
||||
NGL_ADD_SVC_ICON(GENERATOR_SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcReportGenerator ${GENERATOR_SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcReportGenerator
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
nglcoreapplication
|
||||
ngltools
|
||||
nglsettings
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -105,7 +106,7 @@ bool HandlerReportData::generateBuildingDamageResult(const CreateModifyReportReq
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const BuildingDamageData &bdData : qAsConst(m_buildingDamageData))
|
||||
for (const BuildingDamageData &bdData : std::as_const(m_buildingDamageData))
|
||||
{
|
||||
qInsert.bindValue(QStringLiteral(":bldId"), bdData.buildingId);
|
||||
qInsert.bindValue(QStringLiteral(":time"), bdData.timePoint);
|
||||
|
||||
+9
-8
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -85,7 +86,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
{
|
||||
QStringList strList;
|
||||
strList.reserve(usedGears.size());
|
||||
for (int gearId : qAsConst(usedGears))
|
||||
for (int gearId : std::as_const(usedGears))
|
||||
strList += QString::number(gearId);
|
||||
QString gears = strList.join(QLatin1String(", "));
|
||||
stmt += QLatin1String(" AND gear_id IN (") + gears + QLatin1String(")");
|
||||
@@ -195,7 +196,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
}
|
||||
|
||||
// Now examine the remaining weapons:
|
||||
for (const participant_map2_t &p : qAsConst(m_crGear))
|
||||
for (const participant_map2_t &p : std::as_const(m_crGear))
|
||||
{
|
||||
QMap<time_t, Database::RepChargeResupplyData> temp;
|
||||
for (const QVector<Database::RepChargeResupplyData> &datas : p)
|
||||
@@ -207,7 +208,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
int p_before = temp.begin().value().participantId;
|
||||
int pt_before = temp.begin().value().participantTypeId;
|
||||
|
||||
for (const Database::RepChargeResupplyData &d : qAsConst(temp))
|
||||
for (const Database::RepChargeResupplyData &d : std::as_const(temp))
|
||||
{
|
||||
if (p_before != d.participantId)
|
||||
{
|
||||
@@ -331,7 +332,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
|
||||
int current = start;
|
||||
for (const Database::RepChargeResupplyData &d : qAsConst(tmap)) // Per Timestamp
|
||||
for (const Database::RepChargeResupplyData &d : std::as_const(tmap)) // Per Timestamp
|
||||
{
|
||||
if (d.chargeTypeId < 0)
|
||||
{
|
||||
@@ -431,9 +432,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
QMap<int/*participantTypeId*/, charge_type_map2_t> finalMap;
|
||||
|
||||
for (const charge_type_map2_t &ctmap : qAsConst(m_crResData)) // Per Participant
|
||||
for (const charge_type_map2_t &ctmap : std::as_const(m_crResData)) // Per Participant
|
||||
{
|
||||
for (const ChargeResupplyResult &res : qAsConst(ctmap)) // Per ChargeType
|
||||
for (const ChargeResupplyResult &res : std::as_const(ctmap)) // Per ChargeType
|
||||
{
|
||||
if (request.participantIds().size() > 0 && !contains(request.participantIds(), res.participantId))
|
||||
continue;
|
||||
@@ -463,9 +464,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
DEBUG_LOG(m_logger) << "finalMap.size: " << finalMap.size();
|
||||
|
||||
for (const charge_type_map2_t &ctmap : qAsConst(finalMap))
|
||||
for (const charge_type_map2_t &ctmap : std::as_const(finalMap))
|
||||
{
|
||||
for (const ChargeResupplyResult &res : qAsConst(ctmap))
|
||||
for (const ChargeResupplyResult &res : std::as_const(ctmap))
|
||||
{
|
||||
checkElapsedTimer(timeoutTimer);
|
||||
DEBUG_LOG(m_logger) << "res.chargeTypeId: " << res.chargeTypeId;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -64,7 +65,7 @@ bool HandlerReportData::generateFiringsResult(const CreateModifyReportRequest &r
|
||||
|
||||
QElapsedTimer timeoutTimer;
|
||||
timeoutTimer.start();
|
||||
for (const int &chargeId : qAsConst(request.chargeTypeIds()))
|
||||
for (const int &chargeId : std::as_const(request.chargeTypeIds()))
|
||||
{
|
||||
if (chargeId == 0) continue; // skip 0
|
||||
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -81,7 +82,7 @@ bool HandlerReportData::generateMaintenanceResult(const CreateModifyReportReques
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const auto &vrData : qAsConst(m_maintenanceData))
|
||||
for (const auto &vrData : std::as_const(m_maintenanceData))
|
||||
{
|
||||
const auto participant = ppmDtc->participant(vrData.participantId);
|
||||
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -126,7 +127,7 @@ bool HandlerReportData::generateTreatmentResult(const CreateModifyReportRequest
|
||||
|
||||
QElapsedTimer timeoutTimer;
|
||||
timeoutTimer.start();
|
||||
for (const TreatmentData &tData : qAsConst(m_treatmentData))
|
||||
for (const TreatmentData &tData : std::as_const(m_treatmentData))
|
||||
{
|
||||
checkElapsedTimer(timeoutTimer);
|
||||
const auto participant = ppmDtc->participant(tData.participantId);
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -102,7 +103,7 @@ bool HandlerReportData::generateTreatmentTimelineResult(const CreateModifyReport
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const TreatmentTimelineData &tData : qAsConst(m_treatmentTimelineData))
|
||||
for (const TreatmentTimelineData &tData : std::as_const(m_treatmentTimelineData))
|
||||
{
|
||||
const auto participant = ppmDtc->participant(tData.participantId);
|
||||
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
#include "rep_db.h"
|
||||
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
@@ -98,7 +99,7 @@ bool HandlerReportData::getParticipantInitial(const QVector<int> &participantIds
|
||||
qBeforeStart.bindValue(QStringLiteral(":startTime"), startTime);
|
||||
qAfterStart.bindValue(QStringLiteral(":startTime"), startTime);
|
||||
qAfterStart.bindValue(QStringLiteral(":endTime"), endTime);
|
||||
for (int participantId : qAsConst(participantIds))
|
||||
for (int participantId : std::as_const(participantIds))
|
||||
{
|
||||
qBeforeStart.bindValue(QStringLiteral(":participant_id"), participantId);
|
||||
if (!qBeforeStart.exec())
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -67,7 +68,7 @@ bool HandlerReportData::generateSanitationMaterialResult(const CreateModifyRepor
|
||||
qInsert.prepare(QLatin1String("INSERT INTO rep_sanitation_material_result (report_id, sanitation_unique_id, qualification, material_id ) VALUES (:reportId, :uqId, :qualif, :materialId )"));
|
||||
qInsert.bindValue(QLatin1String(":reportId"), reportId);
|
||||
|
||||
for (qint64 sanitationId : qAsConst(sanitationIds))
|
||||
for (qint64 sanitationId : std::as_const(sanitationIds))
|
||||
{
|
||||
qInsert.bindValue(QLatin1String(":uqId"), sanitationId);
|
||||
|
||||
|
||||
+4
-4
@@ -21,8 +21,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
# Testing FunctionTopic Functionality (FTC)
|
||||
ADD_EXECUTABLE(repTests ${SRCS_TEST} ${HDRS_TEST})
|
||||
TARGET_LINK_LIBRARIES(repTests
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
RTI::nddscpp2
|
||||
svcRepClient
|
||||
svcRepCommon
|
||||
@@ -37,8 +37,8 @@ IF(BUILD_TESTING AND BUILD_SV)
|
||||
|
||||
ADD_EXECUTABLE(lonLat2UtmTest ${SRCS_COORD_TEST})
|
||||
TARGET_LINK_LIBRARIES(lonLat2UtmTest
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
NGLLogger
|
||||
|
||||
Reference in new issue
Block a user