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.WhsOperateLog;

import java.util.List;

/**
 * <p>
 * 库存操作日志表 服务类
 * </p>
 *
 * @author Wayne
 * @since 2021-04-14
 */
public interface IWhsOperateLogService extends IService<WhsOperateLog> {

    /** 1.自管仓 备件货 按箱 验收入库 增加仓库库存 - 日志 */
    void insertWhsOperateLogBR(String boxNote, double quantity, String deliveryNoteSap, String relateDocumentNumber, String comments, String userId, String werks, String whsLocationCode);

    /** 2.自管仓 备件货 按箱 上架 增加储位库存 - 日志 */
    void insertWhsOperateLogBS(String uuidStorage, String boxNote, double quantity, String deliveryNoteSap, String comments, String userId, String werks, String whsLocationCode);

    /** 3.自管仓 贸易货 按物料 上架 增加储位库存 - 日志 
     * @param deliveryNoteSapItem */
    void insertWhsOperateLogMS(String uuidStorage, String materialNo, double quantity, String deliveryNoteSap, String comments, String userId, String werks, String whsLocationCode, String deliveryNoteSapItem);

    /** 4.自管仓 备件货 按箱 出库 减少仓库库存 - 日志 */
    void insertWhsOperateLogBC(String boxNote, double quantity, String whsOutUuid, String comments, String userId, String werks, String whsLocationCode);

    /** 5.自管仓 备件货 按箱 下架 减少储位库存 - 日志 */
    void insertWhsOperateLogBX(String uuidStorage, String boxNote, double quantity, String whsOutUuid, String comments, String userId, String werks, String whsLocationCode);
    void insertWhsOperateLogBX(String uuidStorage, String boxNote, double quantity, String whsOutUuid, String comments, String userId,String remarks, String werks, String whsLocationCode);

    /** 6.自管仓 贸易货 按物料 下架 减少储位库存 - 日志 */
    void insertWhsOperateLogMX(String uuidStorage, String materialNo, double quantity, String whsOutUuid, String comments, String userId, String werks, String whsLocationCode);

    /** 根据储位 uuid 查询储位物品动态记录 */
    List<WhsOperateLog> getWhsOperateLog(String uuid);

    /** 7.自管仓 备件货 按箱 上架 增加储位库存 - 日志 */
    void insertWhsOperateLogBI(String uuidStorage, String boxNote, double quantity, String documentNumber, String comments, String userId, String werks, String whsLocationCode);
    void insertWhsOperateLogBI(String uuidStorage, String boxNote, double quantity, String documentNumber, String comments, String userId,String remarks, String werks, String whsLocationCode);

    /** 8. 根据条件查询储位台账，全部数据 */
    ResponseResult getWhsDeskAccount(JSONObject filterCriteria);

    /** 根据条件查询储位台账，分页数据 */
    ResponseResult getWhsDeskAccountPage(JSONObject filterCriteria);

    /** 新增仓库库存 或 储位库存操作记录 
     * @param itemNo */
    void insertWhsOperateLog(String documentType,
                             String uuidStorage,
                             String materialNo,
                             String boxNote,
                             double quantity,
                             String operateType,
                             String relateDocumentNumber,
                             String comments,
                             String userId,
                             String remark,
                             String werks,
                             String whsLocationCode, 
                             String itemNo);
    void insertOperateLog(String documentType,
                             String uuidStorage,
                             String materialNo,
                             String boxNote,
                             double quantity,
                             String operateType,
                             String relateDocumentNumber,
                             String comments,
                             String userId,
                             String remark,
                             String werks,
                             String whsLocationCode,
                             String deliveryNoteSap);
    /**
     * 出入库明细同步EAM系统
     */
	void getOperateLogToEam();
}
