package com.sunda.spmswms.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmswms.entity.WhsOtherUnload;

import java.util.Map;

/**
 * <p>
 * 卸货入库任务表 服务类
 * </p>
 *
 * @author
 * @since
 */
public interface IWhsOtherUnloadService extends IService<WhsOtherUnload> {

    /** 保存WhsOther,根据uuid，有则更新，无则新建*/
    ResponseResult onSaveWhsOther(JSONObject WhsOtherDtl, String userId)throws Exception;

    /**获取任务列表
    *{
          "werks":"CN01",
          "whsLocationCode":"1011",
          "movementType":"311",
          "goodsType":"M",
          "createDate":["2021-06-18","2021-06-21"],
          "taskStatus":"1",
      }
    * */
    ResponseResult getWhsOtherList(JSONObject InvCheckFilter);

    /**按uuid获取InvCheck的详情数据*/
    ResponseResult getWhsOtherWithDtl(String uuid);

    /** 退货出库————退货订单获取接口，输入交货单号，采购订单号等信息向SAP REST请求 */
    ResponseResult getSapReturnedOrder(String deliveryNoteSap, String purchaseOrderNo,String werks);

    /**
     * 更新装卸信息
     * @param doc
     * @param userId
     * @return
     */
	ResponseResult updateLoadingData(JSONObject doc, String userId);

	/**
	 * 获取装卸信息
	 * @param spmsId
	 * @return
	 */
	Map<String, Object> getLoadingData(String spmsId);

    ResponseResult updateWhsOtherTask(WhsOtherUnload doc, String userId) throws  Exception;
    
    /**
     * 撤销接口
     * @param userId
     * @param whsOtherUuid
     * @param cancelDate
     * @param cancelRemark
     * @return
     */
	ResponseResult cancelWhsOtherTask(String userId, String whsOtherUuid, String cancelDate, String cancelRemark) throws Exception;
}
