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

import com.prolog.cs.basic.warehouse.model.BaseWmsWhWorkstation;
import com.prolog.cs.biz.outbound.model.PickOrder;
import com.prolog.cs.biz.outbound.model.PickTaskD;
import com.prolog.cs.biz.outbound.model.PickTaskH;
import com.prolog.cs.biz.outbound.model.dto.*;
import com.prolog.cs.biz.outbound.model.dto.print.PrintAllVO;
import com.prolog.cs.biz.outbound.model.out.ContainerBindTaskDto;
import com.prolog.cs.biz.outbound.model.print.PrintDataWithMark;
import com.prolog.cs.biz.outbound.model.vo.InfTaskOutBackVO;
import com.prolog.cs.biz.outbound.model.vo.InfTaskOutVO;
import com.prolog.cs.biz.outbound.model.vo.PickTaskConfirmVO;
import com.prolog.cs.biz.outbound.model.vo.UpdateStockVO;
import com.prolog.cs.platform.power.model.Employee;
import com.prolog.entity.vo.*;
import com.prolog.framework.bz.common.print.PrintData;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;

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

/**
 * @author zzz
 * @desc
 * @date 2021/4/30
 */
public interface PickTaskService {

    /**
     * 索取任务(零货)
     * @param operatorCode
     * @param warehouseId
     */
    Map<String,Object> createPickOrder(String bldgId, String operatorCode, String containerCode, String warehouseId);

    /**
     * 索取任务(整件)
     * @param operatorCode
     * @param warehouseId
     */
    Map<String,Object> createPickOrder2(String bldgId,String operatorCode,String warehouseId,Integer isPrint,String pickTaskId,String containerNo,Integer type);

    /**
     * 索取任务(功能库房)
     * @param operatorCode
     * @param warehouseId
     */
    Map<String,Object> createPickOrder3(String bldgId,String operatorCode,String containerCode,String warehouseId,Integer isPrint);

    /**
     * 索取任务(整单)
     * @param operatorCode
     * @param warehouseId
     */
    Map<String,Object> createPickOrder4(String bldgId,String operatorCode,String containerCode,String warehouseId,Integer isPrint);

    /**
     * 索取任务(特殊任务索取)
     * @param bldgId
     * @param operatorCode
     * @param warehouseId
     * @param isPrint
     * @param pickTaskId
     * @return
     */
    Map<String,Object> createPickOrder5(String bldgId, String operatorCode, String warehouseId, Integer isPrint, String pickTaskId);
    /**
     * 拣选任务 绑定容器(零货)
     * @param pickOrderId
     * @param containerCode
     */
    Integer bindContainer(String pickOrderId,String containerCode);

    void bindContainerMix(String pickOrderId,String pickTaskType,String containerCode,String bldgId,String warehouseId);

    /**
     * 拣货确认
     * @param list
     */
    void pickTaskConfirm(List<PickTaskConfirmVO> list,Integer type);

    void sendPickEndToEis();

    public void confirmPickTaskByBarcode(String barcode);

    Page<PickOrder> getPickOrderPage(String operatorCode,String bldgId,Integer pickTaskType,String parames,String warehouseId,String status,Integer pageNum,Integer pageSize);

    List<PickTaskH> getPickTaskHList(String pickOrderId);

    List<PickTaskDDTO> getPickTaskDList(String pickTaskId);

    Page<PickTaskDDTO> getPickTaskPage(String pickOrderId, String itemCode,String containerCode,Integer pageNum,Integer pageSize);

    void cancelPickOrder(String pickOrderId);

    void cancelPickTask(String pickTaskId);

    void cancelPickTask(List<String> idList);

    void cancelBill(String billGroupId,String warehouseId);

    Page<PickTaskDDTO> getPickTaskAllPage(
            String bldgId,
            String type,
            String pickOrderId,
            String itemCode,
            String operatorCode,
            String barcode,
            String srcCode,
            String warehouseId,
            String billType,
            String containerNo,
            Integer pageNum,
            Integer pageSize
    );

    Page<PickTaskDDTO> getWaitPickTaskPage(
            String bldgId,
            String pickTaskType,
            String warehouseAreaCode,
            String itemCode,
            String srcCode,
            String warehouseId,
            Integer pageNum,
            Integer pageSize,
            String tab,
            String containerCode
    );

