package com.sunda.spmswms.service;

import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmswms.entity.WhsOtherTask;

/**
 * <p>
 * 异常出入库任务表 服务类
 * </p>
 *
 * @author Wayne
 * @since 2021-06-16
 */
public interface IWhsOtherTaskService extends IService<WhsOtherTask> {

    /** 保存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(WhsOtherTask doc, String userId) throws  Exception;
}
