AuctionOrderController.ts 2.99 KB

import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import type {AuctionOrder_OrderState} from "lib/src/entity/auction/entity/AuctionOrder";
import {Page} from "autumn-vue/lib/core/page/Page";
import {Contract} from "lib/src/entity/auction/entity/Contract";
// endregion

   /**
   * 拍卖订单(AuctionOrder) PI接口
   * @author gonglei
   * @since 2025-10-13 12:18:11
   */
export class AuctionOrderController{

   /**
   * 发起E签宝合国签署流程
   * @param signOrder
   * @return Contract
   */
    static esignAuctionOrderContract(axios:AxiosStatic, signOrder: any): Promise<AxiosResponse<Contract>> {
        return axios.post('order/esignAuctionOrderContract', signOrder);
    }

   /**
   * 根据id查询拍卖订单
   * @param orderId
   * @return AuctionOrder
   */
    static getAuctionOrderById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> {
        return axios.get('order/getAuctionOrderById', {params: {orderId: orderId}});
    }

   /**
   * 取消拍卖订单
   * @param vehicleId
   * @return int
   */
    static getAuctionOrderByVehicleId(axios:AxiosStatic, vehicleId: number): Promise<AxiosResponse<number>> {
        return axios.get('order/getAuctionOrderByVehicleId', {params: {vehicleId: vehicleId}});
    }

   /**
   */
    static getAuctionOrderDetailById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> {
        return axios.get('order/getAuctionOrderDetailById', {params: {orderId: orderId}});
    }

   /**
   * 查询订单状态,用于轮循操作
   * @param orderId
   * @return AuctionOrder.OrderState
   */
    static getAuctionOrderStateById(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder.OrderState>> {
        return axios.get('order/getAuctionOrderStateById', {params: {orderId: orderId}});
    }

   /**
   */
    static getContractsByOrderId(axios:AxiosStatic, orderId: number): Promise<AxiosResponse<Contract[]>> {
        return axios.get('order/getContractsByOrderId', {params: {orderId: orderId}});
    }

   /**
   */
    static getLatestAuctionOrders(axios:AxiosStatic): Promise<AxiosResponse<AuctionOrder[]>> {
        return axios.get('order/getLatestAuctionOrders');
    }

   /**
   * 分页查询拍卖订单
   * @param pagination
   * @return Page
   */
    static pageAuctionOrder(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AuctionOrder>>> {
        return axios.post('order/pageAuctionOrder', pagination);
    }

    static PAGE_AUCTION_ORDER = 'order/pageAuctionOrder';

   /**
   * 上传过户资料
   * @param auctionOrder
   * @return AuctionOrder
   * @throws FieldException
   */
    static uploadTransferAuctionOrder(axios:AxiosStatic, auctionOrder: any): Promise<AxiosResponse<AuctionOrder>> {
        return axios.post('order/uploadTransferAuctionOrder', auctionOrder);
    }

    // region 前端扩展代码区
    // endregion
}