    Page<PickTaskDDTO> getMixPickTaskAllList(
            String bldgId,
            String pickTaskType,
            String pickOrderId,
            String itemCode,
            String operatorCode,
            String srcCode,
            String warehouseId,
            Integer pageNum,
            Integer pageSize
    );

    PickTaskCountDTO getPickTaskCount(Integer type,String warehouseId);

    List<PrintData> printPaperSlip(List<String> pickOrderIds, String warehouseId, String bldgId, String pickTaskType);

    List<PrintData> printSpecialPaperSlip(List<String> billIds,String warehouseId, String bldgId, String pickTaskType);

    List<PrintData> printWholeLabel(String pickTaskDId);

    List<PrintDataWithMark> printWholeLabels(List<String> pickTaskDIds,List<String> barcodeIds, String warehouseId,Integer type,String operatorName);

    List<PrintDataWithMark> wholeLabelRepairPrint(PrintAgainVo printAgainVo);

/*    void printAll1(List<PrintAllVO> VOList);*/

    Object printAll(List<PrintAllVO> VOList);

    void pickTaskConfrim();
    
    void confirmDevicePickTask(List<ContainerBindTaskDto> containerBindTaskDtoList);

    void manualSendAgv(List<String> billGroupIds);

    void saveOutcomingRecord(List<String> omsBillIds);

    Employee getEmployee(String operatorCode, String enterpriseId);

    void updateStock(List<UpdateStockVO> stockVOList, String warehouseId,String locatorId);

    Map<String,Object> updateStock2(List<UpdateStockVO> stockVOList, String warehouseId, String locatorId, String redType);

    BaseWmsWhWorkstation getBaseWmsWhWorkstation(String areaCode, String warehouseId, String enterpriseId);

    List<String> getOperatorList(String workarea, String businesstype, String type, String enterpriseId, String warehouseId);

    public RestMessage<?> sendDeviceTaskList(List<InfTaskOutVO> list);

    public RestMessage<?> reSendDeviceTaskList();

    public List<OutcomingRecordHDto> queryOutboundDataToOms(List<String> omsBillIds);

    List<InfTaskOutBackVO> eisConfirm(InfTaskOutBackVO infTaskOutBackVO);

    RestMessage<List<InfTaskOutBackDTO>> infTaskOutBack(List<InfTaskOutBackDTO> infTaskOutBackDTOList);

    RestMessage<List<InfTaskOutBackDTO>> infTaskOutBackAgvL(List<InfTaskOutBackDTO> infTaskOutBackDTOList);

    RestMessage<List<ValidateContainerNoDTO>> validateContainerNoList(List<ValidateContainerNoDTO> containerNoList);

    Page<RePrintWholeDto> taskListForPrintAgain(PrintAgainVo printAgainVo);

    Page<RePrintWholeDto> listWholeLabelRepair(PrintAgainVo printAgainVo);

    Page<RePrintBulkDto> listSpellLabelRepair(PrintAgainVo printAgainVo);

    Page<RePrintWholeBulkDto> listWholeBulkRepair(PrintAgainVo printAgainVo);

    Page<RePrintWholeDto> billListForPrintAgain(PrintAgainVo printAgainVo);

    List<PrintDataWithMark> taskPrintAgain(TaskPrintAgainVo printAgainVo);

    List<PrintDataWithMark> billPrintAgain(TaskPrintAgainVo printAgainVo);

	// List<EisPrintDataOutDto> eisPrintData(List<InfTaskOutBackDTO> eisPrintDataVo);

    List<RePrintWholeBulkDetailDto> listWholeBulkDetailRepair(List<String> ids);

    List<RePrintBulkDetailDto> listSpellLabelDetailRepair(List<String> ids);

    List<PrintDataWithMark> printLcl(PrintAgainVo printAgainVo);

    List<PrintDataWithMark> printAgainPaperSlip(PrintAgainVo printAgainVo);

    void sendPickEndToEisByTaskDIds(
            String[] pickTaskDIds
    );

    void outboundTaskCallback(OutboundTaskCallbackVO vo);

    Map<String, Object> completeTask(List<CompleteTaskVO> list);

    void outboundCheckResultCallback(OutboundCheckResultCallbackVO vo);

    void applyForDocumentPrinting(ApplyForDocumentPrintingVO vo);

    void orderBindingGridFeedback(OrderBindingGridFeedbackVO vo);

    Object printAllTx(List<PrintAllVO> voList);

    void printDetailAndFp(String taskHIds);

    void changeTaskQty(List<MarkTaskItemVO> list);
}
