feat: 新增迁品重算

This commit is contained in:
2026-08-31 16:02:09 +08:00
parent 32c4788176
commit e889bc043a
27 changed files with 1281 additions and 9 deletions
@@ -13,7 +13,7 @@ export namespace BiOrderStatCalcVO {
export interface FullTask {
id: number;
shopId: number;
/** MANUAL / CONVERT / COST_SYNC */
/** MANUAL / CONVERT / COST_SYNC / SKU_MIGRATE */
triggerSource?: string;
/** 上游任务 id;含义由 triggerSource 决定 */
upstreamTaskId?: number;
@@ -0,0 +1,48 @@
import { requestClient } from '#/api/request';
export namespace SkuMigrateVO {
export interface Impact {
id: number;
skuId: number;
fromProductId: number;
toProductId: number;
dateFrom: string;
dateTo: string;
status: string;
createTime?: string;
appliedTime?: string;
applyBatchId?: string;
}
export interface ApplyTaskBrief {
applyTaskId: number;
shopId: number;
biCalcTaskId?: number;
dateFrom: string;
dateTo: string;
totalDays: number;
status: string;
createTime?: string;
}
export interface ApplyResult {
applyBatchId: string;
impactCount: number;
taskCount: number;
tasks: ApplyTaskBrief[];
}
}
/** 待重算迁品影响面 */
export async function listPendingSkuMigrateImpactsApi() {
return requestClient.get<SkuMigrateVO.Impact[]>(
'/ec/sku-migrate/impacts/pending',
);
}
/** 一键创建 BI 全量重算任务 */
export async function applyPendingSkuMigrateImpactsApi() {
return requestClient.post<SkuMigrateVO.ApplyResult>(
'/ec/sku-migrate/apply-pending',
);
}
@@ -0,0 +1 @@
export * from './apis';