package com.prolog.rdc.tms.service;

import com.prolog.framework.core.pojo.Page;
import com.prolog.rdc.tms.constant.enums.BusinessTypeEnum;
import com.prolog.rdc.tms.model.dto.shipbill.BmsLogOperationDTO;
import com.prolog.rdc.tms.model.dto.shipbill.BmsShipBillAdjustDTO;
import com.prolog.rdc.tms.model.dto.shipbill.BmsShipBillDTO;
import com.prolog.rdc.tms.model.dto.shipbill.BmsShipBillDetailDTO;
import com.prolog.rdc.tms.model.dto.shipbill.BmsShipBillPackageDTO;
import com.prolog.rdc.tms.model.vo.shipbill.BmsShipBillQueryVO;
import com.prolog.rdc.tms.model.vo.shipbill.BmsShipBillVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author hongbo.pan
 */
public interface BmsShipBillService {

    /**
     * saveOrUpdate
     * @param vo
     */
    void saveOrUpdate(BmsShipBillVO vo);


    /**
     * saveAndCal
     * @param vo
     * @param type
     */
    void saveAndCal(BmsShipBillVO vo, String type);

    /**
     * copy
     * @param vo
     */
    void copy(BmsShipBillVO vo);

    /**
     * findByCondition
     * @param vo
     * @return
     */
    Page<BmsShipBillDTO> findByCondition(BmsShipBillQueryVO vo);


    /**
     * findByIdList
     * @param idList
     * @return
     */
    List<BmsShipBillDTO> findByIdList(List<Long> idList);

    /**
     * findById
     * @param id
     * @return
     */
    BmsShipBillDTO findById(Long id);

    /**
     * detailById
     * @param id
     * @return
     */
    BmsShipBillDTO detailById(Long id);

    /**
     * getItem
     * @param id
     * @return
     */
    List<BmsShipBillDetailDTO> getItem(Long id);

    /**
     * getPackage
     * @param id
     * @return
     */
    List<BmsShipBillPackageDTO> getPackage(Long id);

    /**
     * getAdjust
     * @param id
     * @return
     */
    List<BmsShipBillAdjustDTO> getAdjust(Long id);

    /**
     * getLog
     * @param id
     * @return
     */
    List<BmsLogOperationDTO> getLog(Long id);

    /**
     * addShipBillAdjust
     * @param code
     * @param memo
     */
    void addShipBillAdjust(String code, String memo);

    /**
     * 导入
     * @param file
     */
    void importShipbillData(MultipartFile file);

    /**
     * 核算
     * @param idList
     * @param businessTypeEnum
     */
    void calculate(List<Long> idList, BusinessTypeEnum businessTypeEnum);

    /**
     * 提交
     * @param idList
     * @param businessTypeEnum
     */
    void submit(List<Long> idList, BusinessTypeEnum businessTypeEnum);


    /**
     * 核算提交
     * @param idList
     * @param businessTypeEnum
     */
    void calculateAndSubmit(List<Long> idList, BusinessTypeEnum businessTypeEnum);

}
