package com.prolog.cs.biz.outbound.service;

import com.prolog.cs.biz.outbound.model.OmsDoBillHDO;
import com.prolog.cs.biz.outbound.model.WAVE_STATUS;
import com.prolog.cs.biz.outbound.model.dto.*;
import com.prolog.cs.biz.outbound.model.entity.OmsDoBillDDO;
import com.prolog.cs.biz.outbound.model.entity.WaveBillDO;
import com.prolog.cs.biz.outbound.model.entity.WaveDO;
import com.prolog.cs.biz.outbound.model.vo.*;
import com.prolog.cs.biz.outbound.model.vo.check.WavePendingBillVO;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;

import java.util.List;
import java.util.Map;

public interface WavesService {

    String[] wavesCreate(WavesCreateDTO wavesCreateVO);

    Page<OmsDoBillHDO> getBillHList(BillQueryDTO billQueryDTO);

    Page<OmsDoBillDDO> getBillDByBillId(ItemQueryDTO itemQueryDTO);


    Page<WaveBillDO> getWaveBills(WavesGroupBillQueryDTO wavesGroupBillQueryVO);
    // 提示近效期商品 - by Huanglh 2022-02-21
    RestMessage<String> waveDistribute(WaveDistributeDTO waveDistributeVO);

    RestMessage<List<WavePreCalResultVO>> waveTaskTrial(WaveDistributeDTO waveDistributeVO);

    Page<WaveVO> getWaves(Integer pageNum, Integer pageSize, String wareHouseId,
                          String waveId, String billCode, String cargoOwnerId,String status,String type);

    WaveVO getBillsByWaveId(String id);

    WaveBillVO getItemsByBillId(String billId,Integer withStockQty);

    RestMessage<Boolean> cancelBillById(String billId);

    Boolean retryBillById(String billId);

    WaveStatisticVO getStatistics(String waveId);

    Page<WaveDO> getWavesByStatus(WAVE_STATUS status, Integer pageNum, Integer pageSize);

     List<WaveBillVO> getBillVo(List<WaveBillDO> waveBillDOs);

    Page<WaveStorageVO> getWaveLocatorInfo(String warehouseId,
                                           String waveId,
                                           String billId,
                                           String billDId,
                                           String itemCode,
                                           String locatorId,
                                           String billCode,
                                           Integer pageNum,
                                           Integer pageSize);

    Page<WorkStageVO> getWaveWorkStage(String warehouseId,
                                       String waveId,
                                       String billId,
                                       Integer pageNum,
                                       Integer pageSize);

    RestMessage<Boolean> deleteByWaveId(String waveId);

    Page<WavePendingBillVO> getPendingBills(String type,String wareHouseId,
                                            String waveId,
                                            String billCode,
                                            String consignorId,
                                            Integer pageNum, Integer pageSize);

    RestMessage<List<WavePreCalResultVO>> preCalculate(List<String> wavesIds);

    void updateBillType(List<String> billids);

    Page<WaveMonitorPageDTO> waveMonitorPage(WaveMonitorPageVO vo);

    String autoCreateWave();

    Page<PreReplenishDto> getPreReplenishPageList(PreReplenishVo vo);

    void waveRepush(List<String> ids);

    Page<WaveDO> listWaveRepush(Map<String, Object> param);

    void hangupBill(List<String> taskLineIds);
}
