package com.ruoyi.api.mapper;

import com.ruoyi.api.domain.CheckTaskInfo;
import com.ruoyi.api.domain.InStoreDto;
import com.ruoyi.api.domain.OutStoreDto;
import com.ruoyi.api.domain.StockDto;
import com.ruoyi.manage.domain.LedgerRfid;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wanghao
 * @date 2024/1/17  14:28
 */
@Repository
public interface ApiMapper {
    int submintInsertRecordIn(@Param("inStore") InStoreDto inStore);

    int submintInsertLedger(@Param("inStore") InStoreDto inStore);

    int submitInsertRecordOut(@Param("outStoreDto") OutStoreDto outStoreDto,@Param("epc") String epc);

    int updataLedger(@Param("outStoreDto") OutStoreDto outStoreDto);

    List<StockDto> storeCheckSelect();

    void insertCheckInfo(@Param("list") List<StockDto> list, @Param("id") Long checkId);

    List<StockDto> xjSelect(String user);

    LedgerRfid bfSelect(String epc);

    void updataLedgerForBf(@Param("epc") String epc, @Param("state") String state);

    LedgerRfid fpInSelect(String epc);

    int fpInSubmit(@Param("epc") String epc, @Param("localtionCode") String localtionCode,
                   @Param("user") String user, @Param("bf") String bf, @Param("subCode") String subCode);

    void updataLedgerIn(@Param("epc") String epc,@Param("code") String locationCode);

    void insertInspectionInfo(@Param("list") List<StockDto> list,@Param("id") Long inspectionId);

    List<StockDto> fpOutSelect();

    void insertWasreOutRecord(@Param("list") List<StockDto> list,@Param("user") String user);

    void updataLedgerForWasreOut(@Param("list")List<StockDto> list);

    String selectLedgerbyEpcForInStore(String epc);

    String selectLedgerbyEpcForOutStore(String epc);

    int updataLedgerFoyOut(@Param("outStoreDto") OutStoreDto outStoreDto, @Param("epc") String epc);

    List<CheckTaskInfo> selectLocationByAreaUser(String user);

    void insertCheckTask(@Param("id") int id,@Param("list") List<CheckTaskInfo> list);

    List<CheckTaskInfo> inspectionSelectTask(String user);

    List<StockDto> inspectionSelectLocation(String code);

    void updataInspectionTaskByObjid(long tableId);

    void insertInspetionPictrue(@Param("inspetionId") long inspectionId,
                                @Param("tableId") long tableId,
                                @Param("user") String user,
                                @Param("pathName") String pathName);

    void insertBfImg(@Param("objid") Long objid,
                    @Param("epc") String epc,
                     @Param("user") String user,
                     @Param("pathName") String pathName);
}
