package com.yh.saas.plugin.yiliangyiyun.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
import com.yh.saas.plugin.yiliangyiyun.entity.PurchaseOrder;
import com.baomidou.mybatisplus.service.IService;
import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;

import java.text.ParseException;

/**
 * <p>
 * 采购订单 服务类
 * </p>
 *
 * @author Gongdc
 * @since 2021-07-22
 */
public interface IPurchaseOrderService extends IService<PurchaseOrder> {

    /**
     * 成交
     * @param purchaseOrder
     * @return
     */
    String deal(PurchaseOrder purchaseOrder);

    /**
     * 更改状态
     * @param purchaseOrder
     * @return
     */
    String editStatus(PurchaseOrder purchaseOrder);

    /**
     * 平仓
     * @param purchaseOrder
     * @return
     */
    String closePosition(PurchaseOrder purchaseOrder);

    /**
     * 客户点价
     * @param id
     * @return
     */
    String pointPrice(String id,Float unitPrice) throws ParseException, ServiceException;

    /**
     * 采购订单列表
     * @param purchaseOrder
     * @return
     */
    Page<PurchaseOrder> selectPurchaseOrder(PurchaseOrder purchaseOrder);

    /**
     * 添加采购订单
     * @param purchaseOrder
     * @return
     */
    String insertPurchaseOrder(PurchaseOrder purchaseOrder);

    /**
     * 删除采购订单
     * @param id
     */
    void deletePurchaseOrder(String id);
    /**
     * 编辑采购订单
     * @param purchaseOrder
     */
    String editPurchaseOrder(PurchaseOrder purchaseOrder);
    /**
     * 我的合同列表
     * @param purchaseOrder
     * @return
     */
    Page<PurchaseOrder> selectPurchaseOrderApp(PurchaseOrder purchaseOrder);

    String submitPurchaseOrder(PurchaseOrder purchaseOrder);

    /**
     * 查看
     *
     * @param
     */
    PurchaseOrder getInfo(String id);

}
