690329:1904 Fixing revision number Kimi K2.5 #01
CI / CD Pipeline / build (push) Successful in 18m7s
CI / CD Pipeline / deploy (push) Failing after 3m15s

This commit is contained in:
2026-03-29 19:04:24 +07:00
parent 65aaae9d90
commit 43e380e5c1
15 changed files with 4120 additions and 3 deletions
@@ -55,6 +55,19 @@ export class CorrespondenceService {
return permissions.includes('system.manage_all');
}
/**
* Business Rule: Revision Label Strategy
* - RFA, RFI: Use alphabet starting with 'A' (A, B, C...)
* - Other types (LETTER, MEMO, etc.): Use numeric (null for first, then 1, 2, 3...)
*/
private getInitialRevisionLabel(typeCode: string): string | null {
const alphabetTypes = ['RFA', 'RFI'];
if (alphabetTypes.includes(typeCode.toUpperCase())) {
return 'A'; // Alphabet for RFA, RFI
}
return null; // Numeric (null for revision 0)
}
constructor(
@InjectRepository(Correspondence)
private correspondenceRepo: Repository<Correspondence>,
@@ -288,7 +301,7 @@ export class CorrespondenceService {
const revision = queryRunner.manager.create(CorrespondenceRevision, {
correspondenceId: savedCorr.id,
revisionNumber: 0,
revisionLabel: 'A',
revisionLabel: this.getInitialRevisionLabel(type.typeCode),
isCurrent: true,
statusId: statusDraft.id,
subject: createDto.subject,