package com.fjhx.material.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjhx.entity.material.MaterialReceiving;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 物料接收 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2022-10-11
 */
public interface MaterialReceivingMapper extends BaseMapper<MaterialReceiving> {

    void insertFlowApplyCheck(@Param("id") String id,
                              @Param("flowId") String flowId,
                              @Param("nodeId") String nodeId,
                              @Param("preNodeId") String preNodeId,
                              @Param("nextNodeId") String nextNodeId,
                              @Param("checkUserId") String checkUserId,
                              @Param("checkState") Integer checkState,
                              @Param("suggestions") String suggestions,
                              @Param("linkId") String linkId,
                              @Param("approvalItem") String approvalItem
    );

    List<Map<String, Object>> getList(@Param("receiveUserAccount") String receiveUserAccount);

    List<Map<String, String>> getUserNameByAccount(@Param("ew") QueryWrapper<Object> wrapper);

    List<Map<String, Object>> flowDetails(@Param("flowLinkId") String flowLinkId);

    List<Map<String, Object>> toBeReceivedList(@Param("submitUserAccount") String submitUserAccount);

}
