package com.oqpo.api.mapper.inoutmng;


import com.oqpo.api.entity.inoutmng.DeliDtlMgntEntity;
import com.oqpo.api.entity.inoutmng.DeliInfoMgntEntity;
import com.oqpo.api.entity.inoutmng.ShmtOdrBaseEntity;
import com.oqpo.api.entity.inoutmng.ShmtOdrDtlEntity;
import com.oqpo.api.entity.pomng.PchOdrBaseInfoEntity;
import com.oqpo.api.entity.pomng.PchOdrDtlPtclEntity;
import com.oqpo.api.entity.stockmng.WhsProcInfoPtclEntity;
import com.oqpo.api.web.dto.request.GridRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ColOdrMapper {
    int selectColRtnIngCnt(@Param("brandId") String brandId, @Param("rtnPodrUnqNo") String rtnPodrUnqNo)throws Exception;

    /*
    List<PchOdrBaseInfoEntity> selectShmtTargetOdrGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sShmtWhsId") String sShmtWhsId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectShmtTargetOdrGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sShmtWhsId") String sShmtWhsId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm)throws Exception;

    int insertShmtOdrBase(@Param("userId") String userId, ShmtOdrBaseEntity entity)throws Exception;
    int insertShmtOdrDtl(@Param("userId") String userId, List<ShmtOdrDtlEntity> gridInsertData)throws Exception;

    List<PchOdrBaseInfoEntity> selectShmtJobDataList(@Param("brandId") String brandId, List<PchOdrDtlPtclEntity> gridInsertData)throws Exception;

    int insertDeliInfoMngt(@Param("userId") String userId, DeliInfoMgntEntity entity)throws Exception;
    int insertDeliDtlPtcl(@Param("userId") String userId, List<DeliDtlMgntEntity> gridInsertData)throws Exception;

    List<ShmtOdrBaseEntity> selectShmtSearchGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sShmtWhsId") String sShmtWhsId, @Param("sShmtReqStCd") String sShmtReqStCd, @Param("swhsId") String swhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectShmtSearchGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sShmtWhsId") String sShmtWhsId, @Param("sShmtReqStCd") String sShmtReqStCd, @Param("swhsId") String swhsId, @Param("sItemNm") String sItemNm)throws Exception;

    DeliInfoMgntEntity selectInvInfo(@Param("brandId") String brandId, @Param("dlvSttmtUnqNo") String dlvSttmtUnqNo)throws Exception;
    List<DeliDtlMgntEntity> selectInvDtlList(@Param("brandId") String brandId, @Param("dlvSttmtUnqNo") String dlvSttmtUnqNo)throws Exception;

    List<PchOdrBaseInfoEntity> selectSpplyTargetOdrGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectSpplyTargetOdrGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm)throws Exception;

    PchOdrBaseInfoEntity selectSpplyShmtOdrInfo(@Param("brandId") String brandId, @Param("spplyId") String spplyId, @Param("pchPodrUnqNo") String pchPodrUnqNo)throws Exception;
    List<PchOdrDtlPtclEntity> selectSpplyShmtOdrList(@Param("pchPodrUnqNo") String pchPodrUnqNo)throws Exception;


    List<DeliInfoMgntEntity> selectDeliGridList(@Param("sBrandId") String sBrandId, @Param("dtGubun") String dtGubun, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sDlvStCd") String sDlvStCd, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectDeliGridCnt(@Param("sBrandId") String sBrandId, @Param("dtGubun") String dtGubun, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sDlvStCd") String sDlvStCd, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm)throws Exception;

    List<DeliInfoMgntEntity> selectSpplyDeliGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectSpplyDeliGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm)throws Exception;

    List<DeliInfoMgntEntity> selectWarehouseTargetGridList(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sWhsId") String sWhsId, @Param("sSpplyId") String sSpplyId, @Param("sDlvSttmtUnqNo") String sDlvSttmtUnqNo, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectWarehouseTargetGridCnt(@Param("sBrandId") String sBrandId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sWhsId") String sWhsId, @Param("sSpplyId") String sSpplyId, @Param("sDlvSttmtUnqNo") String sDlvSttmtUnqNo, @Param("sItemNm") String sItemNm)throws Exception;

    int insertWhsProcInfoPtcl(@Param("userId") String userId, List<WhsProcInfoPtclEntity> gridUpdateData)throws Exception;

    List<DeliInfoMgntEntity> selectWarehouseProcList(@Param("brandId") String brandId, @Param("whsId") String whsId, List<DeliDtlMgntEntity> gridUpdateData)throws Exception;


    int updateDeliDtlStCd(@Param("userId") String userId, List<DeliDtlMgntEntity> gridUpdateData)throws Exception;
    List<DeliInfoMgntEntity> selectDeliInfoStList(@Param("userId") String userId, List<DeliDtlMgntEntity> gridUpdateData)throws Exception;
    int updateDeliInfoStCd(@Param("userId") String userId, List<DeliInfoMgntEntity> gridUpdateData)throws Exception;

    int updateShmtDtlStCd(@Param("userId") String userId, List<ShmtOdrDtlEntity> gridUpdateData)throws Exception;
    List<ShmtOdrBaseEntity> selectShmtInfoStList(@Param("userId") String userId, List<ShmtOdrDtlEntity> gridUpdateData)throws Exception;
    int updateShmtInfoStCd(@Param("userId") String userId, List<ShmtOdrBaseEntity> gridUpdateData)throws Exception;

    int updatePchPodrDtlStCd(@Param("userId") String userId, List<PchOdrDtlPtclEntity> gridUpdateData)throws Exception;

    List<WhsProcInfoPtclEntity> selectWarehouseList(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sPchPodrUnqNo") String sPchPodrUnqNo, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm, GridRequest gridRequest)throws Exception;
    int selectWarehouseCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId, @Param("fromDt") String fromDt, @Param("toDt") String toDt, @Param("sPchPodrUnqNo") String sPchPodrUnqNo, @Param("sSpplyId") String sSpplyId, @Param("sWhsId") String sWhsId, @Param("sItemNm") String sItemNm)throws Exception;
    */
}
