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

import com.prolog.cs.basic.common.model.print.PrintParam;
import com.prolog.cs.biz.outbound.model.dto.ContainerListDTO;
import com.prolog.cs.biz.outbound.model.dto.OuterTaskDDTO;
import com.prolog.cs.biz.outbound.model.dto.PickTaskDDTO;
import com.prolog.cs.biz.outbound.model.dto.check.OuterCheckBarcodeDetailDTO;
import com.prolog.cs.biz.outbound.model.dto.check.OuterTaskV2DTO;
import com.prolog.cs.biz.outbound.model.out.ContainerBindTaskDto;
import com.prolog.cs.biz.outbound.model.vo.BulkPickBoardVo;
import com.prolog.cs.biz.outbound.model.vo.PickTaskDVo;
import com.prolog.cs.biz.outbound.model.vo.TaskCountVo;
import com.prolog.cs.biz.outbound.model.vo.check.OutCheckSupervisionCodeVO;
import com.prolog.cs.biz.outbound.model.vo.check.OuterTaskVO;
import com.prolog.entity.vo.ApplyForPackageWeighVO;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author zzz
 * @desc
 * @date 2021/6/4
 */
public interface PickTaskAppService {

    Page<OuterTaskDDTO> outerCheckUnAsk(String barcode,String bldgId,String warehouseId, Integer pageNum, Integer pageSize);

    Page<OuterTaskDDTO> outerCheckUnCheck(String bldgId,String srcCode,String warehouseId, Integer pageNum, Integer pageSize);

    Boolean outerCheckConfirm(String barcode,Integer pcs,String superviseCode,String warehouseId);

    long getPickTaskCount(String bldgId,String warehouseId,Integer pickTaskType,String operatorCode,Integer type);

    Map<String, Object> queryAreaTaskList(String bldgId, String warehouseId);

    Map<String,Object> createByOperatorCode(String bldgId,String warehouseId, Integer pickTaskType,Integer pickBoxNum);

    Integer bindContainer(String pickOrderId, String containerCode,String warehouseId);

    Page<PickTaskDDTO> getPickTaskDList(String bldgId,String warehouseId, String pickOrderId, Integer pageNum, Integer pageSize);

    Map<String, Object> getTaskHListByPickOrder(String bldgId,String warehouseId, String pickOrderId, Integer pageNum, Integer pageSize);

    List<ContainerListDTO> getContainerList(String warehouseId, String pickOrderId, String itemId, String locatorCode, String manufacturerLotNum);

    Map<String, Object> pickTaskConfirm(List<ContainerListDTO> list);

    Map<String, Object> pickTaskHConfirm(String pickOrderId,String pickTaskDId,String pickTaskId, BigDecimal pickQty,String redReason,String redType);

    ContainerBindTaskDto containerOffShelf(String containerNo);

    BulkPickBoardVo bulkPickBoard(String bldgId, String warehouseId);

    Page<PickTaskDVo> getBulkPickTaskDList(String bldgId, String warehouseId, String pickOrderId, Integer pageNum, Integer pageSize);

    Boolean pickTaskBulkConfirm(PickTaskDVo pickTaskDVo);

    Map<String, String> getSlideway(String containerCode);

    Page<PickTaskDDTO> getConfirmTaskList(
            String bldgId,
            String warehouseId,
            String containerCode,
            Integer pageNum,
            Integer pageSize
    );


    Map<String, Object> createWholePickOrder(
            String containerCode,
            String warehouseId,
            String bldgId
    );

    /**
     * 查询当前用户未完成任务
     * @param warehouseId
     * @param bldgId
     * @return
     */
    Map<String, Object> getUserUnCompleteOrder(String warehouseId, String bldgId);

    /**
     * 查询整件各区域未完成任务数
     * @param bldgId
     * @param warehouseId
     * @return
     */
    List<TaskCountVo> queryWholeAreaTaskList(String bldgId, String warehouseId);


    /**
     * 任务索取
     * @param params
     * @return
     */
    Map<String,Object> createByOperatorCode2(Map<String,Object> params);

    /**
     * 外复核索取
     * @param barcode
     * @param bldgId
     * @param warehouseId
     * @return
     */
    OuterTaskV2DTO outerCheckUnAskV2(String barcode, String bldgId, String warehouseId);

    Map<String, Object> outerCheckConfirmV2(OuterTaskVO vo);

    void scanSupervisionCode(OutCheckSupervisionCodeVO vo);

    Map<String, Object> applyForPackageWeigh(ApplyForPackageWeighVO vo);

    RestMessage<?> print(List<PrintParam> printData);

    List<PrintParam> getPrintFaceOrder(String faceOrder, String consignorId, String warehouseId, String carrierCode);

    List<String> getLHFaceOrder(Map<String,Object> map);

    List<OuterCheckBarcodeDetailDTO> getBarcodeDetail(String barCode, String warehouseId);

    void retryCallbackToERPByTable();

    Map<String, Object> gnkfGenerateBarcodes(String billId, Integer barcodeNum);

    Object saveFaceOrder(Map<String, Object> map);

    void autoOuterCheckConfirm();

}
