Add Tahesab bulk customer import by code range.

Connecting alone does not copy customers; settings now list a code range and import them into CRM persons with link status.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 09:33:12 +03:30
co-authored by Cursor
parent a88bd83c9b
commit 15a0afae5c
5 changed files with 390 additions and 22 deletions
+39
View File
@@ -1,4 +1,5 @@
import {
IsArray,
IsBoolean,
IsIn,
IsInt,
@@ -121,6 +122,7 @@ export class ImportFromTahesabDto {
@IsString()
connectionId!: string;
@Type(() => Number)
@IsInt()
@Min(1)
moshtariCode!: number;
@@ -131,6 +133,29 @@ export class ImportFromTahesabDto {
personId?: string;
}
export class ImportBulkFromTahesabDto {
@IsString()
connectionId!: string;
@IsOptional()
@IsArray()
@Type(() => Number)
@IsInt({ each: true })
moshtariCodes?: number[];
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
fromCode?: number;
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
toCode?: number;
}
export class SearchTahesabDto {
@IsString()
connectionId!: string;
@@ -144,8 +169,22 @@ export class SearchTahesabDto {
name?: string;
@IsOptional()
@Type(() => Number)
@IsInt()
moshtariCode?: number;
/** لیست بازه‌ای با DoListMoshtari-ByCode */
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
fromCode?: number;
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
toCode?: number;
}
export class ListAsnadQueryDto {