From 00c258dda56386aed06e07794f696fb32225b8d3 Mon Sep 17 00:00:00 2001 From: liuyun Date: Thu, 15 Oct 2026 01:51:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(c4):=20=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= =?UTF-8?q?=20handle=5Fstatus=20=E6=9E=9A=E4=B8=BE=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=B8=BA=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- src/qc/dto.ts | 4 ++-- src/qc/qc.service.spec.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qc/dto.ts b/src/qc/dto.ts index b587f89..151f49c 100644 --- a/src/qc/dto.ts +++ b/src/qc/dto.ts @@ -43,10 +43,10 @@ export class BatchPassDto { /** 异常处理入参:质控员更新 handle_status/handle_result。 */ export class HandleAbnormalDto { - @ApiProperty({ description: '处理状态', enum: ['handled', 'closed'] }) + @ApiProperty({ description: '处理状态', enum: ['handling', 'closed'] }) @IsString() @IsNotEmpty() - @IsIn(['handled', 'closed']) + @IsIn(['handling', 'closed']) handleStatus!: string; @ApiPropertyOptional({ description: '处理结果' }) diff --git a/src/qc/qc.service.spec.ts b/src/qc/qc.service.spec.ts index 829c5f5..b2cbb10 100644 --- a/src/qc/qc.service.spec.ts +++ b/src/qc/qc.service.spec.ts @@ -653,7 +653,7 @@ describe('QcService.handleAbnormal', () => { it('abnormal 不存在 → ABNORMAL_NOT_FOUND', async () => { const { service, recordAbnormalUpdate } = makeService(); await expect( - runWithRequestContext(ctx, () => service.handleAbnormal('missing', { handleStatus: 'handled' })), + runWithRequestContext(ctx, () => service.handleAbnormal('missing', { handleStatus: 'handling' })), ).rejects.toMatchObject({ response: { code: ErrorCodes.ABNORMAL_NOT_FOUND } }); expect(recordAbnormalUpdate).not.toHaveBeenCalled(); }); @@ -679,11 +679,11 @@ describe('QcService.handleAbnormal', () => { const recordAbnormalUpdate = vi.fn().mockResolvedValue({ id: 'a1' }); const { service } = makeService({ recordAbnormalFindUnique, recordAbnormalUpdate }); - await runWithRequestContext(ctx, () => service.handleAbnormal('a1', { handleStatus: 'handled' })); + await runWithRequestContext(ctx, () => service.handleAbnormal('a1', { handleStatus: 'handling' })); expect(recordAbnormalUpdate).toHaveBeenCalledWith({ where: { id: 'a1' }, - data: { handleStatus: 'handled', handleResult: null }, + data: { handleStatus: 'handling', handleResult: null }, }); }); });