package com.sw.mes.fb.turnstore.service;

import com.sw.mes.core.base.BaseService;
import com.sw.mes.core.response.Result;
import com.sw.mes.fb.turnstore.entity.RecheckInspectReceive;
import com.sw.mes.fb.turnstore.entity.RecheckInspectReceiveDetail;

import java.util.List;

/**
 * @Author
 * @Description：
 * @Date:
 * @Modified By:
 */
public interface RecheckInspectReceiveService extends BaseService<RecheckInspectReceive> {
    /**
     * 根据托号查询退库主表
     *
     * @param trayNo
     * @return
     */
    RecheckInspectReceive findByTrayNo(String trayNo);

    /**
     * 确认退库复检
     *
     * @param receive       退库复检主表
     * @param detailDtoList 退库复检明细列表
     */
    void updateState(RecheckInspectReceive receive, List<RecheckInspectReceiveDetail> detailDtoList);

    /**
     * 将退库确认信息返回给WMS
     *
     * @param outOrderNo 出库单号
     * @param state      状态
     * @return
     */
    Result mesToWmsReceipt(String outOrderNo, Integer state);

    /**
     * 退库复检审核
     * @param id 退库复检id
     * @param state
     */
    void audit(Integer id, Integer state);

    /**
     * 切片MES退库复检接收
     * @param receive 退库复检主表
     * @param detailList 退库复检明细表
     */
    void sectionMesReturnInspection(RecheckInspectReceive receive, List<RecheckInspectReceiveDetail> detailList);

    /**
     * wms新增退库复检信息
     * @param receive 退库复检主表
     * @param detailList 退库复检明细表
     */
    void wmsReturnInspection(RecheckInspectReceive receive, List<RecheckInspectReceiveDetail> detailList);
}
