package cn.ezhizao.project.business.mapper;

import cn.ezhizao.project.business.domain.BizDaywork;
import cn.ezhizao.project.business.domain.BizDayworkItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 报工记录Mapper接口
 *
 * @author ezhizao
 * @date 2023-12-04
 */
public interface BizDayworkItemMapper extends BaseMapper<BizDayworkItem>
{
    /**
     * 查询报工记录列表
     *
     * @param bizDayworkItem 报工记录
     * @return 报工记录集合
     */
    public List<BizDayworkItem> getList(BizDayworkItem bizDayworkItem);
    public List<BizDaywork> getInnerListByDeptId(BizDayworkItem bizDayworkItem);
    public List<BizDaywork> getOutListByDeptId(BizDayworkItem bizDayworkItem);

    /**
     * 根据载具id查询待周转列表
     * @param bizDayworkItem
     * @return
     */
    public List<BizDayworkItem> getDayworkItemByCarrier(BizDayworkItem bizDayworkItem);
    public List<BizDayworkItem> getListByDayworkId(BizDayworkItem bizDayworkItem);
    public List<BizDayworkItem> getDayworkItemByDayworkIds(List<Long> dayworkIds);
    public List<BizDayworkItem> getSortListByDayworkId(BizDayworkItem bizDayworkItem);
    /**
     * 根据载具code查询待周转列表
     * @param bizDayworkItem
     * @return
     */
    public List<BizDayworkItem> getDayworkItemByCarrierCode(BizDayworkItem bizDayworkItem);


    /**
     * 查询未周转的item
     * @param bizDayworkItem
     * @return
     */
    public List<BizDayworkItem> getUndoneItem(BizDayworkItem bizDayworkItem);

    /**
     * 物理删除
     * @param bizDayworkItem
     * @return 删除结果
    */
    public int physicalDelete(BizDayworkItem bizDayworkItem);


    /**
     * 根据载具id查询待周转列表
     */
    public BizDayworkItem getDayworkItemByCarrier(String carrierId);


    List<BizDayworkItem> getDayWorkItemHistory(String startTime,String endTime,String userName);

    List<BizDayworkItem> getItemScreen(Long dayWorkId);

    List<BizDayworkItem> getUnfinishedDayworkItemByUser(@Param("userId") Long userId);

    List<BizDayworkItem> getByDayworkId(Long dayworkId);
    List<BizDayworkItem> getTurnoverList(BizDaywork daywork);

    BizDayworkItem selById(Long dayworkItemId);


    List<BizDayworkItem> getByDaywork(BizDaywork daywork);
}
