diff --git a/backend/lib/adapters/gateways/acms/acms.gateway.ts b/backend/lib/adapters/gateways/acms/acms.gateway.ts index 58147619e..7ba58e7dc 100644 --- a/backend/lib/adapters/gateways/acms/acms.gateway.ts +++ b/backend/lib/adapters/gateways/acms/acms.gateway.ts @@ -25,7 +25,7 @@ export class AcmsGatewayImpl extends AbstractMssqlClient implements AcmsGateway input.push({ name: 'divisionCode', - type: mssql.VarChar, + type: mssql.Int, value: predicate.divisionCode, }); @@ -57,6 +57,7 @@ export class AcmsGatewayImpl extends AbstractMssqlClient implements AcmsGateway leadCaseId: string; }; + context.logger.debug(MODULE_NAME, `Querying for parameters: ${JSON.stringify(input)}`); try { const { results } = await this.executeQuery(context, query, input); const leadCaseIdsResults = results as ResultType[]; diff --git a/backend/lib/use-cases/acms-orders/acms-orders.ts b/backend/lib/use-cases/acms-orders/acms-orders.ts index dbfe68652..fbae785c2 100644 --- a/backend/lib/use-cases/acms-orders/acms-orders.ts +++ b/backend/lib/use-cases/acms-orders/acms-orders.ts @@ -58,6 +58,11 @@ export class AcmsOrders { try { const gateway = Factory.getAcmsGateway(context); const leadCaseIds = await gateway.getLeadCaseIds(context, predicate); + context.logger.debug( + MODULE_NAME, + `Found ${leadCaseIds.length} lead cases for ${predicate.chapter}:${predicate.divisionCode}.`, + leadCaseIds, + ); return leadCaseIds; } catch (originalError) { throw getCamsError( @@ -79,6 +84,7 @@ export class AcmsOrders { success: true, }; try { + context.logger.debug(MODULE_NAME, `Beginning migration of ${acmsLeadCaseId}.`); const casesRepo = Factory.getCasesRepository(context); const dxtr = Factory.getCasesGateway(context); const acms = Factory.getAcmsGateway(context); @@ -202,6 +208,7 @@ export class AcmsOrders { await casesRepo.createCaseHistory(leadCaseHistory); leadCaseHistoryBefore = leadCaseHistoryAfter; } + context.logger.debug(MODULE_NAME, `Finished migration of ${acmsLeadCaseId}.`, report); } catch (error) { report.success = false; const camsError = getCamsError(