物流对账单

This commit is contained in:
2026-07-26 09:51:33 +08:00
parent 2b7ef65cce
commit 19cb312465
21 changed files with 1909 additions and 27 deletions
@@ -5,6 +5,7 @@ import { HqOperationAction } from '../../common/hq-operation/hq-operation.consta
import { FulfillmentProviderService } from '../fulfillment/fulfillment-provider.service';
import {
CreateFulfillmentProviderDto,
RechargeFulfillmentProviderDto,
UpdateFulfillmentProviderDto,
} from './dto/admin-mutate.dto';
import type { FulfillmentProviderStatus, FulfillmentProviderType } from '@prisma/client';
@@ -40,6 +41,12 @@ export class AdminFulfillmentProvidersController {
configJson: dto.configJson,
capabilitiesJson: dto.capabilitiesJson,
xiaofeixiaConfig: dto.xiaofeixiaConfig,
bankAccountName: dto.bankAccountName,
bankName: dto.bankName,
bankBranch: dto.bankBranch,
bankAccountNo: dto.bankAccountNo,
settlementMethod: dto.settlementMethod,
pricingRules: dto.pricingRules,
});
}
@@ -63,6 +70,23 @@ export class AdminFulfillmentProvidersController {
configJson: dto.configJson,
capabilitiesJson: dto.capabilitiesJson,
xiaofeixiaConfig: dto.xiaofeixiaConfig,
bankAccountName: dto.bankAccountName,
bankName: dto.bankName,
bankBranch: dto.bankBranch,
bankAccountNo: dto.bankAccountNo,
settlementMethod: dto.settlementMethod,
pricingRules: dto.pricingRules,
});
}
@Post(':id/recharge')
@HqOperation({
action: HqOperationAction.LOGISTICS_PROVIDER_RECHARGE,
refType: 'FULFILLMENT_PROVIDER',
refIdParam: 'id',
includeBody: true,
})
recharge(@Param('id') id: string, @Body() dto: RechargeFulfillmentProviderDto) {
return this.service.rechargePrepaid(BigInt(id), Number(dto.amount), dto.remark);
}
}
@@ -593,6 +593,36 @@ export class CreateFulfillmentProviderDto {
signType?: 'MD5' | 'HMAC-SHA256';
appId?: string;
};
@IsOptional()
@IsString()
bankAccountName?: string | null;
@IsOptional()
@IsString()
bankName?: string | null;
@IsOptional()
@IsString()
bankBranch?: string | null;
@IsOptional()
@IsString()
bankAccountNo?: string | null;
@IsOptional()
@IsIn(['PREPAID', 'MONTHLY_CREDIT'])
settlementMethod?: 'PREPAID' | 'MONTHLY_CREDIT';
@IsOptional()
@IsObject()
pricingRules?: {
baseBottles: number;
baseFee: number;
extraBottleFee: number;
boxBottles?: number;
boxFee?: number;
} | null;
}
export class UpdateFulfillmentProviderDto {
@@ -625,6 +655,45 @@ export class UpdateFulfillmentProviderDto {
signType?: 'MD5' | 'HMAC-SHA256';
appId?: string;
};
@IsOptional()
@IsString()
bankAccountName?: string | null;
@IsOptional()
@IsString()
bankName?: string | null;
@IsOptional()
@IsString()
bankBranch?: string | null;
@IsOptional()
@IsString()
bankAccountNo?: string | null;
@IsOptional()
@IsIn(['PREPAID', 'MONTHLY_CREDIT'])
settlementMethod?: 'PREPAID' | 'MONTHLY_CREDIT';
@IsOptional()
@IsObject()
pricingRules?: {
baseBottles: number;
baseFee: number;
extraBottleFee: number;
boxBottles?: number;
boxFee?: number;
} | null;
}
export class RechargeFulfillmentProviderDto {
@IsNumber()
amount: number;
@IsOptional()
@IsString()
remark?: string;
}
export class ManualShipOrderDto {