package com.trade.client.salesorder.service;

import com.github.pagehelper.PageInfo;
import com.trade.service.salesorder.dto.SalesOrderDTO;
import com.trade.service.salesorder.dto.SalesOrderDeliverDTO;
import com.trade.service.salesorder.vo.SalesOrderDtlVO;
import com.trade.service.salesorder.vo.SalesOrderSearch;
import com.trade.service.salesorder.vo.SalesOrderVO;

public interface SalesOrderCService {

    /**
     * query sales order list by search conditions.
     * 
     * @param search The search conditions.
     * @return PageInfo<SalesOrderVO>
     */
    PageInfo<SalesOrderVO> queryListBySearch(SalesOrderSearch search);

    /**
     * Save a new sales order.
     * 
     * @param salesOrderDTO The sales order to save.
     */
    void save(SalesOrderDTO salesOrderDTO, boolean isSubmit);

    void submit(SalesOrderDTO salesOrderDTO);

    /**
     * Deliver a sales order.
     * 
     * @param orderDeliverDTO deliver Info.
     */
    void deliver(SalesOrderDeliverDTO orderDeliverDTO);

    SalesOrderDtlVO getDetail(Long id, boolean is4Update);

    /**
     * Delete a sales order.
     * 
     * @param id The id of the sales order to delete.
     * @return True if the sales order is deleted successfully, false otherwise.
     */
    boolean delete(Long id);
}
