package com.sw.mes.store.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sw.mes.core.dto.WMSToWarehouseInputDto;
import com.sw.mes.core.dto.store.WarehouseInputBillDetailBo;
import com.sw.mes.core.response.ResponsePage;
import com.sw.mes.core.response.Result;
import com.sw.mes.core.utils.RequestPage;
import com.sw.mes.store.dto.WarehouseInputBillDto;
import com.sw.mes.store.dto.WarehouseInputBillPdaBo;
import com.sw.mes.store.entity.WarehouseInputBill;
import com.sw.mes.store.entity.WarehouseInputBillDetail;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * @Author wupeng
 * @Description 针对表【warehouse_input_bill】的数据库操作Service
 * @Date 11:13 2023/7/24
 * @Param
 * @return
 **/
public interface WarehouseInputBillService extends IService<WarehouseInputBill> {

    void saveInputBill(WarehouseInputBillDto bill);
    String saveInputBills(WarehouseInputBillDto bill);

    WarehouseInputBill getByBillNo(String billNo);

    void auditReceiveAtomic(WarehouseInputBill inputBill);
    void returnMaterialToWMS(WarehouseInputBill inputBill);

    void auditReceive(WarehouseInputBill inputBill);

    void autoReceiveAtomic(WarehouseInputBill inputBill);

    void autoReceive(WarehouseInputBill inputBill);

    Result rejectApply(WarehouseInputBill inputBill);

    void cancelApply(String billNo);

    void importInputBill(MultipartFile file) throws IOException;
    List<WarehouseInputBillDetail> findWarehouseInputBillDetailsBySerialNoOrTraceIdOrBatchNo(@RequestParam String code);
    List<WarehouseInputBillDetailBo> findWarehouseInputBillDetailsByMaterialCode(String materialCode);

    void receiveWmsStatus(WMSToWarehouseInputDto warehouseInputDto);

    Page<WarehouseInputBill> listByPagePda(ServletRequest request, RequestPage requestPage);
}
