import type {IConveyPickStandSearch} from "@/interface/page/convey/IConveyPickStandSearch.ts";
import axiosInstance from "@/api/axios.ts";
import type {IAppConveyPickStand} from "@/model/table/IAppConveyPickStand.ts";
import type {IConveyCheckStandSearch} from "@/interface/page/convey/IConveyCheckStandSearch.ts";
import type {IConveyDeliverStandSearch} from "@/interface/page/convey/IConveyDeliverStandSearch.ts";
import type {IAppConveyDeliverStand} from "@/model/table/IAppConveyDeliverStand.ts";
import type {IAppConveyCheckStand} from "@/model/table/IAppConveyCheckStand.ts";

export default class ConveyStandApi {

    // 分页查询捡选站台信息
    static queryPickStand (params: IConveyPickStandSearch, pageSize: number, pageIndex: number): Promise<any> {
        return axiosInstance.post('/app/conveyStand/queryPickStand', params, {
            params: {
                pageSize: pageSize,
                pageIndex: pageIndex
            }
        });
    };
    // 添加捡选站台数据
    static addPickStand (params: IAppConveyPickStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/addConveyPickStand', params);
    };
    // 删除捡选站台
    static deletePickStand (standId: string): Promise<any> {
        return axiosInstance.delete('/app/conveyStand/deleteConveyPickStand', {
            params: {
                standId: standId
            }
        });
    };
    // 修改捡选站台信息
    static updatePickStand (params: IAppConveyPickStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/updateConveyPickStand', params);
    };

    /**
     * 分页查询复核站台信息
     * @param params
     * @param pageSize
     * @param pageIndex
     */
    static queryCheckStand(params: IConveyCheckStandSearch, pageSize: number, pageIndex: number): Promise<any> {
        return axiosInstance.post('/app/conveyStand/queryCheckStand', params, {
            params: {
                pageSize: pageSize,
                pageIndex: pageIndex
            }
        });
    };

    /**
     * 添加复核站台数据
     * @param params
     */
    static addCheckStand(params: IAppConveyCheckStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/addConveyCheckStand', params);
    };

    /**
     * 删除复核站台
     * @param standId
     */
    static deleteCheckStand(standId: string): Promise<any> {
        return axiosInstance.delete('/app/conveyStand/deleteConveyCheckStand', {
            params: {
                standId: standId
            }
        });
    };

    /**
     * 修改复核站台信息
     * @param params
     */
    static updateCheckStand(params: IAppConveyCheckStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/updateConveyCheckStand', params);
    };


    /**
     * 分页查询发货站台信息
     * @param params
     * @param pageSize
     * @param pageIndex
     */
    static queryDeliverStand(params: IConveyDeliverStandSearch, pageSize: number, pageIndex: number): Promise<any> {
        return axiosInstance.post('/app/conveyStand/queryDeliverStand', params, {
            params: {
                pageSize: pageSize,
                pageIndex: pageIndex
            }
        });
    };

    /**
     * 添加发货站台数据
     * @param params
     */
    static addDeliverStand(params: IAppConveyDeliverStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/addConveyDeliverStand', params);
    };

    /**
     * 删除发货站台
     * @param standId
     */
    static deleteDeliverStand(standId: string): Promise<any> {
        return axiosInstance.delete('/app/conveyStand/deleteConveyDeliverStand', {
            params: {
                standId: standId
            }
        });
    };

    /**
     * 修改发货站台信息
     * @param params
     */
    static updateDeliverStand(params: IAppConveyDeliverStand): Promise<any> {
        return axiosInstance.post('/app/conveyStand/updateConveyDeliverStand', params);
    };




}