package com.sunda.spmswms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sunda.spmscommon.ResponseResult;
import com.sunda.spmswms.entity.SapDeliveryNoteBatchReceipt;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 国内仓收货入库分批收货表 服务类
 * </p>
 *
 * @author Wayne
 * @since 2023-06-16
 */
public interface ISapDeliveryNoteBatchReceiptService extends IService<SapDeliveryNoteBatchReceipt> {
	
	/**
	 * 根据交货单号查询收货入库关联的分批收货信息
	 * @param deliveryNoteSap
	 * @return
	 */
	List<Map<String, Object>> getSapDeliveryNoteBatchReceiptList(String deliveryNoteSap);

	Page<Map<String, Object>> selectBatchReceiptHeadPage(int pageNo, int pageSize, String deliveryNoteSap, String werks, String whsLocationCode, String spmsStatus, String werksList);
	/**
	 * 根据uuid查询分批收货详情信息
	 * @param uuid
	 * @param operationType 
	 * @return
	 */
	ResponseResult selectBatchReceipt(String uuid);
	
	/**
	 * 保存分批收货信息
	 * @param obj
	 * @param userId
	 * @return
	 * @throws Exception 
	 */
	ResponseResult saveSapDeliveryNoteBatchReceipt(JSONObject obj, String userId) throws Exception;
	
	/**
	 * 提交分批收货信息
	 * @param obj
	 * @param userId
	 * @return
	 * @throws Exception 
	 */
	ResponseResult submitWmsBatchReceipt(JSONObject obj, String userId) throws Exception;
	
	/**
	 * 提交SAP
	 * @param obj
	 * @param userId
	 * @return
	 * @throws Exception 
	 */
	ResponseResult submitToSap(JSONObject obj, String userId) throws Exception;
	
	/**
	 * 撤销单据
	 * @param obj
	 * @param userId
	 * @return
	 * @throws Exception 
	 */
	ResponseResult cancelDn(JSONObject obj, String userId) throws Exception;
	
	/**
	 * 删除分批收货信息
	 * @param obj
	 * @param userId
	 * @return
	 */
	ResponseResult deleteReceipt(JSONObject obj, String userId);

}
